Changeset 0df7a93 for routes


Ignore:
Timestamp:
10/24/21 20:55:11 (3 years ago)
Author:
beratkjufliju <kufliju@…>
Branches:
develop, master
Children:
7043def
Parents:
e0d3f94
Message:

bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • routes/web.php

    re0d3f94 r0df7a93  
    5555    // Settings
    5656    Route::get("/settings", "Dashboard\SettingsController@settings")->name("dashboard.settings.index");
    57     Route::patch("/settings/personal", "Dashboard\SettingsController@updatePersonalInformation")->name("dashboard.settings.personal");
    5857    Route::patch("/settings/username", "Dashboard\SettingsController@updateUsername")->name("dashboard.settings.username");
    5958    Route::patch("/settings/password", "Dashboard\SettingsController@updatePassword")->name("dashboard.settings.password");
    6059    Route::patch("/settings/email", "Dashboard\SettingsController@updateEmail")->name("dashboard.settings.email");
    61     Route::patch("/settings/file-types", "Dashboard\SettingsController@fileTypes")->name("dashboard.settings.file-types");
     60    Route::patch("/users/{id}/editUserData", "Dashboard\UsersController@editUserData")->name("dashboard.users.editUserData");
    6261
    63 
    64     // Users
    65     Route::group(['middleware' => 'permission:manage_all_users'], function () {
    66         Route::get("/users", "Dashboard\UsersController@index")->name("dashboard.users.index");
    67         Route::patch("/users/{id}/block", "Dashboard\UsersController@block")->name("dashboard.users.block");
    68         Route::patch("/users/{id}/unblock", "Dashboard\UsersController@unblock")->name("dashboard.users.unblock");
    69         Route::delete("/users/{id}/destroy", "Dashboard\UsersController@destroy")->name("dashboard.users.destroy");
     62    //Settings File Validations
     63    Route::group(['middleware' => 'permission:manage_file_types'], function () {
     64        Route::patch("/settings/file-types", "Dashboard\SettingsController@fileTypes")->name("dashboard.settings.file-types");
    7065    });
    7166
    72         Route::group(['middleware' => 'permission:create_user'], function () {
     67    // Users view
     68    Route::group(['middleware' => 'permission:view_all_users'], function () {
     69        Route::get("/users", "Dashboard\UsersController@index")->name("dashboard.users.index");
     70    });
     71
     72    Route::group(['middleware' => 'permission:manage_all_users'], function () {
    7373        Route::get("/users/create", "Dashboard\UsersController@create")->name("dashboard.users.create");
    7474        Route::post("/users/store", "Dashboard\UsersController@store")->name("dashboard.users.store");
    7575        Route::get("/users/{id}/edit", "Dashboard\UsersController@editShow")->name("dashboard.users.editShow");
    7676        Route::patch("/users/{id}/edit", "Dashboard\UsersController@edit")->name("dashboard.users.edit");
    77         Route::patch("/users/{id}/editUserData", "Dashboard\UsersController@editUserData")->name("dashboard.users.editUserData");
     77        Route::patch("/users/{id}/block", "Dashboard\UsersController@block")->name("dashboard.users.block");
     78        Route::patch("/users/{id}/unblock", "Dashboard\UsersController@unblock")->name("dashboard.users.unblock");
     79        Route::delete("/users/{id}/destroy", "Dashboard\UsersController@destroy")->name("dashboard.users.destroy");
    7880        Route::get('users/export', 'Dashboard\ExportExcelController@ExportUsers')->name("dashboard.users.export");
    79         });
     81    });
    8082
    81     // Departments
     83    // Departments view
     84    Route::group(['middleware' => 'permission:view_all_departments'], function () {
     85        Route::get("/departments", "Dashboard\DepartmentsController@index")->name("dashboard.departments.index");
     86    });
     87
     88    // Departments manage
    8289    Route::group(['middleware' => 'permission:manage_all_departments'], function () {
    83         Route::get("/departments", "Dashboard\DepartmentsController@index")->name("dashboard.departments.index");
    8490        Route::get("/departments/create", "Dashboard\DepartmentsController@create")->name("dashboard.departments.create");
    8591        Route::post("/departments/store", "Dashboard\DepartmentsController@store")->name("dashboard.departments.store");
     
    8793        Route::patch("/departments/{id}/edit", "Dashboard\DepartmentsController@edit")->name("dashboard.departments.edit");
    8894        Route::delete("/departments/{id}/destroy", "Dashboard\DepartmentsController@destroy")->name("dashboard.departments.destroy");
    89         Route::get('/departments/download-all','Dashboard\DepartmentsController@downloadAll')->name('dashboard.departments.downloadAll');
    90         Route::get('/departments/{id}/download-department','Dashboard\DepartmentsController@downloadDepartment')->name('dashboard.departments.downloadDepartment');
     95     });
     96
     97    // Folders view
     98    Route::group(['middleware' => 'permission:view_all_folders'], function () {
     99        Route::get("/folders", "Dashboard\FoldersController@index")->name("dashboard.folders.index");
     100        Route::get('/folders/{id}/files', 'Dashboard\FoldersController@files')->name('dashboard.folders.files');
     101    });
     102
     103    // Folders manage
     104    Route::group(['middleware' => 'permission:manage_all_folders'], function () {
     105        Route::get("/folders/create", "Dashboard\FoldersController@create")->name("dashboard.folders.create");
     106        Route::post("/folders/store", "Dashboard\FoldersController@store")->name("dashboard.folders.store");
     107        Route::get("/folders/{id}/edit", "Dashboard\FoldersController@editShow")->name("dashboard.folders.editShow");
     108        Route::patch("/folders/{id}/edit", "Dashboard\FoldersController@edit")->name("dashboard.folders.edit");
     109        Route::patch("/folders/{id}/block", "Dashboard\FoldersController@block")->name("dashboard.folders.block");
     110        Route::patch("/folders/{id}/unblock", "Dashboard\FoldersController@unblock")->name("dashboard.folders.unblock");
     111        Route::patch("/folders/{id}/confirm", "Dashboard\FoldersController@confirm")->name("dashboard.folders.confirm");
     112        Route::delete("/folders/{id}/destroy", "Dashboard\FoldersController@destroy")->name("dashboard.folders.destroy");
     113        Route::patch('/folders/toggle-important/{id}', "Dashboard\FoldersController@toggleImportant")->name("dashboard.folders.toggleImportant");
     114    });
     115
     116    // Files view
     117    Route::group(['middleware' => 'permission:view_all_files'], function () {
     118    Route::get("files", "Dashboard\FilesController@index")->name("dashboard.files.index");
     119    });
     120
     121    //Files manage
     122Route::group(['middleware' => 'permission:manage_all_files'], function () {
     123    Route::patch("files/{id}/rename-file", "Dashboard\FilesController@renameFile")->name("dashboard.files.renameFile");
     124    Route::post("/files/store", "Dashboard\FilesController@store")->name("dashboard.files.store");
     125    Route::delete("files/{id}/delete-file", "Dashboard\FilesController@deleteFile")->name("dashboard.files.deleteFile");
     126    });
     127
     128    //Export data
     129    Route::group(['middleware' => 'permission:export_data'], function () {
     130        Route::get('files/export', 'Dashboard\ExportExcelController@ExportFiles')->name("dashboard.files.export");
     131        Route::get('folders/export', 'Dashboard\ExportExcelController@ExportFolders')->name("dashboard.folders.export");
    91132        Route::get('departments/export', 'Dashboard\ExportExcelController@ExportDepartments')->name("dashboard.departments.export");
    92133    });
    93134
    94     // Folders
    95     Route::get("/folders", "Dashboard\FoldersController@index")->name("dashboard.folders.index");
    96     Route::get("/folders/create", "Dashboard\FoldersController@create")->name("dashboard.folders.create");
    97     Route::post("/folders/store", "Dashboard\FoldersController@store")->name("dashboard.folders.store");
    98     Route::get("/folders/{id}/edit", "Dashboard\FoldersController@editShow")->name("dashboard.folders.editShow");
    99     Route::patch("/folders/{id}/edit", "Dashboard\FoldersController@edit")->name("dashboard.folders.edit");
    100     Route::patch("/folders/{id}/block", "Dashboard\FoldersController@block")->name("dashboard.folders.block");
    101     Route::patch("/folders/{id}/unblock", "Dashboard\FoldersController@unblock")->name("dashboard.folders.unblock");
    102     Route::patch("/folders/{id}/confirm", "Dashboard\FoldersController@confirm")->name("dashboard.folders.confirm");
    103     Route::delete("/folders/{id}/destroy", "Dashboard\FoldersController@destroy")->name("dashboard.folders.destroy");
    104     Route::patch('/folders/toggle-important/{id}', "Dashboard\FoldersController@toggleImportant")->name("dashboard.folders.toggleImportant");
    105     Route::get('/folders/{id}/download-folder','Dashboard\FoldersController@downloadFolder')->name('dashboard.folders.downloadFolder');
    106     Route::get('/folders/{id}/files','Dashboard\FoldersController@files')->name('dashboard.folders.files');
    107     Route::get('folders/export', 'Dashboard\ExportExcelController@ExportFolders')->name("dashboard.folders.export");
    108 
    109     // Files
    110     Route::get("files", "Dashboard\FilesController@index")->name("dashboard.files.index");
    111     Route::get("files/{id}/download-file", "Dashboard\FilesController@downloadFile")->name("dashboard.files.downloadFile");
    112     Route::patch("files/{id}/rename-file", "Dashboard\FilesController@renameFile")->name("dashboard.files.renameFile");
    113     Route::post("/files/store", "Dashboard\FilesController@store")->name("dashboard.files.store");
    114     Route::delete("files/{id}/delete-file", "Dashboard\FilesController@deleteFile")->name("dashboard.files.deleteFile");
    115     Route::get('files/export', 'Dashboard\ExportExcelController@ExportFiles')->name("dashboard.files.export");
    116 
     135    //Download data
     136    Route::group(['middleware' => 'permission:download_data'], function () {
     137        Route::get('/departments/download-all', 'Dashboard\DepartmentsController@downloadAll')->name('dashboard.departments.downloadAll');
     138        Route::get("files/{id}/download-file", "Dashboard\FilesController@downloadFile")->name("dashboard.files.downloadFile");
     139        Route::get('/folders/{id}/download-folder', 'Dashboard\FoldersController@downloadFolder')->name('dashboard.folders.downloadFolder');
     140        Route::get('/departments/{id}/download-department', 'Dashboard\DepartmentsController@downloadDepartment')->name('dashboard.departments.downloadDepartment');
     141    });
    117142});
Note: See TracChangeset for help on using the changeset viewer.