source: routes/web.php@ c5e383e

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

added db and storage backup

  • Property mode set to 100644
File size: 7.7 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
[83da0d2]20Route::get('/offline', function () {
21 return view('vendor/laravelpwa/offline');
22});
23
[7304c7f]24////////////////////
25// Auth Routes
26////////////////////
[1c25bcf]27Route::group(['prefix' => 'auth'], function () {
[7304c7f]28
[0a1fb54]29 Route::get('/login', "Auth\LoginController@showLogin")->name("auth.showLogin");
[1c25bcf]30 Route::get('/verify-login/{id}/{token}', "Auth\VerifyLoginController@index")->middleware("CheckVerifyToken")->name("verify-login.index");
31 Route::post('/verify-login/{id}/{token}', "Auth\VerifyLoginController@verify")->name("verify-login");
[7304c7f]32 Route::post('/login', "Auth\LoginController@login")->name("auth.login");
33 Route::post('/logout', "Auth\LoginController@logout")->name("auth.logout");
34
35 Route::get('/forgot', "Auth\ForgotPasswordController@showForgotPassword")->name("auth.forgotShow");
36 Route::post('/forgot', "Auth\ForgotPasswordController@forgotPassword")->name("auth.forgot");
37
38 Route::group(['middleware' => "createPassword"], function () {
[c5e383e]39 Route::get('/new-password/{id}/{token}', "Auth\CreatePasswordController@showCreatePassword")->name("auth.new-password-show");
40 Route::post('/new-password/{id}/{token}', "Auth\CreatePasswordController@createPassword")->name("auth.new-password");
[7304c7f]41 });
42
[0a1fb54]43 Route::group(['middleware' => "checkVerifyNewEmail"], function () {
44 Route::get('/verify/{id}/{token}', "Auth\VerifyNewEmailController@create")->name("auth.verifyShow");
45 Route::post('/verify/{id}/{token}', "Auth\VerifyNewEmailController@verify")->name("auth.verify");
46 });
[2fc88ec]47});
[194a359]48
49////////////////////
50// Dashboard Routes
51////////////////////
52Route::group(['prefix' => 'dashboard', 'middleware' => ["auth", "checkIsActive"]], function () {
53
54 Route::get("/", "Dashboard\IndexController@index")->name("dashboard.index");
55
[d795fa6]56 // Settings
[194a359]57 Route::get("/settings", "Dashboard\SettingsController@settings")->name("dashboard.settings.index");
58 Route::patch("/settings/username", "Dashboard\SettingsController@updateUsername")->name("dashboard.settings.username");
59 Route::patch("/settings/password", "Dashboard\SettingsController@updatePassword")->name("dashboard.settings.password");
60 Route::patch("/settings/email", "Dashboard\SettingsController@updateEmail")->name("dashboard.settings.email");
[0df7a93]61 Route::patch("/users/{id}/editUserData", "Dashboard\UsersController@editUserData")->name("dashboard.users.editUserData");
[194a359]62
[0df7a93]63 //Settings File Validations
64 Route::group(['middleware' => 'permission:manage_file_types'], function () {
65 Route::patch("/settings/file-types", "Dashboard\SettingsController@fileTypes")->name("dashboard.settings.file-types");
66 });
[194a359]67
[0df7a93]68 // Users view
69 Route::group(['middleware' => 'permission:view_all_users'], function () {
[194a359]70 Route::get("/users", "Dashboard\UsersController@index")->name("dashboard.users.index");
71 });
72
[0df7a93]73 Route::group(['middleware' => 'permission:manage_all_users'], function () {
[194a359]74 Route::get("/users/create", "Dashboard\UsersController@create")->name("dashboard.users.create");
75 Route::post("/users/store", "Dashboard\UsersController@store")->name("dashboard.users.store");
76 Route::get("/users/{id}/edit", "Dashboard\UsersController@editShow")->name("dashboard.users.editShow");
77 Route::patch("/users/{id}/edit", "Dashboard\UsersController@edit")->name("dashboard.users.edit");
[0df7a93]78 Route::patch("/users/{id}/block", "Dashboard\UsersController@block")->name("dashboard.users.block");
79 Route::patch("/users/{id}/unblock", "Dashboard\UsersController@unblock")->name("dashboard.users.unblock");
80 Route::delete("/users/{id}/destroy", "Dashboard\UsersController@destroy")->name("dashboard.users.destroy");
81 });
[194a359]82
[0df7a93]83 // Departments view
84 Route::group(['middleware' => 'permission:view_all_departments'], function () {
[d795fa6]85 Route::get("/departments", "Dashboard\DepartmentsController@index")->name("dashboard.departments.index");
[0df7a93]86 });
87
88 // Departments manage
89 Route::group(['middleware' => 'permission:manage_all_departments'], function () {
[0a1fb54]90 Route::post("/departments/store", "Dashboard\DepartmentsController@store")->name("dashboard.departments.store");
91 Route::patch("/departments/{id}/edit", "Dashboard\DepartmentsController@edit")->name("dashboard.departments.edit");
[0df7a93]92 });
93
94 // Folders view
95 Route::group(['middleware' => 'permission:view_all_folders'], function () {
96 Route::get("/folders", "Dashboard\FoldersController@index")->name("dashboard.folders.index");
97 Route::get('/folders/{id}/files', 'Dashboard\FoldersController@files')->name('dashboard.folders.files');
[194a359]98 });
99
[0df7a93]100 // Folders manage
101 Route::group(['middleware' => 'permission:manage_all_folders'], function () {
102 Route::get("/folders/create", "Dashboard\FoldersController@create")->name("dashboard.folders.create");
103 Route::post("/folders/store", "Dashboard\FoldersController@store")->name("dashboard.folders.store");
104 Route::get("/folders/{id}/edit", "Dashboard\FoldersController@editShow")->name("dashboard.folders.editShow");
[4521f25]105 Route::post("/folders/{id}/upload", "Dashboard\FoldersController@uploadFiles")->name("dashboard.folders.uploadFiles");
[0df7a93]106 });
107
108 // Files view
109 Route::group(['middleware' => 'permission:view_all_files'], function () {
[c6b84df]110 Route::get("files", "Dashboard\FilesController@index")->name("dashboard.files.index");
[0df7a93]111 });
112
113 //Files manage
114Route::group(['middleware' => 'permission:manage_all_files'], function () {
[c6b84df]115 Route::post("/files/store", "Dashboard\FilesController@store")->name("dashboard.files.store");
[0df7a93]116 });
117
118 //Export data
119 Route::group(['middleware' => 'permission:export_data'], function () {
120 Route::get('files/export', 'Dashboard\ExportExcelController@ExportFiles')->name("dashboard.files.export");
121 Route::get('folders/export', 'Dashboard\ExportExcelController@ExportFolders')->name("dashboard.folders.export");
122 Route::get('departments/export', 'Dashboard\ExportExcelController@ExportDepartments')->name("dashboard.departments.export");
[1c25bcf]123 Route::get('users/export', 'Dashboard\ExportExcelController@ExportUsers')->name("dashboard.users.export");
[0df7a93]124 });
[c6b84df]125
[0df7a93]126 //Download data
127 Route::group(['middleware' => 'permission:download_data'], function () {
128 Route::get('/departments/download-all', 'Dashboard\DepartmentsController@downloadAll')->name('dashboard.departments.downloadAll');
129 Route::get("files/{id}/download-file", "Dashboard\FilesController@downloadFile")->name("dashboard.files.downloadFile");
130 Route::get('/folders/{id}/download-folder', 'Dashboard\FoldersController@downloadFolder')->name('dashboard.folders.downloadFolder');
131 Route::get('/departments/{id}/download-department', 'Dashboard\DepartmentsController@downloadDepartment')->name('dashboard.departments.downloadDepartment');
132 });
[190db9f]133
134 //Delete data
135 Route::group(['middleware' => 'permission:delete_data'], function() {
136 Route::delete("files/{id}/delete-file", "Dashboard\FilesController@deleteFile")->name("dashboard.files.deleteFile");
137 Route::delete("/folders/{id}/destroy", "Dashboard\FoldersController@destroy")->name("dashboard.folders.destroy");
138 Route::delete("/departments/{id}/destroy", "Dashboard\DepartmentsController@destroy")->name("dashboard.departments.destroy");
139 });
[194a359]140});
Note: See TracBrowser for help on using the repository browser.