Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Authentication Check each time the Page reloads using laravel 4.x

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 255
    Comment on it

    In every project we have minimum 2 sections. First is User Section and second is Admin Section and In our routes we want to put authentication check each time when page is loaded.

    I can easily explain this by using simple example.

    Route::group(array('before' => 'auth'), function(){
        Route::group(array('before' => 'AdminCheck'), function()    {
            Route::get('admin/dashboard','AdminController@index');
            Route::get('admin/manageUser','AdminController@userManagement');
            Route::get('admin/edituserinfo/{id}','AdminController@edituserinfo');
            Route::get('admin/edituserskill/{id}','AdminController@edituserskill');
            Route::get('/admin/editgroupinfo/{id}','AdminController@editgroupinfo');
            Route::get('/admin/editqueryinfo/{id}','AdminController@editqueryinfo');
            Route::get('/admin/addGroup','AdminController@addGroup');
            Route::get('/admin/manageGroup','AdminController@groupManagement');     
            Route::get('/admin/GetallConnections/{id}','AdminController@getrawconnectiondata');
            Route::get('admin/help','AdminController@PendingWork');
            Route::get('admin/about','AdminController@PendingWork');
            Route::get('/admin/manageVanityUrls','AdminController@vanityUrlsManagement');
            Route::get('/admin/managequeries','AdminController@queryManagement');
            Route::get('/admin/addvanity','AdminController@addvanity');
            Route::get('/admin/editvanityinfo/{id}','AdminController@editvanityinfo');
            Route::get('admin/report','AdminController@report'); 
            Route::get('admin/viewnote_detail/{request_id}','AdminController@viewnote_detail'); 
            Route::get('admin/viewreq_detail/{request_id}/{action}','AdminController@viewreq_detail');  
        });
    });
    

    That I have used in my routes.php. By using this example we will put authentication Check each time the Page reloads.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: