Route::get('/', 'WelcomeController@index'); Route::get('about', 'WelcomeController@About'); /**========================= Application ==========================================================================================================================*/ Route::bind('app', function ($slug) { return App\Application::whereSlug($slug)->first(); }); Route::bind('user/app', function ($slug) { return App\Application::whereSlug($slug)->first(); }); Route::get('All-apps', ['as' => 'all.apps', 'uses' => 'ApplicationController@AllApps']); Route::resource('user/app', 'userAppController'); Route::patch('download/{app}', ['as' => 'download.Counter', 'uses' => 'ApplicationController@download']); Route::resource('app', 'applicationController'); /**========================== User =========================================================================================================================*/ Route::bind('user', function ($name) { return App\User::whereName($name)->first(); }); $router->resource('user', 'userController'); /**=========================== Profile ========================================================================================================================*/ Route::get('account-setting', ['as' => 'account.setting', 'uses' => 'profileController@accountSetting']); $router->resource('profile', 'profileController'); /**=========================== Profile ========================================================================================================================*/ $router->resource('admin', 'adminController'); /**======================== Article ===========================================================================================================================*/ Route::bind('article', function ($slug) { return App\Article::whereSlug($slug)->first(); }); Route::bind('user/article', function ($slug) { return App\Article::whereSlug($slug)->first(); }); Route::get('All-Articles', ['as' => 'all.article', 'uses' => 'ArticleController@AllArticle']);
| | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond to | and give it the controller to call when that URI is requested. | */ Route::get('/', function () { return view('welcome'); }); Route::model('codes', 'Code'); Route::model('users', 'User'); Route::bind('codes', function ($value, $route) { return App\Code::whereId($value)->first(); }); Route::bind('users', function ($value, $route) { return App\User::whereName($value)->first(); }); Route::resource('users', 'UsersController'); Route::resource('users.codes', 'CodesController'); Route::get('testfile', function () { return Redirect::to("testfile.php"); }); Route::get('assign', function () { return Redirect::to("assign.php"); }); Route::get('auth/login', 'Auth\\AuthController@getLogin'); Route::post('auth/login', 'Auth\\AuthController@postLogin'); Route::get('auth/logout', 'Auth\\AuthController@getLogout'); Route::get('auth/register', 'Auth\\AuthController@getRegister'); Route::post('auth/register', 'Auth\\AuthController@postRegister'); Route::get('testfile', function () {