add('/', 'HomeController@index'); } else { $router->add('/', 'DashboardController@reroute', ['RequireAuth']); } // auth routes $router->group('/auth', [], function ($router) { $router->add('/signin', 'AuthController@signin'); $router->add('/signup', 'AuthController@signup'); $router->add('/logout', 'AuthController@logout'); }); // dashboard route $router->add('/dashboard', 'DashboardController@index', ['RequireAuth']); // vehicle routes $router->group('/vehicles', ['RequireAuth'], function ($router) { $router->add('', 'VehicleController@index'); $router->add('/create', 'VehicleController@create'); $router->add('/edit/{id}', 'VehicleController@edit'); $router->add('/delete/{id}', 'VehicleController@delete'); }); $router->group('/refuel', ['RequireAuth'], function ($router) { $router->add('/create', 'RefuelController@create'); }); $router->dispatch();