Example #1
0
 public function doLogin()
 {
     $password = \Input::get('password');
     if ($password == env('ACCESS_PASSWORD')) {
         $user = \Bloglyzer\Models\User::first();
         \Auth::LoginUsingId($user->id, true);
         return \Redirect::to('/');
     }
 }
Example #2
0
File: routes.php Project: texxt/app
    /*
    | Get the dashboard, where all the magic begins.
    */
    Route::get('dashboard', 'DashboardController@index');
    /*
    | School actions.
    */
    Route::get('schools/{id}', 'SchoolController@show');
    Route::get('schools', 'SchoolController@index');
    Route::delete('schools/{id}', 'SchoolController@delete');
    Route::put('schools/{id}', 'SchoolController@update');
    /*
    | Get a conversation. Currently does nothing, and may not exist
    | in the alpha release of the app.
    */
    Route::get('conversation/{number}', 'ConversationController@show');
});
/*
| Authentication. All routes are prefixed with `auth`.
*/
Route::group(['prefix' => 'auth'], function () {
    Route::get('login', 'Auth\\AuthController@getLogin');
    Route::post('login', 'Auth\\AuthController@postLogin');
    Route::get('logout', 'Auth\\AuthController@getLogout');
    Route::get('logout/success', function () {
        return view('auth.logout.success');
    });
    Route::get('loginas/{userId}', function ($userId) {
        Auth::LoginUsingId($userId);
    });
});