Best Way to Modify Route & Controller
Will it be safe to modify files in
How should I modify route and controller in
Can you clarify what actually you want to do with route and controller ?
I need to display catalog following inventory source, each catalog will show different info, e.g: different banner, different promotion image and etc.
may need to add new route and modify some part of controllers
yes @jc you can overide the controller and route.
After that please run the command when you overide the files.
The Commands are
php artisan config:cache
php artisan cache:clear
php artisan route:cache
Hope this will work for you.
Deepak Singh Gusain
Can I know how the proper way to override the route and controller?
go to the package , then search for the route file check how the routes are define.
define your own route and then save that file.
go to the package , then search for controller add the function or override the function whatever you want and then save that file.
At last after saving the files please run the above command and check the result.
zainawan99 last edited by
Please any code example how can override the controller and route Please sent best away to extend controller webkul?