Changeset 194a359 for routes/web.php


Ignore:
Timestamp:
09/30/21 00:32:27 (3 years ago)
Author:
beratkjufliju <kufliju@…>
Branches:
develop, master
Children:
24a616f
Parents:
582789f
Message:

added departments, edited users and added user settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • routes/web.php

    r582789f r194a359  
    3737
    3838});
     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    Route::get("/settings", "Dashboard\SettingsController@settings")->name("dashboard.settings.index");
     48    Route::patch("/settings/personal", "Dashboard\SettingsController@updatePersonalInformation")->name("dashboard.settings.personal");
     49    Route::patch("/settings/username", "Dashboard\SettingsController@updateUsername")->name("dashboard.settings.username");
     50    Route::patch("/settings/password", "Dashboard\SettingsController@updatePassword")->name("dashboard.settings.password");
     51    Route::patch("/settings/email", "Dashboard\SettingsController@updateEmail")->name("dashboard.settings.email");
     52
     53
     54    // Users
     55    Route::group(['middleware' => 'permission:access_all_users'], function () {
     56        Route::get("/users", "Dashboard\UsersController@index")->name("dashboard.users.index");
     57        Route::patch("/users/{id}/block", "Dashboard\UsersController@block")->name("dashboard.users.block");
     58        Route::patch("/users/{id}/unblock", "Dashboard\UsersController@unblock")->name("dashboard.users.unblock");
     59        Route::delete("/users/{id}/destroy", "Dashboard\UsersController@destroy")->name("dashboard.users.destroy");
     60    });
     61
     62    Route::group(['middleware' => 'permission:create_user'], function () {
     63        Route::get("/users/create", "Dashboard\UsersController@create")->name("dashboard.users.create");
     64        Route::post("/users/store", "Dashboard\UsersController@store")->name("dashboard.users.store");
     65        Route::get("/users/{id}/edit", "Dashboard\UsersController@editShow")->name("dashboard.users.editShow");
     66        Route::patch("/users/{id}/edit", "Dashboard\UsersController@edit")->name("dashboard.users.edit");
     67        Route::patch("/users/{id}/editUserData", "Dashboard\UsersController@editUserData")->name("dashboard.users.editUserData");
     68    });
     69
     70    // Departments
     71    Route::group(['middleware' => 'permission:access_all_departments'], function () {
     72        Route::get("/departments", "Dashboard\departmentsController@index")->name("dashboard.departments.index");
     73        Route::get("/departments/create", "Dashboard\departmentsController@create")->name("dashboard.departments.create");
     74        Route::post("/departments/store", "Dashboard\departmentsController@store")->name("dashboard.departments.store");
     75        Route::get("/departments/{id}/edit", "Dashboard\departmentsController@editShow")->name("dashboard.departments.editShow");
     76        Route::patch("/departments/{id}/edit", "Dashboard\departmentsController@edit")->name("dashboard.departments.edit");
     77        Route::delete("/departments/{id}/destroy", "Dashboard\DepartmentsController@destroy")->name("dashboard.departments.destroy");
     78    });
     79
     80});
Note: See TracChangeset for help on using the changeset viewer.