Added AuthController
This commit is contained in:
16
app/controllers/AuthController.php
Normal file
16
app/controllers/AuthController.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Logs users into their account
|
||||
*/
|
||||
class DashboardController extends Controller {
|
||||
public function showLogin() {
|
||||
return 'Coming soon...';
|
||||
}
|
||||
|
||||
public function logoutAction() {
|
||||
Auth::logut();
|
||||
|
||||
return Redirect::to('/');
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,11 @@
|
||||
});
|
||||
});
|
||||
|
||||
Route::get('/auth/login', 'AuthController@showLogin');
|
||||
Route::group(['before' => 'auth'], function() {
|
||||
// Dashboard/Management Panel etc.
|
||||
Route::get('/dashboard', 'DashboardController@showDashboard');
|
||||
|
||||
// Authorization stuff.
|
||||
Route::get('/auth/logout', 'AuthController@logoutAction');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user