Merge branch 'user_management' into layout

This commit is contained in:
Michal Kváček
2016-01-21 16:24:33 +01:00
5 changed files with 28 additions and 49 deletions
-8
View File
@@ -7,14 +7,6 @@ use App\Http\Requests;
class Dashboard extends Controller
{
/**
* Dashboard constructor.
*/
public function __construct()
{
parent::__construct();
}
public function getIndex() {
return view('admin.dashboard');
}
+24 -37
View File
@@ -1,63 +1,50 @@
<?php
/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in 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.
|
/**
* This routing groups is used for routing along public part of website
*/
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
Route::group(['middleware' => ['web']], function () {
// display login form
Route::get('login', 'Admin\Login@getLoginForm')
->name('loginForm');
// ---------------------------------------------------------------
// @todo move to admin group (protect it)
// handle login
Route::post('admin/login', 'Admin\Login@postLogin')
->name('login');
});
/*******************************************************************************/
/**
* This route group serves to handle request in admin
*/
Route::group([
'middleware' => ['auth'],
'namespace' => 'Admin',
'prefix' => 'admin'
], function () {
// display dashboard with some usefull information
Route::get('/', 'Dashboard@getIndex');
// display form for creating new user
Route::get('admin/users/new', 'Admin\UserManagement@getNewUser')
Route::get('admin/users/new', 'UserManagement@getNewUser')
->name('users.new');
// display form for edit of existing user
Route::get('admin/users/edit/{id}', 'Admin\UserManagement@getEditExistingUser')
Route::get('admin/users/edit/{id}', 'UserManagement@getEditExistingUser')
->name('users.edit');
// display user detail in admin
Route::get('admin/users/{id}', 'Admin\UserManagement@getDetail')
Route::get('admin/users/{id}', 'UserManagement@getDetail')
->name('users.detail');
// display list of all users registered into our system
Route::get('admin/users/overview/{state?}', 'Admin\UsersManagement@getOverview')
Route::get('admin/users/overview/{state?}', 'UserManagement@getOverview')
->name('users.overview');
// POST methods
Route::post('login', 'Admin\Login@postLogin')
->name('login');
});
// list of admin routes
Route::group([
'middleware' => ['auth'],
'namespace' => 'Admin',
'prefix' => 'admin'
], function () {
Route::get('/', 'Dashboard@getIndex')
->name('admin.dashboard');
});
+1 -1
View File
@@ -28,7 +28,7 @@ class AdminProvider extends ServiceProvider
$menu->url(action('Admin\Dashboard@getIndex'), trans('admin/mainMenu.dashboard'), 1, ['icon' => 'fa fa-dashboard']);
$menu->dropdown(trans('admin/mainMenu.userManagement'), function($sub) {
$sub->url(action('Admin\UserManagement@getNewUser'), trans('admin/mainMenu.newUser'), 1, ['icon' => 'fa fa-user-plus']);
$sub->url(action('Admin\UsersManagement@getOverview', ['state' => 'all']), trans('admin/mainMenu.usersOverview'), 2, ['icon' => 'fa fa-users']);
$sub->url(action('Admin\UserManagement@getOverview', ['state' => 'all']), trans('admin/mainMenu.usersOverview'), 2, ['icon' => 'fa fa-users']);
}, ['icon' => 'fa fa-users']);
});
+1 -1
View File
@@ -1,5 +1,5 @@
-- MySQL Script generated by MySQL Workbench
-- Čt 21. leden 2016, 00:19:53 CET
-- Čt 21. leden 2016, 01:17:14 CET
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering