- As we know there might be lots of route written inside web.php.
- Those route might belongs to different part/category/auth.
- Inorder to organize, we can specify similar route on same file.
For eg: we can group frontend and backend part to different file.
There are two ways:
Method 1:
require __DIR__.DIRECTORY_SEPARATOR.'front.php';
Method 2:
include('front.php');
Note: Make sure to put all different route file under “Route” folder