source: routes/web.php@ d795fa6

develop
Last change on this file since d795fa6 was d795fa6, checked in by Berat Kjufliju <kufliju@…>, 3 years ago

added validation to blades

  • Property mode set to 100644
File size: 5.5 KB
Line 
1<?php
2
3use Illuminate\Support\Facades\Route;
4
5/*
6|--------------------------------------------------------------------------
7| Web Routes
8|--------------------------------------------------------------------------
9|
10| Here is where you can register web routes for your application. These
11| routes are loaded by the RouteServiceProvider within a group which
12| contains the "web" middleware group. Now create something great!
13|
14*/
15
16////////////////////
17// Auth Routes
18////////////////////
19Route::prefix('auth')->group(function () {
20
21 Route::get('/login', "Auth\LoginController@showLogin")->name("auth.loginShow");
22 Route::post('/login', "Auth\LoginController@login")->name("auth.login");
23 Route::post('/logout', "Auth\LoginController@logout")->name("auth.logout");
24
25 Route::get('/forgot', "Auth\ForgotPasswordController@showForgotPassword")->name("auth.forgotShow");
26 Route::post('/forgot', "Auth\ForgotPasswordController@forgotPassword")->name("auth.forgot");
27
28 Route::group(['middleware' => "createPassword"], function () {
29 Route::get('/create-password/{id}/{token}', "Auth\CreatePasswordController@showCreatePassword")->name("auth.create-password-show");
30 Route::post('/create-password/{id}/{token}', "Auth\CreatePasswordController@createPassword")->name("auth.create-password");
31 });
32
33 Route::group(['middleware' => "checkVerifyNewEmail"], function () {
34 Route::get('/verify/{id}/{token}', "Auth\VerifyNewEmailController@create")->name("auth.verifyShow");
35 Route::post('/verify/{id}/{token}', "Auth\VerifyNewEmailController@verify")->name("auth.verify");
36 });
37
38});
39
40////////////////////
41// Dashboard Routes
42////////////////////
43Route::group(['prefix' => 'dashboard', 'middleware' => ["auth", "checkIsActive"]], function () {
44
45 Route::get("/", "Dashboard\IndexController@index")->name("dashboard.index");
46
47 // Settings
48 Route::get("/settings", "Dashboard\SettingsController@settings")->name("dashboard.settings.index");
49 Route::patch("/settings/personal", "Dashboard\SettingsController@updatePersonalInformation")->name("dashboard.settings.personal");
50 Route::patch("/settings/username", "Dashboard\SettingsController@updateUsername")->name("dashboard.settings.username");
51 Route::patch("/settings/password", "Dashboard\SettingsController@updatePassword")->name("dashboard.settings.password");
52 Route::patch("/settings/email", "Dashboard\SettingsController@updateEmail")->name("dashboard.settings.email");
53
54
55 // Users
56 Route::group(['middleware' => 'permission:manage_all_users'], function () {
57 Route::get("/users", "Dashboard\UsersController@index")->name("dashboard.users.index");
58 Route::patch("/users/{id}/block", "Dashboard\UsersController@block")->name("dashboard.users.block");
59 Route::patch("/users/{id}/unblock", "Dashboard\UsersController@unblock")->name("dashboard.users.unblock");
60 Route::delete("/users/{id}/destroy", "Dashboard\UsersController@destroy")->name("dashboard.users.destroy");
61 });
62
63 Route::group(['middleware' => 'permission:create_user'], function () {
64 Route::get("/users/create", "Dashboard\UsersController@create")->name("dashboard.users.create");
65 Route::post("/users/store", "Dashboard\UsersController@store")->name("dashboard.users.store");
66 Route::get("/users/{id}/edit", "Dashboard\UsersController@editShow")->name("dashboard.users.editShow");
67 Route::patch("/users/{id}/edit", "Dashboard\UsersController@edit")->name("dashboard.users.edit");
68 Route::patch("/users/{id}/editUserData", "Dashboard\UsersController@editUserData")->name("dashboard.users.editUserData");
69 });
70
71 // Departments
72 Route::group(['middleware' => 'permission:manage_all_departments'], function () {
73 Route::get("/departments", "Dashboard\DepartmentsController@index")->name("dashboard.departments.index");
74 Route::get("/departments/create", "Dashboard\DepartmentsController@create")->name("dashboard.departments.create");
75 Route::post("/departments/store", "Dashboard\DepartmentsController@store")->name("dashboard.departments.store");
76 Route::get("/departments/{id}/edit", "Dashboard\DepartmentsController@editShow")->name("dashboard.departments.editShow");
77 Route::patch("/departments/{id}/edit", "Dashboard\DepartmentsController@edit")->name("dashboard.departments.edit");
78 Route::delete("/departments/{id}/destroy", "Dashboard\DepartmentsController@destroy")->name("dashboard.departments.destroy");
79 });
80
81 // Documents
82 Route::get("/documents", "Dashboard\DocumentsController@index")->name("dashboard.documents.index");
83 Route::get("/documents/create", "Dashboard\DocumentsController@create")->name("dashboard.documents.create");
84 Route::post("/documents/store", "Dashboard\DocumentsController@store")->name("dashboard.documents.store");
85 Route::get("/documents/{id}/edit", "Dashboard\DocumentsController@editShow")->name("dashboard.documents.editShow");
86 Route::patch("/documents/{id}/edit", "Dashboard\DocumentsController@edit")->name("dashboard.documents.edit");
87 Route::patch("/documents/{id}/block", "Dashboard\DocumentsController@block")->name("dashboard.documents.block");
88 Route::patch("/documents/{id}/unblock", "Dashboard\DocumentsController@unblock")->name("dashboard.documents.unblock");
89 Route::patch("/documents/{id}/confirm", "Dashboard\DocumentsController@confirm")->name("dashboard.documents.confirm");
90 Route::delete("/documents/{id}/destroy", "Dashboard\DocumentsController@destroy")->name("dashboard.documents.destroy");
91
92});
Note: See TracBrowser for help on using the repository browser.