mirror of
https://github.com/Aviortheking/CA_LARAVEL.git
synced 2025-06-15 19:09:19 +00:00
add blog detail
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use App\Post;
|
||||
use DB;
|
||||
|
||||
class HomeController extends Controller
|
||||
@ -41,4 +41,7 @@ class HomeController extends Controller
|
||||
|
||||
return view('blog', ['posts' => $posts]);
|
||||
}
|
||||
public function detail($id) {
|
||||
return view('detail',['post' => Post::findOrFail($id)]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user