PHP Classes

File: routes/web.php

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   Laravel Roles and Permissions   routes/web.php   Download  
File: routes/web.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Laravel Roles and Permissions
Manage application users' roles and permissions
Author: By
Last change:
Date: 1 year ago
Size: 1,682 bytes
 

Contents

Class file image Download
<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| 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('welcome');
// });

Auth::routes();

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

/**
 * Admin routes
 */
Route::group(['prefix' => 'admin'], function () {
   
Route::get('/', 'Backend\DashboardController@index')->name('admin.dashboard');
   
Route::resource('roles', 'Backend\RolesController', ['names' => 'admin.roles']);
   
Route::resource('users', 'Backend\UsersController', ['names' => 'admin.users']);
   
Route::resource('admins', 'Backend\AdminsController', ['names' => 'admin.admins']);


   
// Login Routes
   
Route::get('/login', 'Backend\Auth\LoginController@showLoginForm')->name('admin.login');
   
Route::post('/login/submit', 'Backend\Auth\LoginController@login')->name('admin.login.submit');

   
// Logout Routes
   
Route::post('/logout/submit', 'Backend\Auth\LoginController@logout')->name('admin.logout.submit');

   
// Forget Password Routes
   
Route::get('/password/reset', 'Backend\Auth\ForgetPasswordController@showLinkRequestForm')->name('admin.password.request');
   
Route::post('/password/reset/submit', 'Backend\Auth\ForgetPasswordController@reset')->name('admin.password.update');
});