source: routes/web.php@ 6b95845

develop
Last change on this file since 6b95845 was ea7b12a, checked in by beratkjufliju <kufliju@…>, 3 years ago

added files crud in table

  • Property mode set to 100644
File size: 6.1 KB
RevLine 
[2fc88ec]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
[bd9e8e3]16Route::get('/', function() {
17 return redirect()->route('dashboard.index');
18});
19
[7304c7f]20////////////////////
21// Auth Routes
22////////////////////
23Route::prefix('auth')->group(function () {
24
25 Route::get('/login', "Auth\LoginController@showLogin")->name("auth.loginShow");
26 Route::post('/login', "Auth\LoginController@login")->name("auth.login");
27 Route::post('/logout', "Auth\LoginController@logout")->name("auth.logout");
28
29 Route::get('/forgot', "Auth\ForgotPasswordController@showForgotPassword")->name("auth.forgotShow");
30 Route::post('/forgot', "Auth\ForgotPasswordController@forgotPassword")->name("auth.forgot");
31
32 Route::group(['middleware' => "createPassword"], function () {
33 Route::get('/create-password/{id}/{token}', "Auth\CreatePasswordController@showCreatePassword")->name("auth.create-password-show");
34 Route::post('/create-password/{id}/{token}', "Auth\CreatePasswordController@createPassword")->name("auth.create-password");
35 });
36
37 Route::group(['middleware' => "checkVerifyNewEmail"], function () {
38 Route::get('/verify/{id}/{token}', "Auth\VerifyNewEmailController@create")->name("auth.verifyShow");
39 Route::post('/verify/{id}/{token}', "Auth\VerifyNewEmailController@verify")->name("auth.verify");
40 });
41
[2fc88ec]42});
[194a359]43
44////////////////////
45// Dashboard Routes
46////////////////////
47Route::group(['prefix' => 'dashboard', 'middleware' => ["auth", "checkIsActive"]], function () {
48
49 Route::get("/", "Dashboard\IndexController@index")->name("dashboard.index");
50
[d795fa6]51 // Settings
[194a359]52 Route::get("/settings", "Dashboard\SettingsController@settings")->name("dashboard.settings.index");
53 Route::patch("/settings/personal", "Dashboard\SettingsController@updatePersonalInformation")->name("dashboard.settings.personal");
54 Route::patch("/settings/username", "Dashboard\SettingsController@updateUsername")->name("dashboard.settings.username");
55 Route::patch("/settings/password", "Dashboard\SettingsController@updatePassword")->name("dashboard.settings.password");
56 Route::patch("/settings/email", "Dashboard\SettingsController@updateEmail")->name("dashboard.settings.email");
57
58
59 // Users
[24a616f]60 Route::group(['middleware' => 'permission:manage_all_users'], function () {
[194a359]61 Route::get("/users", "Dashboard\UsersController@index")->name("dashboard.users.index");
62 Route::patch("/users/{id}/block", "Dashboard\UsersController@block")->name("dashboard.users.block");
63 Route::patch("/users/{id}/unblock", "Dashboard\UsersController@unblock")->name("dashboard.users.unblock");
64 Route::delete("/users/{id}/destroy", "Dashboard\UsersController@destroy")->name("dashboard.users.destroy");
65 });
66
67 Route::group(['middleware' => 'permission:create_user'], function () {
68 Route::get("/users/create", "Dashboard\UsersController@create")->name("dashboard.users.create");
69 Route::post("/users/store", "Dashboard\UsersController@store")->name("dashboard.users.store");
70 Route::get("/users/{id}/edit", "Dashboard\UsersController@editShow")->name("dashboard.users.editShow");
71 Route::patch("/users/{id}/edit", "Dashboard\UsersController@edit")->name("dashboard.users.edit");
72 Route::patch("/users/{id}/editUserData", "Dashboard\UsersController@editUserData")->name("dashboard.users.editUserData");
73 });
74
75 // Departments
[24a616f]76 Route::group(['middleware' => 'permission:manage_all_departments'], function () {
[d795fa6]77 Route::get("/departments", "Dashboard\DepartmentsController@index")->name("dashboard.departments.index");
78 Route::get("/departments/create", "Dashboard\DepartmentsController@create")->name("dashboard.departments.create");
79 Route::post("/departments/store", "Dashboard\DepartmentsController@store")->name("dashboard.departments.store");
80 Route::get("/departments/{id}/edit", "Dashboard\DepartmentsController@editShow")->name("dashboard.departments.editShow");
81 Route::patch("/departments/{id}/edit", "Dashboard\DepartmentsController@edit")->name("dashboard.departments.edit");
[194a359]82 Route::delete("/departments/{id}/destroy", "Dashboard\DepartmentsController@destroy")->name("dashboard.departments.destroy");
83 });
84
[24a616f]85 // Documents
86 Route::get("/documents", "Dashboard\DocumentsController@index")->name("dashboard.documents.index");
87 Route::get("/documents/create", "Dashboard\DocumentsController@create")->name("dashboard.documents.create");
88 Route::post("/documents/store", "Dashboard\DocumentsController@store")->name("dashboard.documents.store");
89 Route::get("/documents/{id}/edit", "Dashboard\DocumentsController@editShow")->name("dashboard.documents.editShow");
90 Route::patch("/documents/{id}/edit", "Dashboard\DocumentsController@edit")->name("dashboard.documents.edit");
91 Route::patch("/documents/{id}/block", "Dashboard\DocumentsController@block")->name("dashboard.documents.block");
92 Route::patch("/documents/{id}/unblock", "Dashboard\DocumentsController@unblock")->name("dashboard.documents.unblock");
93 Route::patch("/documents/{id}/confirm", "Dashboard\DocumentsController@confirm")->name("dashboard.documents.confirm");
94 Route::delete("/documents/{id}/destroy", "Dashboard\DocumentsController@destroy")->name("dashboard.documents.destroy");
[e6c1f87]95 Route::patch('/documents/toggle-important/{id}', "Dashboard\DocumentsController@toggleImportant")->name("dashboard.documents.toggleImportant");
[ea7b12a]96 Route::delete("documents/{id}/deleteFile", "Dashboard\DocumentsController@deleteFile")->name("dashboard.documents.deleteFile");
97 Route::get("documents/{id}/downloadFile", "Dashboard\DocumentsController@downloadFile")->name("dashboard.documents.downloadFile");
98 Route::patch("documents/{id}/renameFile", "Dashboard\DocumentsController@renameFile")->name("dashboard.documents.renameFile");
[194a359]99});
Note: See TracBrowser for help on using the repository browser.