PHP Classes

File: routes/web.php

Recommend this page to a friend!
  Classes of Nahidul Hasan   Gentelella Laravel User Management and CRUD System   routes/web.php   Download  
File: routes/web.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Gentelella Laravel User Management and CRUD System
User administration for Laravel applications
Author: By
Last change:
Date: 1 year ago
Size: 1,205 bytes
 

Contents

Class file image Download
<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return
view('auth.login');
});

Route::auth();
Route::get('/home', 'HomeController@index')->name('home');

Route::get('/logout', 'Auth\LoginController@logout')->name('user.logout');


/**
 * Users and Roles
 */
Route::post('roles', 'UserController@storeRole')->name('user.roles.store');
Route::put('roles', 'UserController@updateRole')->name('user.roles.update');

Route::get('/roles/abilities', 'UserController@getAbilitiesById')->name('user.roles.abilities');

Route::get('/roles/{id?}', 'UserController@getRoles')->name('user.roles.list');
Route::get('/admin/users', 'UserController@index')->name('admin.users');
Route::get('/admin/users/new', 'UserController@create')->name('admin.users.create');
Route::post('/admin/users', 'UserController@save')->name('admin.users.save');