Вход Регистрация
Файл: routes/web.php
Строк: 993
<?php

declare(strict_types=1);

use 
AppHttpControllersAdminAdminAdvertController;
use 
AppHttpControllersAdminAdminController;
use 
AppHttpControllersAdminAdvertController as AdminUserAdvertController;
use 
AppHttpControllersAdminAntimatController;
use 
AppHttpControllersAdminArticleController as AdminArticleController;
use 
AppHttpControllersAdminBackupController;
use 
AppHttpControllersAdminBanController as AdminBanController;
use 
AppHttpControllersAdminBanhistController;
use 
AppHttpControllersAdminBanlistController;
use 
AppHttpControllersAdminBlacklistController;
use 
AppHttpControllersAdminBoardController as AdminBoardController;
use 
AppHttpControllersAdminCacheController;
use 
AppHttpControllersAdminChatController;
use 
AppHttpControllersAdminCheckerController;
use 
AppHttpControllersAdminDeliveryController;
use 
AppHttpControllersAdminDelUserController;
use 
AppHttpControllersAdminErrorController;
use 
AppHttpControllersAdminFileController as AdminFileController;
use 
AppHttpControllersAdminForumController as AdminForumController;
use 
AppHttpControllersAdminGuestbookController as AdminGuestbookController;
use 
AppHttpControllersAdminInvitationController as AdminInvitationController;
use 
AppHttpControllersAdminIpBanController;
use 
AppHttpControllersAdminLoadController as AdminLoadController;
use 
AppHttpControllersAdminLogController;
use 
AppHttpControllersAdminModuleController;
use 
AppHttpControllersAdminNewsController as AdminNewsController;
use 
AppHttpControllersAdminNoticeController;
use 
AppHttpControllersAdminOfferController as AdminOfferController;
use 
AppHttpControllersAdminPaidAdvertController;
use 
AppHttpControllersAdminPhotoController as AdminPhotoController;
use 
AppHttpControllersAdminReglistController;
use 
AppHttpControllersAdminRuleController;
use 
AppHttpControllersAdminSettingController;
use 
AppHttpControllersAdminSpamController;
use 
AppHttpControllersAdminStatusController;
use 
AppHttpControllersAdminStickerController;
use 
AppHttpControllersAdminTransferController as AdminTransferController;
use 
AppHttpControllersAdminUserController as AdminUserController;
use 
AppHttpControllersAdminUserFieldController;
use 
AppHttpControllersAdminVoteController as AdminVoteController;
use 
AppHttpControllersAdvertController;
use 
AppHttpControllersAjaxController;
use 
AppHttpControllersApiController;
use 
AppHttpControllersArticleController;
use 
AppHttpControllersBoardController;
use 
AppHttpControllersContactController;
use 
AppHttpControllersCounterController;
use 
AppHttpControllersFileController;
use 
AppHttpControllersForumActiveController;
use 
AppHttpControllersForumBookmarkController;
use 
AppHttpControllersForumForumController;
use 
AppHttpControllersForumNewController;
use 
AppHttpControllersForumSearchController;
use 
AppHttpControllersForumTopicController;
use 
AppHttpControllersGuestbookController;
use 
AppHttpControllersHomeController;
use 
AppHttpControllersIgnoreController;
use 
AppHttpControllersInstallController;
use 
AppHttpControllersInvitationController;
use 
AppHttpControllersLoadActiveController as LoadActiveController;
use 
AppHttpControllersLoadDownController;
use 
AppHttpControllersLoadLoadController;
use 
AppHttpControllersLoadNewController as LoadNewController;
use 
AppHttpControllersLoadSearchController as LoadSearchController;
use 
AppHttpControllersLoadTopController;
use 
AppHttpControllersLoginController;
use 
AppHttpControllersMailController;
use 
AppHttpControllersMessageController;
use 
AppHttpControllersNewsController;
use 
AppHttpControllersNotebookController;
use 
AppHttpControllersOfferController;
use 
AppHttpControllersOnlineController;
use 
AppHttpControllersPageController;
use 
AppHttpControllersPhotoController;
use 
AppHttpControllersRatingController;
use 
AppHttpControllersSitemapController;
use 
AppHttpControllersSocialController;
use 
AppHttpControllersTransferController;
use 
AppHttpControllersUserBanController;
use 
AppHttpControllersUserListController;
use 
AppHttpControllersUserPictureController;
use 
AppHttpControllersUserSearchController as UserSearchController;
use 
AppHttpControllersUserUserController;
use 
AppHttpControllersVoteController;
use 
AppHttpControllersWallController;
use 
AppModelsModule;
use 
IlluminateSupportFacadesRoute;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

/*Route::get('/', function () {
    return view('welcome');
});*/
Route::pattern('id''d+');
Route::pattern('login''[w-]+');

Route::controller(HomeController::class)
    ->
group(function () {
        
Route::get('/''index');
        
Route::get('/closed''closed');
        
Route::get('/search''search');
        
Route::get('/captcha''captcha');
        
Route::get('/language/{lang}''language')->where('lang''[a-z]+');
        
Route::match(['get''post'], '/ipban''ipban');

        
Route::get('/403''error403');
        
Route::get('/404''error404');
    });

/* Карта сайта */
Route::controller(SitemapController::class)
    ->
group(function () {
        
Route::get('/sitemap.xml''index');
        
Route::get('/sitemap/{page}.xml''page')->where('page''[a-z]+');
    });

/* Категории объявления */
Route::controller(BoardController::class)
    ->
prefix('boards')
    ->
group(function () {
        
Route::get('/{id?}''index');
        
Route::get('/active''active');
    });

/* Объявления */
Route::controller(BoardController::class)
    ->
prefix('items')
    ->
group(function () {
        
Route::get('/{id}''view');
        
Route::get('/close/{id}''close');
        
Route::get('/delete/{id}''delete');
        
Route::match(['get''post'], '/create''create');
        
Route::match(['get''post'], '/edit/{id}''edit');
    });

/* Гостевая книга */
Route::controller(GuestbookController::class)
    ->
prefix('guestbook')
    ->
group(function () {
        
Route::get('/''index');
        
Route::post('/add''add');
        
Route::match(['get''post'], '/edit/{id}''edit');
    });

/* Категория блогов */
Route::controller(ArticleController::class)
    ->
prefix('blogs')
    ->
group(function () {
        
Route::get('/''index');
        
Route::get('/{id}''blog');
        
Route::get('/tags''tags');
        
Route::get('/tags/{tag}''searchTag')->where('tag''.+');
        
Route::get('/authors''authors');
        
Route::get('/active/articles''userArticles');
        
Route::get('/active/comments''userComments');
        
Route::get('/top''top');
        
Route::get('/rss''rss');
        
Route::match(['get''post'], '/create''create');
        
Route::match(['get''post'], '/search''search');
        
Route::get('/main''main');
    });

/* Статьи блогов */
Route::controller(ArticleController::class)
    ->
prefix('articles')
    ->
group(function () {
        
Route::get('/''newArticles');
        
Route::get('/{id}''view');
        
Route::get('/print/{id}''print');
        
Route::get('/rss/{id}''rssComments');
        
Route::get('/comments''newComments');
        
Route::get('/end/{id}''end');
        
Route::get('/comment/{id}/{cid}''viewComment')->whereNumber('cid');
        
Route::match(['get''post'], '/edit/{id}''edit');
        
Route::match(['get''post'], '/comments/{id}''comments');
        
Route::match(['get''post'], '/edit/{id}/{cid}''editComment')->whereNumber('cid');
    });

/* Новости */
Route::controller(NewsController::class)
    ->
prefix('news')
    ->
group(function () {
        
Route::get('/''index');
        
Route::get('/{id}''view');
        
Route::get('/end/{id}''end');
        
Route::get('/rss''rss');
        
Route::get('/allcomments''allComments');
        
Route::get('/comment/{id}/{cid}''viewComment')->whereNumber('cid');
        
Route::match(['get''post'], '/comments/{id}''comments');
        
Route::match(['get''post'], '/edit/{id}/{cid}''editComment')->whereNumber('cid');
    });

/* Галерея */
Route::controller(PhotoController::class)
    ->
prefix('photos')
    ->
group(function () {
        
Route::get('/''index');
        
Route::get('/{id}''view');
        
Route::get('/delete/{id}''delete');
        
Route::get('/end/{id}''end');
        
Route::get('/albums''albums');
        
Route::get('/albums/{login}''album');
        
Route::get('/comments''allComments');
        
Route::get('/comments/active/{login}''userComments');
        
Route::get('/comment/{id}/{cid}''viewComment')->whereNumber('cid');
        
Route::match(['get''post'], '/comments/{id}''comments');
        
Route::match(['get''post'], '/create''create');
        
Route::match(['get''post'], '/edit/{id}''edit');
        
Route::match(['get''post'], '/edit/{id}/{cid}''editComment')->whereNumber('cid');
        
Route::match(['get''post'], '/top''top');
    });

/* Категория форума */
Route::prefix('forums')->group(function () {
    
Route::get('/', [ForumController::class, 'index']);
    
Route::get('/{id}', [ForumController::class, 'forum']);
    
Route::get('/top/posts', [ForumController::class, 'topPosts']);
    
Route::get('/top/topics', [ForumController::class, 'topTopics']);
    
Route::get('/rss', [ForumController::class, 'rss']);
    
Route::match(['get''post'], '/create', [ForumController::class, 'create']);

    
Route::get('/search', [SearchController::class, 'index']);

    
Route::get('/active/posts', [ActiveController::class, 'posts']);
    
Route::get('/active/topics', [ActiveController::class, 'topics']);
    
Route::delete('/active/delete/{id}', [ActiveController::class, 'destroy']);

    
Route::get('/bookmarks', [BookmarkController::class, 'index']);
    
Route::post('/bookmarks/delete', [BookmarkController::class, 'delete']);
    
Route::post('/bookmarks/perform', [BookmarkController::class, 'perform']);
});

/* Темы форума */
Route::prefix('topics')->group(function () {
    
Route::get('/', [NewController::class, 'topics']);

    
Route::get('/{id}', [TopicController::class, 'index']);
    
Route::get('/{id}/{pid}', [TopicController::class, 'viewpost'])->whereNumber('pid');
    
Route::post('/votes/{id}', [TopicController::class, 'vote']);
    
Route::get('/end/{id}', [TopicController::class, 'end']);
    
Route::get('/open/{id}', [TopicController::class, 'open']);
    
Route::get('/close/{id}', [TopicController::class, 'close']);
    
Route::post('/create/{id}', [TopicController::class, 'create']);
    
Route::post('/delete/{id}', [TopicController::class, 'delete']);
    
Route::get('/print/{id}', [TopicController::class, 'print']);
    
Route::match(['get''post'], '/edit/{id}', [TopicController::class, 'edit']);

    
Route::get('/rss/{id}', [ForumController::class, 'rssPosts']);
});

/* Посты форума */
Route::prefix('posts')->group(function () {
    
Route::get('/', [NewController::class, 'posts']);
    
Route::match(['get''post'], '/edit/{id}', [TopicController::class, 'editPost']);
});

/* Категории загрузок */
Route::prefix('loads')->group(function () {
    
Route::get('/', [LoadController::class, 'index']);
    
Route::get('/rss', [LoadController::class, 'rss']);
    
Route::get('/{id}', [LoadController::class, 'load']);
    
Route::get('/top', [TopController::class, 'index']);
    
Route::get('/search', [LoadSearchController::class, 'index']);
});

/* Загрузки */
Route::prefix('downs')->group(function () {
    
Route::get('/', [LoadNewController::class, 'files']);
    
Route::get('/{id}', [DownController::class, 'index']);
    
Route::get('/delete/{id}/{fid}', [DownController::class, 'deleteFile'])->whereNumber('fid');
    
Route::post('/votes/{id}', [DownController::class, 'vote']);
    
Route::get('/comment/{id}/{cid}', [DownController::class, 'viewComment'])->whereNumber('cid');
    
Route::get('/end/{id}', [DownController::class, 'end']);
    
Route::get('/rss/{id}', [DownController::class, 'rss']);
    
Route::get('/zip/{id}', [DownController::class, 'zip']);
    
Route::get('/zip/{id}/{fid}', [DownController::class, 'zipView'])->whereNumber('fid');
    
Route::get('/comments', [LoadNewController::class, 'comments']);
    
Route::get('/active/files', [LoadActiveController::class, 'files']);
    
Route::get('/active/comments', [LoadActiveController::class, 'comments']);
    
Route::get('/download/{id}', [DownController::class, 'download']);
    
Route::get('/download/{id}/{lid}', [DownController::class, 'downloadLink'])->whereNumber('lid');
    
Route::match(['get''post'], '/edit/{id}', [DownController::class, 'edit']);
    
Route::match(['get''post'], '/create', [DownController::class, 'create']);
    
Route::match(['get''post'], '/comments/{id}', [DownController::class, 'comments']);
    
Route::match(['get''post'], '/edit/{id}/{cid}', [DownController::class, 'editComment'])->whereNumber('cid');
});

/* Предложения и проблемы */
Route::controller(OfferController::class)
    ->
prefix('offers')
    ->
group(function () {
        
Route::get('/{type?}''index')->where('type''offer|issue');
        
Route::get('/{id}''view');
        
Route::get('/end/{id}''end');
        
Route::get('/comment/{id}/{cid}''viewComment')->whereNumber('cid');
        
Route::match(['get''post'], '/create''create');
        
Route::match(['get''post'], '/edit/{id}''edit');
        
Route::match(['get''post'], '/comments/{id}''comments');
        
Route::match(['get''post'], '/edit/{id}/{cid}''editComment')->whereNumber('cid');
    });

/* Ajax */
Route::controller(AjaxController::class)
    ->
middleware(['check.user''check.ajax'])
    ->
prefix('ajax')
    ->
group(function () {
        
Route::get('/getstickers''getStickers');
        
Route::post('/bbcode''bbCode');
        
Route::post('/delcomment''delComment');
        
Route::post('/rating''rating');
        
Route::post('/vote''vote');
        
Route::post('/complaint''complaint');
        
Route::post('/file/upload''uploadFile');
        
Route::post('/file/delete''deleteFile');
        
Route::post('/set-theme''setTheme')->withoutMiddleware('check.user');
    });

/* Голосования */
Route::controller(VoteController::class)
    ->
prefix('votes')
    ->
group(function () {
        
Route::get('/''index');
        
Route::get('/voters/{id}''voters');
        
Route::get('/history''history');
        
Route::get('/history/{id}''viewHistory');
        
Route::match(['get''post'], '/{id}''view');
        
Route::match(['get''post'], '/create''create');
    });

/* Мои данные */
Route::controller(UserController::class)
    ->
prefix('accounts')
    ->
group(function () {
        
Route::get('/''account');
        
Route::get('/editmail''editMail');
        
Route::post('/changemail''changeMail');
        
Route::post('/editstatus''editStatus');
        
Route::post('/editcolor''editColor');
        
Route::post('/editpassword''editPassword');
        
Route::post('/apikey''apikey');
    });

/* Фото профиля */
Route::controller(PictureController::class)
    ->
prefix('pictures')
    ->
group(function () {
        
Route::match(['get''post'], '/''index');
        
Route::get('/delete''delete');
    });

/* Поиск пользователя */
Route::controller(UserSearchController::class)
    ->
prefix('searchusers')
    ->
group(function () {
        
Route::get('/''index');
        
Route::get('/sort/{letter}''sort')->where('letter''[0-9a-z]+');
        
Route::match(['get''post'], '/search''search');
    });

/* Социальные сети */
Route::controller(SocialController::class)
    ->
prefix('socials')
    ->
group(function () {
        
Route::match(['get''post'], '/''index');
        
Route::get('/delete/{id}''delete');
    });

/* Стена сообщений */
Route::controller(WallController::class)
    ->
prefix('walls')
    ->
group(function () {
        
Route::get('/{login}''index');
        
Route::post('/{login}/create''create');
        
Route::post('/{login}/delete''delete');
    });

/* Личные сообщения */
Route::controller(MessageController::class)
    ->
prefix('messages')
    ->
middleware('check.user')
    ->
group(function () {
        
Route::get('/''index');
        
Route::get('/new''newMessages');
        
Route::get('/talk/{login}''talk');
        
Route::get('/delete/{uid}''delete')->whereNumber('uid');
        
Route::match(['get''post'], '/send''send');
    });

/* Игнор-лист */
Route::controller(IgnoreController::class)
    ->
prefix('ignores')
    ->
group(function () {
        
Route::post('/delete''delete');
        
Route::match(['get''post'], '/''index');
        
Route::match(['get''post'], '/note/{id}''note');
    });

/* Контакт-лист */
Route::controller(ContactController::class)
    ->
prefix('contacts')
    ->
group(function () {
        
Route::post('/delete''delete');
        
Route::match(['get''post'], '/''index');
        
Route::match(['get''post'], '/note/{id}''note');
    });

/* Перевод денег */
Route::controller(TransferController::class)
    ->
prefix('transfers')
    ->
group(function () {
        
Route::get('/''index');
        
Route::post('/send''send');
    });

Route::controller(InvitationController::class)
    ->
prefix('invitations')
    ->
group(function () {
        
Route::get('/''index');
        
Route::post('/create''store');
    });

/* Личные заметки */
Route::controller(NotebookController::class)
    ->
prefix('notebooks')
    ->
group(function () {
        
Route::get('/''index');
        
Route::match(['get''post'], '/edit''edit');
    });

/* Реклама */
Route::controller(AdvertController::class)
    ->
prefix('adverts')
    ->
group(function () {
        
Route::get('/''index');
        
Route::match(['get''post'], '/create''create');
    });

/* Репутация пользователя */
Route::controller(RatingController::class)
    ->
prefix('ratings')
    ->
group(function () {
        
Route::get('/{login}/gave''gave');
        
Route::get('/{login}/{received?}''received');
        
Route::post('/delete''delete');
    });

/* API */
Route::get('/api', [ApiController::class, 'index']);

/* Бан */
Route::match(['get''post'], '/ban', [BanController::class, 'ban']);

/* Авторизации пользователя */
Route::get('/authlogs', [LoginController::class, 'index']);

/* Счетчики */
Route::get('/counters', [CounterController::class, 'index']);

/* Страницы сайта */
Route::get('/files/{page?}', [FileController::class, 'index'])->where('page''.+');

/* Рейтинг пользователей */
Route::prefix('users')
    ->
group(function () {
        
Route::match(['get''post'], '/', [ListController::class, 'userlist']);
        
Route::match(['get''post'], '/{login}/rating', [RatingController::class, 'index']);
    });

/* Профиль пользователя */
Route::controller(UserController::class)
    ->
prefix('users')
    ->
group(function () {
        
Route::get('/{login}''index');
        
Route::match(['get''post'], '/{login}/note''note');
    });

/* Почта */
Route::controller(MailController::class)
    ->
group(function () {
        
Route::get('/restore''restore');
        
Route::match(['get''post'], '/recovery''recovery');
        
Route::match(['get''post'], '/mails''index');
        
Route::match(['get''post'], '/unsubscribe''unsubscribe');
    });

/* Авторизация - регистрация */
Route::controller(UserController::class)
    ->
group(function () {
        
Route::get('/logout''logout');
        
Route::match(['get''post'], '/key''key');
        
Route::match(['get''post'], '/login''login');
        
Route::match(['get''post'], '/register''register');
        
Route::match(['get''post'], '/profile''profile');
        
Route::match(['get''post'], '/settings''setting');
        
Route::post('/check-login''checkLogin');
    });

/* Страницы сайта */
Route::controller(PageController::class)
    ->
group(function () {
        
Route::get('/faq''faq');
        
Route::get('/statusfaq''statusfaq');
        
Route::get('/surprise''surprise');
        
Route::get('/pages/{page?}''index')->where('page''[w-]+');
        
Route::get('/menu''menu');
        
Route::get('/tags''tags');
        
Route::get('/rules''rules');
        
Route::get('/stickers''stickers');
        
Route::get('/stickers/{id}''stickersCategory');
    });

/* Онлайн */
Route::controller(OnlineController::class)
    ->
prefix('online')
    ->
group(function () {
        
Route::get('/''index');
        
Route::get('/all''all');
    });

/* Админ-панель */
Route::prefix('admin')->middleware('check.admin')->group(function () {
    
Route::controller(AdminController::class)
        ->
group(function () {
            
Route::get('/''main');
            
Route::get('/upgrade''upgrade');
        });

    
/* Админ-чат */
    
Route::controller(ChatController::class)
        ->
prefix('chats')
        ->
group(function () {
            
Route::match(['get''post'], '/''index');
            
Route::match(['get''post'], '/edit/{id}''edit');
            
Route::get('/clear''clear');
        });

    
/* Гостевая */
    
Route::controller(AdminGuestbookController::class)
        ->
prefix('guestbook')
        ->
group(function () {
            
Route::get('/''index');
            
Route::match(['get''post'], '/edit/{id}''edit');
            
Route::match(['get''post'], '/reply/{id}''reply');
            
Route::post('/delete''delete');
            
Route::post('/publish''publish');
            
Route::get('/clear''clear');
        });

    
/* Форум */
    
Route::controller(AdminForumController::class)
        ->
prefix('forums')
        ->
group(function () {
            
Route::get('/''index');
            
Route::post('/create''create');
            
Route::match(['get''post'], '/edit/{id}''edit');
            
Route::get('/delete/{id}''delete');
            
Route::get('/restatement''restatement');
            
Route::get('/{id}''forum');
        });

    
/* Темы */
    
Route::controller(AdminForumController::class)
        ->
prefix('topics')
        ->
group(function () {
            
Route::match(['get''post'], '/edit/{id}''editTopic');
            
Route::match(['get''post'], '/move/{id}''moveTopic');
            
Route::get('/action/{id}''actionTopic');
            
Route::get('/delete/{id}''deleteTopic');
            
Route::get('/{id}''topic');
            
Route::get('/end/{id}''end');
        });

    
/* Посты */
    
Route::controller(AdminForumController::class)
        ->
prefix('posts')
        ->
group(function () {
            
Route::match(['get''post'], '/edit/{id}''editPost');
            
Route::post('/delete''deletePosts');
        });

    
/* Галерея */
    
Route::controller(AdminPhotoController::class)
        ->
prefix('photos')
        ->
group(function () {
            
Route::get('/''index');
            
Route::match(['get''post'], '/edit/{id}''edit');
            
Route::get('/restatement''restatement');
            
Route::get('/delete/{id}''delete');
        });

    
/* Блоги */
    
Route::controller(AdminArticleController::class)
        ->
prefix('blogs')
        ->
group(function () {
            
Route::get('/''index');
            
Route::post('/create''create');
            
Route::get('/restatement''restatement');
            
Route::match(['get''post'], '/edit/{id}''edit');
            
Route::get('/delete/{id}''delete');
            
Route::get('/{id}''blog');
        });

    
/* Статьи */
    
Route::controller(AdminArticleController::class)
        ->
prefix('articles')
        ->
group(function () {
            
Route::match(['get''post'], '/edit/{id}''editArticle');
            
Route::match(['get''post'], '/move/{id}''moveArticle');
            
Route::get('/delete/{id}''deleteArticle');
        });

    
/* Доска объявлений */
    
Route::controller(AdminBoardController::class)
        ->
prefix('boards')
        ->
group(function () {
            
Route::get('/{id?}''index');
            
Route::get('/restatement''restatement');
            
Route::get('/categories''categories');
            
Route::post('/create''create');
            
Route::match(['get''post'], '/edit/{id}''edit');
            
Route::get('/delete/{id}''delete');
        });

    
/* Объявления */
    
Route::controller(AdminBoardController::class)
        ->
prefix('items')
        ->
group(function () {
            
Route::match(['get''post'], '/edit/{id}''editItem');
            
Route::get('/delete/{id}''deleteItem');
        });

    
/* Админская реклама */
    
Route::match(['get''post'], '/admin-adverts', [AdminAdvertController::class, 'index']);

    
/* Пользовательская реклама */
    
Route::get('/adverts', [AdminUserAdvertController::class, 'index']);

    
/* Модер */
    
Route::middleware('check.admin:moder')->group(function () {
        
/* Жалобы */
        
Route::controller(SpamController::class)
            ->
prefix('spam')
            ->
group(function () {
                
Route::get('/''index');
                
Route::post('/delete''delete');
            });

        
/* Бан / разбан */
        
Route::controller(AdminBanController::class)
            ->
prefix('bans')
            ->
group(function () {
                
Route::get('/''index');
                
Route::match(['get''post'], '/edit''edit');
                
Route::match(['get''post'], '/change''change');
                
Route::get('/unban''unban');
            });

        
/* Забаненные */
        
Route::get('/banlists', [BanlistController::class, 'index']);

        
/* Ожидающие */
        
Route::match(['get''post'], '/reglists', [ReglistController::class, 'index']);

        
/* Голосования */
        
Route::controller(AdminVoteController::class)
            ->
prefix('votes')
            ->
group(function () {
                
Route::get('/''index');
                
Route::get('/history''history');
                
Route::match(['get''post'], '/edit/{id}''edit');
                
Route::get('/close/{id}''close');
                
Route::get('/delete/{id}''delete');
                
Route::get('/restatement''restatement');
            });

        
/* Антимат */
        
Route::controller(AntimatController::class)
            ->
prefix('antimat')
            ->
group(function () {
                
Route::match(['get''post'], '/''index');
                
Route::get('/delete''delete');
                
Route::get('/clear''clear');
            });

        
/* История банов */
        
Route::controller(BanhistController::class)
            ->
prefix('banhists')
            ->
group(function () {
                
Route::get('/''index');
                
Route::get('/view''view');
                
Route::post('/delete''delete');
            });

        
/* Приглашения */
        
Route::controller(AdminInvitationController::class)
            ->
prefix('invitations')
            ->
group(function () {
                
Route::get('/''index');
                
Route::match(['get''post'], '/create''create');
                
Route::post('/send''send');
                
Route::post('/mail''mail');
                
Route::post('/delete''delete');
            });

        
/* Денежный переводы*/
        
Route::controller(AdminTransferController::class)
            ->
prefix('transfers')
            ->
group(function () {
                
Route::get('/''index');
                
Route::get('/view''view');
            });
    });

    
/* Админ */
    
Route::middleware('check.admin:admin')->group(function () {
        
/* Правила */
        
Route::controller(RuleController::class)
            ->
prefix('rules')
            ->
group(function () {
                
Route::get('/''index');
                
Route::match(['get''post'], '/edit''edit');
            });

        
/* Новости */
        
Route::controller(AdminNewsController::class)
            ->
prefix('news')
            ->
group(function () {
                
Route::get('/''index');
                
Route::match(['get''post'], '/edit/{id}''edit');
                
Route::match(['get''post'], '/create''create');
                
Route::get('/restatement''restatement');
                
Route::get('/delete/{id}''delete');
            });

        
/* IP-бан */
        
Route::controller(IpBanController::class)
            ->
prefix('ipbans')
            ->
group(function () {
                
Route::match(['get''post'], '/''index');
                
Route::post('/delete''delete');
                
Route::get('/clear''clear');
            });

        
/* PHP-info */
        
Route::get('/phpinfo', [AdminController::class, 'phpinfo']);

        
/* Загрузки */
        
Route::controller(AdminLoadController::class)
            ->
group(function () {
                
Route::get('/loads''index');
                
Route::post('/loads/create''create');
                
Route::match(['get''post'], '/loads/edit/{id}''edit');
                
Route::get('/loads/delete/{id}''delete');
                
Route::get('/loads/restatement''restatement');
                
Route::get('/loads/{id}''load');

                
Route::match(['get''post'], '/downs/edit/{id}''editDown');
                
Route::match(['get''post'], '/downs/delete/{id}''deleteDown');
                
Route::get('/downs/delete/{id}/{fid}''deleteFile')->whereNumber('fid');
                
Route::get('/downs/new''new');
                
Route::get('/downs/publish/{id}''publish');
            });

        
/* Ошибки */
        
Route::controller(ErrorController::class)
            ->
prefix('errors')
            ->
group(function () {
                
Route::get('/''index');
                
Route::get('/clear''clear');
            });

        
/* Черный список */
        
Route::controller(BlacklistController::class)
            ->
prefix('blacklists')
            ->
group(function () {
                
Route::match(['get''post'], '/''index');
                
Route::post('/delete''delete');
            });

        
/* Предложения / проблемы */
        
Route::controller(AdminOfferController::class)
            ->
prefix('offers')
            ->
group(function () {
                
Route::get('/{type?}''index')->where('type''offer|issue');
                
Route::get('/{id}''view');
                
Route::match(['get''post'], '/edit/{id}''edit');
                
Route::match(['get''post'], '/reply/{id}''reply');
                
Route::get('/restatement''restatement');
                
Route::match(['get''post'], '/delete''delete');
            });

        
/* Стикеры */
        
Route::controller(StickerController::class)
            ->
prefix('stickers')
            ->
group(function () {
                
Route::get('/''index');
                
Route::get('/{id}''category');
                
Route::post('/create''create');
                
Route::match(['get''post'], '/edit/{id}''edit');
                
Route::get('/delete/{id}''delete');
                
Route::match(['get''post'], '/sticker/create''createSticker');
                
Route::match(['get''post'], '/sticker/edit/{id}''editSticker');
                
Route::get('/sticker/delete/{id}''deleteSticker');
            });

        
/* Статусы */
        
Route::controller(StatusController::class)
            ->
prefix('status')
            ->
group(function () {
                
Route::get('/''index');
                
Route::match(['get''post'], '/create''create');
                
Route::match(['get''post'], '/edit''edit');
                
Route::get('/delete''delete');
            });
    });

    
/* Босс */
    
Route::middleware('check.admin:boss')->group(function () {
        
/* Настройки */
        
Route::match(['get''post'], '/settings', [SettingController::class, 'index']);

        
/* Пользователи */
        
Route::controller(AdminUserController::class)
            ->
prefix('users')
            ->
group(function () {
                
Route::get('/''index');
                
Route::get('/search''search');
                
Route::match(['get''post'], '/edit''edit');
                
Route::match(['get''post'], '/delete''delete');
            });

        
/* Очистка кеша */
        
Route::controller(CacheController::class)
            ->
prefix('caches')
            ->
group(function () {
                
Route::get('/''index');
                
Route::post('/clear''clear');
            });

        
/* Бэкап */
        
Route::controller(BackupController::class)
            ->
prefix('backups')
            ->
group(function () {
                
Route::get('/''index');
                
Route::match(['get''post'], '/create''create');
                
Route::get('/delete''delete');
            });

        
/* Сканирование */
        
Route::controller(CheckerController::class)
            ->
prefix('checkers')
            ->
group(function () {
                
Route::match(['get''post'], '/''index');
                
Route::match(['get''post'], '/scan''scan');
            });

        
/* Приват рассылка */
        
Route::match(['get''post'], '/delivery', [DeliveryController::class, 'index']);

        
/* Логи */
        
Route::controller(LogController::class)
            ->
prefix('logs')
            ->
group(function () {
                
Route::get('/''index');
                
Route::get('/clear''clear');
            });

        
/* Шаблоны писем */
        
Route::controller(NoticeController::class)
            ->
prefix('notices')
            ->
group(function () {
                
Route::get('/''index');
                
Route::match(['get''post'], '/create''create');
                
Route::match(['get''post'], '/edit/{id}''edit');
                
Route::get('/delete/{id}''delete');
            });

        
/* Редактор */
        
Route::controller(AdminFileController::class)
            ->
prefix('files')
            ->
group(function () {
                
Route::get('/''index');
                
Route::match(['get''post'], '/edit''edit');
                
Route::match(['get''post'], '/create''create');
                
Route::get('/delete''delete');
            });

        
/* Пользовательская реклама  */
        
Route::controller(AdminUserAdvertController::class)
            ->
prefix('adverts')
            ->
group(function () {
                
Route::match(['get''post'], '/edit/{id}''edit');
                
Route::post('/delete''delete');
            });

        
/* Платная реклама */
        
Route::controller(PaidAdvertController::class)
            ->
prefix('paid-adverts')
            ->
group(function () {
                
Route::get('/''index');
                
Route::match(['get''post'], '/create''create');
                
Route::match(['get''post'], '/edit/{id}''edit');
                
Route::get('/delete/{id}''delete');
            });

        
/* Пользовательские поля */
        
Route::resource('user-fields'UserFieldController::class)
            ->
parameters(['user-fields' => 'id'])
            ->
except('show');

        
/* Чистка пользователей */
        
Route::controller(DelUserController::class)
            ->
prefix('delusers')
            ->
group(function () {
                
Route::match(['get''post'], '/''index');
                
Route::post('/clear''clear');
            });

        
/* Модули */
        
Route::controller(ModuleController::class)
            ->
prefix('modules')
            ->
group(function () {
                
Route::get('/''index');
                
Route::get('/module''module');
                
Route::get('/install''install');
                
Route::get('/uninstall''uninstall');
            });
    });
});

if (
file_exists(app_path('Http/Controllers/InstallController.php'))) {
    
Route::controller(InstallController::class)
        ->
prefix('install')
        ->
withoutMiddleware('web')
        ->
group(function () {
            
Route::get('/''index')->name('install');
            
Route::get('/status''status');
            
Route::get('/migrate''migrate');
            
Route::get('/seed''seed');
            
Route::match(['get''post'], '/account''account');
            
Route::get('/finish''finish');
        });
}

$modules Module::getEnabledModules();
foreach (
$modules as $module) {
    if (
file_exists(base_path('modules/' $module '/routes.php'))) {
        include_once 
base_path('modules/' $module '/routes.php');
    }
}
Онлайн: 1
Реклама