Customize your router
To customize the router, there are 2 solutions:
1. Overwrite the contents of the corresponding controller
For example, the route content of the home page is
2. Override router
Since version S-Cart 6.1, you can create a new route content in the file app/routes/myroute.php (create a new one if it does not exist) to override S-Cart's default routes, or add new routers depending on your needs..
1. Overwrite the contents of the corresponding controller
For example, the route content of the home page is
So, just create one function index () in file app/Http/Controllers/ShopContentController.php to overwrite the content according to your needs.Route::get('/', '\App\Http\Controllers\ShopContentController@index')->name('home');
2. Override router
Since version S-Cart 6.1, you can create a new route content in the file app/routes/myroute.php (create a new one if it does not exist) to override S-Cart's default routes, or add new routers depending on your needs..
Related topics
- Backup & Restore
- S-Cart command line
- Create custom functions
- Configure data validation
- Customize controller
- Functions helper of S-Cart
- How to customize home page
- Customize admin dashboard page
- Customize helper functions
- Disable ecommerce router
- Convert S-Cart into a news website
- Customize data fields in S-Cart
- Data relations in S-Cart
- Customize search page
Latest Document
- Upgrade guide 2024-03-24
- Customize search page 2023-08-02
- Discount code (coupon) 2023-05-14
- Upgrade guide 2023-11-23
- Data relations in S-Cart 2023-02-05