Menus affichés sur '/menus'
This commit is contained in:
parent
e82a9eedc7
commit
62747bea5d
@ -14,7 +14,8 @@ class MenuController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
//
|
return view('menus')
|
||||||
|
->with('menus', Menu::get());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
4
resources/views/menus.blade.php
Normal file
4
resources/views/menus.blade.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
@foreach($menus as $menu)
|
||||||
|
<li>{{ $menu->title }}</li>
|
||||||
|
@endforeach
|
@ -16,3 +16,5 @@ use Illuminate\Support\Facades\Route;
|
|||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
return view('welcome');
|
return view('welcome');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Route::resource('menus', \App\Http\Controllers\MenuController::class);
|
||||||
|
Loading…
Reference in New Issue
Block a user