首先需要一個model文件 以Equipment為例
php artisan make:model Equipment
生成了Equipment這個model后再
php artisan admin:make EquipmentController --model=App\Equipment
這時候控制台會提示你要添加路由
App\Admin\Controllers\EquipmentController created successfully. Add the following route to app/Admin/routes.php: $router->resource('equipment', EquipmentController::class);
按照提示添加路由后 再在后台創建一個菜單 此時就完成了