[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 |
|
---|
| 22 | Route::post("/comment", "Blog\BlogController@comment")->name("blog.comment");
|
---|
| 23 | Route::post("/like", "Blog\BlogController@like")->name("blog.like");
|
---|
| 24 | Route::post("/unlike", "Blog\BlogController@unlike")->name("blog.unlike");
|
---|
| 25 |
|
---|
| 26 | ////////////////////
|
---|
| 27 | // Auth Routes
|
---|
| 28 | ////////////////////
|
---|
| 29 | Route::prefix('auth')->group(function () {
|
---|
| 30 |
|
---|
| 31 | Route::get('/login', "Auth\LoginController@showLogin")->name("auth.loginShow");
|
---|
| 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 () {
|
---|
| 39 | Route::get('/create-password/{id}/{token}', "Auth\CreatePasswordController@showCreatePassword")->name("auth.create-password-show");
|
---|
| 40 | Route::post('/create-password/{id}/{token}', "Auth\CreatePasswordController@createPassword")->name("auth.create-password");
|
---|
| 41 | });
|
---|
| 42 |
|
---|
| 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 | });
|
---|
| 47 |
|
---|
| 48 | });
|
---|
| 49 |
|
---|
| 50 | ////////////////////
|
---|
| 51 | // Dashboard Routes
|
---|
| 52 | ////////////////////
|
---|
| 53 |
|
---|
| 54 | Route::group(['prefix' => 'dashboard', 'middleware' => ["auth", "checkIsActive"]], function () {
|
---|
| 55 |
|
---|
| 56 | Route::get("/", "Dashboard\IndexController@index")->name("dashboard.index");
|
---|
| 57 |
|
---|
| 58 | Route::get("/settings", "Dashboard\SettingsController@settings")->name("dashboard.settings.index");
|
---|
| 59 | Route::patch("/settings/personal", "Dashboard\SettingsController@updatePersonalInformation")->name("dashboard.settings.personal");
|
---|
| 60 | Route::patch("/settings/photos", "Dashboard\SettingsController@updatePhotos")->name("dashboard.settings.photos");
|
---|
| 61 | Route::patch("/settings/social", "Dashboard\SettingsController@updateSocialLinks")->name("dashboard.settings.social");
|
---|
| 62 | Route::patch("/settings/username", "Dashboard\SettingsController@updateUsername")->name("dashboard.settings.username");
|
---|
| 63 | Route::patch("/settings/password", "Dashboard\SettingsController@updatePassword")->name("dashboard.settings.password");
|
---|
| 64 | Route::patch("/settings/email", "Dashboard\SettingsController@updateEmail")->name("dashboard.settings.email");
|
---|
| 65 | Route::post("/settings/transfer/", "Dashboard\SettingsController@transferPostsAndDeleteUser")->name("dashboard.settings.transfer");
|
---|
| 66 |
|
---|
| 67 | // Users
|
---|
| 68 | Route::group(['middleware' => 'permission:access_all_users'], function () {
|
---|
| 69 | Route::get("/users", "Dashboard\UsersController@index")->name("dashboard.users.index");
|
---|
| 70 | Route::patch("/users/{id}/block", "Dashboard\UsersController@block")->name("dashboard.users.block");
|
---|
| 71 | Route::patch("/users/{id}/unblock", "Dashboard\UsersController@unblock")->name("dashboard.users.unblock");
|
---|
| 72 | Route::delete("/users/{id}/destroy", "Dashboard\UsersController@destroy")->name("dashboard.users.destroy");
|
---|
| 73 | });
|
---|
| 74 |
|
---|
| 75 | Route::group(['middleware' => 'permission:create_user'], function () {
|
---|
| 76 | Route::get("/users/create", "Dashboard\UsersController@create")->name("dashboard.users.create");
|
---|
| 77 | Route::post("/users/store", "Dashboard\UsersController@store")->name("dashboard.users.store");
|
---|
| 78 | });
|
---|
| 79 |
|
---|
| 80 | // Posts
|
---|
| 81 | Route::get("/posts", "Dashboard\PostsController@index")->name("dashboard.posts.index");
|
---|
| 82 | Route::get("/posts/create", "Dashboard\PostsController@create")->name("dashboard.posts.create");
|
---|
| 83 | Route::post("/posts/store", "Dashboard\PostsController@store")->name("dashboard.posts.store");
|
---|
| 84 | Route::get("/posts/{id}/edit", "Dashboard\PostsController@editShow")->name("dashboard.posts.editShow");
|
---|
| 85 | Route::patch("/posts/{id}/edit", "Dashboard\PostsController@edit")->name("dashboard.posts.edit");
|
---|
| 86 | Route::patch("/posts/{id}/block", "Dashboard\PostsController@block")->name("dashboard.posts.block");
|
---|
| 87 | Route::patch("/posts/{id}/unblock", "Dashboard\PostsController@unblock")->name("dashboard.posts.unblock");
|
---|
| 88 | Route::patch("/posts/{id}/confirm", "Dashboard\PostsController@confirm")->name("dashboard.posts.confirm");
|
---|
| 89 | Route::delete("/posts/{id}/destroy", "Dashboard\PostsController@destroy")->name("dashboard.posts.destroy");
|
---|
| 90 |
|
---|
| 91 | // Categories
|
---|
| 92 | Route::group(['middleware' => 'permission:access_all_categories'], function () {
|
---|
| 93 | Route::get("/categories", "Dashboard\CategoriesController@index")->name("dashboard.categories.index");
|
---|
| 94 | Route::get("/categories/create", "Dashboard\CategoriesController@create")->name("dashboard.categories.create");
|
---|
| 95 | Route::post("/categories/store", "Dashboard\CategoriesController@store")->name("dashboard.categories.store");
|
---|
| 96 | Route::get("/categories/{id}/edit", "Dashboard\CategoriesController@editShow")->name("dashboard.categories.editShow");
|
---|
| 97 | Route::patch("/categories/{id}/edit", "Dashboard\CategoriesController@edit")->name("dashboard.categories.edit");
|
---|
| 98 | Route::patch("/categories/{id}/block", "Dashboard\CategoriesController@block")->name("dashboard.categories.block");
|
---|
| 99 | Route::patch("/categories/{id}/unblock", "Dashboard\CategoriesController@unblock")->name("dashboard.categories.unblock");
|
---|
| 100 | Route::delete("/categories/{id}/destroy", "Dashboard\CategoriesController@destroy")->name("dashboard.categories.destroy");
|
---|
| 101 | });
|
---|
| 102 |
|
---|
| 103 | // Comments
|
---|
| 104 | Route::get("/comments", "Dashboard\CommentsController@index")->name("dashboard.comments.index");
|
---|
| 105 | Route::patch("/comments/{id}/confirm", "Dashboard\CommentsController@confirm")->name("dashboard.comments.confirm");
|
---|
| 106 | Route::delete("/comments/{id}/destroy", "Dashboard\CommentsController@destroy")->name("dashboard.comments.destroy");
|
---|
| 107 |
|
---|
| 108 | // Tags
|
---|
| 109 | Route::get("/tags", "Dashboard\TagsController@index")->name("dashboard.tags.index");
|
---|
| 110 | Route::delete("/tags/{id}/destroy", "Dashboard\TagsController@destroy")->name("dashboard.tags.destroy");
|
---|
| 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 | });
|
---|