当按下命令php artisan route:时,列表未在我的代码中显示执行任务的地址。
| | GET|HEAD | / | | App\Http\Controllers\CarController@casa | web |
| | GET|HEAD | api/user | | Closure | api,auth:api |
| | GET|HEAD | crear | cars.create | App\Http\Controllers\CarController@mostrar | web |
| | POST | crear | cars.crear | App\Http\Controllers\CarController@crear | web |
| | GET|HEAD | home | home | App\Http\Controllers\HomeController@index | web,auth |
| | GET|HEAD | login | login | App\Http\Controllers\Auth\LoginController@showLoginForm | web,guest |
| | POST | login | | App\Http\Controllers\Auth\LoginController@login | web,guest |
| | POST | logout | logout | App\Http\Controllers\Auth\LoginController@logout | web |
| | POST | password/email | password.email | App\Http\Controllers\Auth\ForgotPasswordController@sendResetLinkEmail | web,guest |
| | GET|HEAD | password/reset | password.request | App\Http\Controllers\Auth\ForgotPasswordController@showLinkRequestForm | web,guest |
| | POST | password/reset | password.update | App\Http\Controllers\Auth\ResetPasswordController@reset | web,guest |
| | GET|HEAD | password/reset/{token} | password.reset | App\Http\Controllers\Auth\ResetPasswordController@showResetForm | web,guest |
| | GET|HEAD | register | register | App\Http\Controllers\Auth\RegisterController@showRegistrationForm | web,guest |
| | POST | register | | App\Http\Controllers\Auth\RegisterController@register | web,guest |
Routes / web.php
<?php
Route::get('/crear',[ 'uses'=>'CarController@mostrar', 'as'=>'cars.create' ] );
Route::post('/crear',[ 'uses'=>'CarController@crear', 'as'=>'cars.crear' ]);
Route::get('/', 'CarController@casa' );
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');
答案 0 :(得分:0)
在cmd中运行此命令:php artisan make:controller AddressController --resource
并将其添加到web.php Route::resource('address', 'AddressController');
现在,您在执行route:list时会得到粗体列表