source: routes/web.php@ c6b84df

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

added fileTypes controller, notifications, excel export, edited views

  • Property mode set to 100644
File size: 7.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
16Route::get('/', function() {
17 return redirect()->route('dashboard.index');
18});
19
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
42});
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
51 // Settings
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 Route::patch("/settings/file-types", "Dashboard\SettingsController@fileTypes")->name("dashboard.settings.file-types");
58
59
60 // Users
61 Route::group(['middleware' => 'permission:manage_all_users'], function () {
62 Route::get("/users", "Dashboard\UsersController@index")->name("dashboard.users.index");
63 Route::patch("/users/{id}/block", "Dashboard\UsersController@block")->name("dashboard.users.block");
64 Route::patch("/users/{id}/unblock", "Dashboard\UsersController@unblock")->name("dashboard.users.unblock");
65 Route::delete("/users/{id}/destroy", "Dashboard\UsersController@destroy")->name("dashboard.users.destroy");
66 });
67
68 Route::group(['middleware' => 'permission:create_user'], function () {
69 Route::get("/users/create", "Dashboard\UsersController@create")->name("dashboard.users.create");
70 Route::post("/users/store", "Dashboard\UsersController@store")->name("dashboard.users.store");
71 Route::get("/users/{id}/edit", "Dashboard\UsersController@editShow")->name("dashboard.users.editShow");
72 Route::patch("/users/{id}/edit", "Dashboard\UsersController@edit")->name("dashboard.users.edit");
73 Route::patch("/users/{id}/editUserData", "Dashboard\UsersController@editUserData")->name("dashboard.users.editUserData");
74 Route::get('users/export', 'Dashboard\ExportExcelController@ExportUsers')->name("dashboard.users.export");
75 });
76
77 // Departments
78 Route::group(['middleware' => 'permission:manage_all_departments'], function () {
79 Route::get("/departments", "Dashboard\DepartmentsController@index")->name("dashboard.departments.index");
80 Route::get("/departments/create", "Dashboard\DepartmentsController@create")->name("dashboard.departments.create");
81 Route::post("/departments/store", "Dashboard\DepartmentsController@store")->name("dashboard.departments.store");
82 Route::get("/departments/{id}/edit", "Dashboard\DepartmentsController@editShow")->name("dashboard.departments.editShow");
83 Route::patch("/departments/{id}/edit", "Dashboard\DepartmentsController@edit")->name("dashboard.departments.edit");
84 Route::delete("/departments/{id}/destroy", "Dashboard\DepartmentsController@destroy")->name("dashboard.departments.destroy");
85 Route::get('/departments/download-all','Dashboard\DepartmentsController@downloadAll')->name('dashboard.departments.downloadAll');
86 Route::get('/departments/{id}/download-department','Dashboard\DepartmentsController@downloadDepartment')->name('dashboard.departments.downloadDepartment');
87 });
88
89 // Folders
90 Route::get("/folders", "Dashboard\FoldersController@index")->name("dashboard.folders.index");
91 Route::get("/folders/create", "Dashboard\FoldersController@create")->name("dashboard.folders.create");
92 Route::post("/folders/store", "Dashboard\FoldersController@store")->name("dashboard.folders.store");
93 Route::get("/folders/{id}/edit", "Dashboard\FoldersController@editShow")->name("dashboard.folders.editShow");
94 Route::patch("/folders/{id}/edit", "Dashboard\FoldersController@edit")->name("dashboard.folders.edit");
95 Route::patch("/folders/{id}/block", "Dashboard\FoldersController@block")->name("dashboard.folders.block");
96 Route::patch("/folders/{id}/unblock", "Dashboard\FoldersController@unblock")->name("dashboard.folders.unblock");
97 Route::patch("/folders/{id}/confirm", "Dashboard\FoldersController@confirm")->name("dashboard.folders.confirm");
98 Route::delete("/folders/{id}/destroy", "Dashboard\FoldersController@destroy")->name("dashboard.folders.destroy");
99 Route::patch('/folders/toggle-important/{id}', "Dashboard\FoldersController@toggleImportant")->name("dashboard.folders.toggleImportant");
100 Route::get('/folders/{id}/download-folder','Dashboard\FoldersController@downloadFolder')->name('dashboard.folders.downloadFolder');
101 Route::get('/folders/{id}/files','Dashboard\FoldersController@files')->name('dashboard.folders.files');
102 Route::get('folders/export', 'Dashboard\ExportExcelController@ExportFolders')->name("dashboard.folders.export");
103
104 // Files
105 Route::get("files", "Dashboard\FilesController@index")->name("dashboard.files.index");
106 Route::get("files/{id}/download-file", "Dashboard\FilesController@downloadFile")->name("dashboard.files.downloadFile");
107 Route::patch("files/{id}/rename-file", "Dashboard\FilesController@renameFile")->name("dashboard.files.renameFile");
108 Route::post("/files/store", "Dashboard\FilesController@store")->name("dashboard.files.store");
109 Route::delete("files/{id}/delete-file", "Dashboard\FilesController@deleteFile")->name("dashboard.files.deleteFile");
110 Route::get('files/export', 'Dashboard\ExportExcelController@ExportFiles')->name("dashboard.files.export");
111
112 // Notifications
113 Route::get("/notifications", "Dashboard\NotificationsController@notifications")->name("dashboard.notifications.index");
114 Route::post("/get-notifications", "Dashboard\NotificationsController@showNotifications")->name("dashboard.notifications.store");
115
116
117});
Note: See TracBrowser for help on using the repository browser.