以下を参考にさせていただきました。
https://qiita.com/nekyo/items/03e50b4d0dd6f09287d6
class HomeController extends Controller
{
public function __construct()
{ $this->middleware('verified');
以上のようにするとMiddlewareにverifiedが追加される。
$php artisan route:list
| | GET|HEAD | parts | parts.index | App\Http\Controllers\PartsController@index | web,verified |
| | POST | parts | parts.store | App\Http\Controllers\PartsController@store | web,verified |
| | GET|HEAD | parts/create | parts.create | App\Http\Controllers\PartsController@create | web,verified |
| | GET|HEAD | parts/find | | App\Http\Controllers\HomeController@find | web,verified |
| | POST | parts/find | | App\Http\Controllers\HomeController@search | web,verified |
| | GET|HEAD | parts/listdelete | parts.listdelete | App\Http\Controllers\HomeController@listdelete | web,verified |
| | GET|HEAD | parts/{part} | parts.show | App\Http\Controllers\PartsController@show | web,verified |
| | DELETE | parts/{part} | parts.destroy | App\Http\Controllers\PartsController@destroy | web,verified |
| | PUT|PATCH | parts/{part} | parts.update | App\Http\Controllers\PartsController@update | web,verified |
| | GET|HEAD | parts/{part}/edit | parts.edit | App\Http\Controllers\PartsController@edit | web,verified |
Views: 41