laravel middleware

create middleware

php artisan make:middleware AgeMiddleware




now ,example to use middleware

php artisan make:middleware RoleMiddleware

and then regiseter in kernal.php

create controller

edit controller

run
php artisan serve


posted @   cyany_blue  阅读(108)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示