//Route::get('/', 'WelcomeController@index'); Route::get('/', 'PhasesController@index'); Route::get('home', 'PhasesController@index'); Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']); $router->bind('projects', function ($slug) { /** * * retrieve the first slug matching the query in the db */ return \App\models\Project::whereSlug($slug)->first(); }); $router->bind('clients', function ($id) { return \App\models\Client::whereId($id)->first(); }); $router->bind('types', function ($id) { return \App\models\Type::whereId($id)->first(); }); $router->bind('phases', function ($id) { return \App\models\Phase::whereId($id)->first(); }); Route::get('search/{word}', 'PagesController@search'); Route::resource('clients', 'ClientsController'); Route::resource('types', 'TypesController'); Route::resource('phases', 'PhasesController'); Route::get('phases/addTiming/{id}', 'PhasesController@timing'); Route::get('searchPhase/{word}', 'PhasesController@search'); Route::get('searchClientsPhases/{word}', 'PhasesController@searchcp'); Route::get('searchPerType/{word}', 'PhasesController@searchPerType'); Route::get('phases/updateTaskTitle/{id}', 'PhasesController@updateTaskTitle'); Route::resource('projects', 'PagesController'); Route::get('projects/updateProjectStatus/{arr}', 'PagesController@updateProjectStatus');
function typeTitle($typeID) { $client = \App\models\Type::whereId($typeID)->orderBy('id', 'desc')->first(); return $client->title; }