Scroll to top

Split your routes into separate files

All routes in one file will be a cumbersome so its a good practise to divide admin,members,testing routes into separate files . In this way you can easily add your custom functions and events listeners .

<?php

require_once __DIR__ . '/functions.php';

require_once __DIR__ . '/events.php';

require_once __DIR__ . '/routes-admin.php';

require_once __DIR__ . '/routes-test.php';

Route::get('/', 'HomeController@index');

Route::get('/search', 'HomeController@search');
Author avatar

admin

http://www.kodeinfo.com
Imran is a web developer and consultant from India. He is the founder of KodeInfo, the PHP and Laravel Community . In the meantime he follows other projects, works as a freelance backend consultant for PHP applications and studies IT Engineering . He loves to learn new things, not only about PHP or development but everything.

Post a Comment

Your email address will not be published. Required fields are marked *