[0924b6c] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | /*
|
---|
| 4 | |--------------------------------------------------------------------------
|
---|
| 5 | | Web Routes
|
---|
| 6 | |--------------------------------------------------------------------------
|
---|
| 7 | |
|
---|
| 8 | | Here is where you can register web routes for your application. These
|
---|
| 9 | | routes are loaded by the RouteServiceProvider within a group which
|
---|
| 10 | | contains the "web" middleware group. Now create something great!
|
---|
| 11 | |
|
---|
| 12 | */
|
---|
| 13 |
|
---|
| 14 | Route::get('/', "Blog\BlogController@index")->name("blog.index");
|
---|
| 15 | Route::get('/about', "Blog\BlogController@about")->name("blog.about");
|
---|
| 16 | Route::get('/category/{category}', "Blog\BlogController@showCategory")->name("blog.category");
|
---|
| 17 | Route::get('/category/{category}/{slug}', "Blog\BlogController@showPost")->name("blog.post");
|
---|
| 18 | Route::get("/profile/{profileLink}", "Blog\BlogController@showProfile")->name("blog.user-profile");
|
---|
| 19 | Route::get("/tag/{tag}", "Blog\BlogController@showTagPosts")->name("blog.tag");
|
---|
| 20 | Route::get("/search", "Blog\SearchController@search")->name("blog.search");
|
---|
| 21 |
|
---|
[f457265] | 22 | Route::post("/company/store", "Blog\BlogController@storeCompany")->name("blog.company.store");
|
---|
| 23 |
|
---|
[0924b6c] | 24 | Route::post("/comment", "Blog\BlogController@comment")->name("blog.comment");
|
---|
| 25 | Route::post("/like", "Blog\BlogController@like")->name("blog.like");
|
---|
| 26 | Route::post("/unlike", "Blog\BlogController@unlike")->name("blog.unlike");
|
---|
| 27 |
|
---|
| 28 | ////////////////////
|
---|
| 29 | // Auth Routes
|
---|
| 30 | ////////////////////
|
---|
| 31 | Route::prefix('auth')->group(function () {
|
---|
| 32 |
|
---|
[f457265] | 33 | Route::get('/login', "Auth\LoginController@showLogin")->name("auth.loginShow");
|
---|
| 34 | Route::post('/login', "Auth\LoginController@login")->name("auth.login");
|
---|
| 35 | Route::post('/logout', "Auth\LoginController@logout")->name("auth.logout");
|
---|
[0924b6c] | 36 |
|
---|
[f457265] | 37 | Route::get('/forgot', "Auth\ForgotPasswordController@showForgotPassword")->name("auth.forgotShow");
|
---|
| 38 | Route::post('/forgot', "Auth\ForgotPasswordController@forgotPassword")->name("auth.forgot");
|
---|
[0924b6c] | 39 |
|
---|
[f457265] | 40 | Route::group(['middleware' => "createPassword"], function () {
|
---|
| 41 | Route::get('/create-password/{id}/{token}', "Auth\CreatePasswordController@showCreatePassword")->name("auth.create-password-show");
|
---|
| 42 | Route::post('/create-password/{id}/{token}', "Auth\CreatePasswordController@createPassword")->name("auth.create-password");
|
---|
| 43 | });
|
---|
[0924b6c] | 44 |
|
---|
[f457265] | 45 | Route::group(['middleware' => "checkVerifyNewEmail"], function () {
|
---|
| 46 | Route::get('/verify/{id}/{token}', "Auth\VerifyNewEmailController@create")->name("auth.verifyShow");
|
---|
| 47 | Route::post('/verify/{id}/{token}', "Auth\VerifyNewEmailController@verify")->name("auth.verify");
|
---|
| 48 | });
|
---|
[0924b6c] | 49 |
|
---|
| 50 | });
|
---|
| 51 |
|
---|
| 52 | ////////////////////
|
---|
| 53 | // Dashboard Routes
|
---|
| 54 | ////////////////////
|
---|
| 55 |
|
---|
| 56 | Route::group(['prefix' => 'dashboard', 'middleware' => ["auth", "checkIsActive"]], function () {
|
---|
| 57 |
|
---|
[f457265] | 58 | Route::get("/", "Dashboard\IndexController@index")->name("dashboard.index");
|
---|
[0924b6c] | 59 |
|
---|
[f457265] | 60 | // Settings
|
---|
| 61 | Route::get("/settings", "Dashboard\SettingsController@settings")->name("dashboard.settings.index");
|
---|
| 62 | Route::patch("/settings/personal", "Dashboard\SettingsController@updatePersonalInformation")->name("dashboard.settings.personal");
|
---|
| 63 | Route::patch("/settings/photos", "Dashboard\SettingsController@updatePhotos")->name("dashboard.settings.photos");
|
---|
| 64 | Route::patch("/settings/social", "Dashboard\SettingsController@updateSocialLinks")->name("dashboard.settings.social");
|
---|
| 65 | Route::patch("/settings/username", "Dashboard\SettingsController@updateUsername")->name("dashboard.settings.username");
|
---|
| 66 | Route::patch("/settings/password", "Dashboard\SettingsController@updatePassword")->name("dashboard.settings.password");
|
---|
| 67 | Route::patch("/settings/email", "Dashboard\SettingsController@updateEmail")->name("dashboard.settings.email");
|
---|
| 68 | Route::post("/settings/transfer/", "Dashboard\SettingsController@transferPostsAndDeleteUser")->name("dashboard.settings.transfer");
|
---|
[0924b6c] | 69 |
|
---|
[d25ba66] | 70 | // Settings => Phases
|
---|
| 71 | Route::post("/settings/phase/store", "Dashboard\SettingsController@phaseStore")->name("dashboard.settings.phase.store");
|
---|
| 72 | Route::delete("/settings/phase/{id}", "Dashboard\SettingsController@phaseDestroy")
|
---|
| 73 | ->name("dashboard.settings.phase.destroy")
|
---|
| 74 | ->middleware("permission:delete_phase");
|
---|
| 75 |
|
---|
| 76 | // Settings => Post Security
|
---|
| 77 | Route::post("/settings/post-security/store", "Dashboard\SettingsController@postSecurityStore")->name("dashboard.settings.post-security.store");
|
---|
| 78 | Route::delete("/settings/post-security/{id}", "Dashboard\SettingsController@postSecurityDestroy")
|
---|
| 79 | ->name("dashboard.settings.post-security.destroy")
|
---|
| 80 | ->middleware("permission:delete_post_securities");
|
---|
| 81 |
|
---|
[f457265] | 82 | // Users
|
---|
| 83 | Route::group(['middleware' => 'permission:access_all_users'], function () {
|
---|
| 84 | Route::get("/users", "Dashboard\UsersController@index")->name("dashboard.users.index");
|
---|
| 85 | Route::patch("/users/{id}/block", "Dashboard\UsersController@block")->name("dashboard.users.block");
|
---|
| 86 | Route::patch("/users/{id}/unblock", "Dashboard\UsersController@unblock")->name("dashboard.users.unblock");
|
---|
| 87 | Route::delete("/users/{id}/destroy", "Dashboard\UsersController@destroy")->name("dashboard.users.destroy");
|
---|
| 88 | });
|
---|
| 89 |
|
---|
| 90 | Route::group(['middleware' => 'permission:create_user'], function () {
|
---|
| 91 | Route::get("/users/create", "Dashboard\UsersController@create")->name("dashboard.users.create");
|
---|
| 92 | Route::post("/users/store", "Dashboard\UsersController@store")->name("dashboard.users.store");
|
---|
| 93 | });
|
---|
| 94 |
|
---|
| 95 | // Posts
|
---|
| 96 | Route::get("/posts", "Dashboard\PostsController@index")->name("dashboard.posts.index");
|
---|
| 97 | Route::get("/posts/create", "Dashboard\PostsController@create")->name("dashboard.posts.create");
|
---|
| 98 | Route::post("/posts/store", "Dashboard\PostsController@store")->name("dashboard.posts.store");
|
---|
| 99 | Route::get("/posts/{id}/edit", "Dashboard\PostsController@editShow")->name("dashboard.posts.editShow");
|
---|
| 100 | Route::patch("/posts/{id}/edit", "Dashboard\PostsController@edit")->name("dashboard.posts.edit");
|
---|
| 101 | Route::patch("/posts/{id}/block", "Dashboard\PostsController@block")->name("dashboard.posts.block");
|
---|
| 102 | Route::patch("/posts/{id}/unblock", "Dashboard\PostsController@unblock")->name("dashboard.posts.unblock");
|
---|
| 103 | Route::patch("/posts/{id}/confirm", "Dashboard\PostsController@confirm")->name("dashboard.posts.confirm");
|
---|
| 104 | Route::delete("/posts/{id}/destroy", "Dashboard\PostsController@destroy")->name("dashboard.posts.destroy");
|
---|
| 105 |
|
---|
| 106 | // Categories
|
---|
| 107 | Route::group(['middleware' => 'permission:access_all_categories'], function () {
|
---|
| 108 | Route::get("/categories", "Dashboard\CategoriesController@index")->name("dashboard.categories.index");
|
---|
| 109 | Route::get("/categories/create", "Dashboard\CategoriesController@create")->name("dashboard.categories.create");
|
---|
| 110 | Route::post("/categories/store", "Dashboard\CategoriesController@store")->name("dashboard.categories.store");
|
---|
| 111 | Route::get("/categories/{id}/edit", "Dashboard\CategoriesController@editShow")->name("dashboard.categories.editShow");
|
---|
| 112 | Route::patch("/categories/{id}/edit", "Dashboard\CategoriesController@edit")->name("dashboard.categories.edit");
|
---|
| 113 | Route::patch("/categories/{id}/block", "Dashboard\CategoriesController@block")->name("dashboard.categories.block");
|
---|
| 114 | Route::patch("/categories/{id}/unblock", "Dashboard\CategoriesController@unblock")->name("dashboard.categories.unblock");
|
---|
| 115 | Route::delete("/categories/{id}/destroy", "Dashboard\CategoriesController@destroy")->name("dashboard.categories.destroy");
|
---|
| 116 | });
|
---|
| 117 |
|
---|
| 118 | // Comments
|
---|
| 119 | Route::get("/comments", "Dashboard\CommentsController@index")->name("dashboard.comments.index");
|
---|
| 120 | Route::patch("/comments/{id}/confirm", "Dashboard\CommentsController@confirm")->name("dashboard.comments.confirm");
|
---|
| 121 | Route::delete("/comments/{id}/destroy", "Dashboard\CommentsController@destroy")->name("dashboard.comments.destroy");
|
---|
| 122 |
|
---|
| 123 | // Tags
|
---|
[0924b6c] | 124 | Route::get("/tags", "Dashboard\TagsController@index")->name("dashboard.tags.index");
|
---|
| 125 | Route::delete("/tags/{id}/destroy", "Dashboard\TagsController@destroy")->name("dashboard.tags.destroy");
|
---|
| 126 |
|
---|
[f457265] | 127 | // Companies
|
---|
| 128 | Route::get("/companies", "Dashboard\CompaniesController@index")->name("dashboard.companies.index");
|
---|
| 129 | Route::get("/companies/{id}/create-admin/", "Dashboard\CompaniesController@createAdmin")->name("dashboard.companies.create-admin");
|
---|
| 130 | Route::post("/companies/store-admin", "Dashboard\CompaniesController@storeAdmin")->name("dashboard.companies.store-admin");
|
---|
| 131 | Route::delete("/companies/{id}/destroy", "Dashboard\CompaniesController@destroy")->name("dashboard.companies.destroy");
|
---|
| 132 |
|
---|
| 133 | // Notifications
|
---|
[0924b6c] | 134 | Route::get("/notifications", "Dashboard\NotificationsController@notifications")->name("dashboard.notifications.index");
|
---|
| 135 | Route::post("/get-notifications", "Dashboard\NotificationsController@showNotifications")->name("dashboard.notifications.store");
|
---|
| 136 | });
|
---|