Permalink
Switch branches/tags
Nothing to show
Find file Copy path
813dcb6 Nov 6, 2018
1 contributor

Users who have contributed to this file

22 lines (16 sloc) 363 Bytes
<?php
namespace App\Http\Controllers;
use App\Post;
use Illuminate\Http\Request;
class PostController extends Controller
{
public function index()
{
$posts = Post::latest()->get();
return view('post.index', compact('posts'));
}
public function show(Post $post)
{
return view('post.show', compact('post'));
}
}