mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-22 19:02:31 +01:00
Cleaned up namespacing in routes
Also moved home controller and moved controllers up a level in http.
This commit is contained in:
parent
295cd01605
commit
141eecb858
@ -7,7 +7,7 @@ use BookStack\Access\LoginService;
|
||||
use BookStack\Exceptions\ConfirmationEmailException;
|
||||
use BookStack\Exceptions\UserTokenExpiredException;
|
||||
use BookStack\Exceptions\UserTokenNotFoundException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Users\UserRepo;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace BookStack\Access\Controllers;
|
||||
|
||||
use BookStack\Activity\ActivityType;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
|
||||
|
@ -7,7 +7,7 @@ use BookStack\Access\SocialAuthService;
|
||||
use BookStack\Exceptions\LoginAttemptEmailNeededException;
|
||||
use BookStack\Exceptions\LoginAttemptException;
|
||||
use BookStack\Facades\Activity;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
@ -8,7 +8,7 @@ use BookStack\Access\Mfa\MfaSession;
|
||||
use BookStack\Access\Mfa\MfaValue;
|
||||
use BookStack\Activity\ActivityType;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Access\Controllers;
|
||||
|
||||
use BookStack\Access\Mfa\MfaValue;
|
||||
use BookStack\Activity\ActivityType;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class MfaController extends Controller
|
||||
|
@ -9,7 +9,7 @@ use BookStack\Access\Mfa\TotpService;
|
||||
use BookStack\Access\Mfa\TotpValidationRule;
|
||||
use BookStack\Activity\ActivityType;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Access\Controllers;
|
||||
|
||||
use BookStack\Access\Oidc\OidcException;
|
||||
use BookStack\Access\Oidc\OidcService;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class OidcController extends Controller
|
||||
|
@ -7,7 +7,7 @@ use BookStack\Access\RegistrationService;
|
||||
use BookStack\Access\SocialAuthService;
|
||||
use BookStack\Exceptions\StoppedAuthenticationException;
|
||||
use BookStack\Exceptions\UserRegistrationException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Contracts\Validation\Validator as ValidatorContract;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Access\Controllers;
|
||||
|
||||
use BookStack\Access\LoginService;
|
||||
use BookStack\Activity\ActivityType;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Users\Models\User;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace BookStack\Access\Controllers;
|
||||
|
||||
use BookStack\Access\Saml2Service;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
|
@ -9,7 +9,7 @@ use BookStack\Exceptions\SocialDriverNotConfigured;
|
||||
use BookStack\Exceptions\SocialSignInAccountNotUsed;
|
||||
use BookStack\Exceptions\SocialSignInException;
|
||||
use BookStack\Exceptions\UserRegistrationException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
use Laravel\Socialite\Contracts\User as SocialUser;
|
||||
|
@ -5,7 +5,7 @@ namespace BookStack\Access\Controllers;
|
||||
use BookStack\Access\UserInviteService;
|
||||
use BookStack\Exceptions\UserTokenExpiredException;
|
||||
use BookStack\Exceptions\UserTokenNotFoundException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Users\UserRepo;
|
||||
use Exception;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Activity\Controllers;
|
||||
|
||||
use BookStack\Activity\ActivityType;
|
||||
use BookStack\Activity\Models\Activity;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Util\SimpleListOptions;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Activity\Controllers;
|
||||
|
||||
use BookStack\Activity\CommentRepo;
|
||||
use BookStack\Entities\Models\Page;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
|
@ -6,7 +6,7 @@ use BookStack\Activity\Models\Favouritable;
|
||||
use BookStack\App\Model;
|
||||
use BookStack\Entities\Models\Entity;
|
||||
use BookStack\Entities\Queries\TopFavourites;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class FavouriteController extends Controller
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace BookStack\Activity\Controllers;
|
||||
|
||||
use BookStack\Activity\TagRepo;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Util\SimpleListOptions;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
@ -5,7 +5,7 @@ namespace BookStack\Activity\Controllers;
|
||||
use BookStack\Activity\ActivityType;
|
||||
use BookStack\Activity\Models\Webhook;
|
||||
use BookStack\Activity\Queries\WebhooksAllPaginatedAndSorted;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Util\SimpleListOptions;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace BookStack\Api;
|
||||
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
|
||||
class ApiDocsController extends ApiController
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace BookStack\Api;
|
||||
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use Exception;
|
||||
use Illuminate\Contracts\Container\BindingResolutionException;
|
||||
use Illuminate\Support\Collection;
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace BookStack\Api;
|
||||
|
||||
use BookStack\Activity\ActivityType;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Users\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace BookStack\Http\Controllers;
|
||||
namespace BookStack\App;
|
||||
|
||||
use BookStack\Activity\ActivityQueries;
|
||||
use BookStack\Entities\Models\Book;
|
||||
@ -10,6 +10,7 @@ use BookStack\Entities\Queries\TopFavourites;
|
||||
use BookStack\Entities\Repos\BookRepo;
|
||||
use BookStack\Entities\Repos\BookshelfRepo;
|
||||
use BookStack\Entities\Tools\PageContent;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Uploads\FaviconHandler;
|
||||
use BookStack\Util\SimpleListOptions;
|
||||
use Illuminate\Http\Request;
|
@ -7,15 +7,6 @@ use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
|
@ -8,7 +8,7 @@ use BookStack\Entities\Models\Chapter;
|
||||
use BookStack\Entities\Models\Entity;
|
||||
use BookStack\Entities\Repos\BookRepo;
|
||||
use BookStack\Entities\Tools\BookContents;
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
|
@ -14,7 +14,7 @@ use BookStack\Entities\Tools\ShelfContext;
|
||||
use BookStack\Exceptions\ImageUploadException;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Facades\Activity;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\References\ReferenceFetcher;
|
||||
use BookStack\Util\SimpleListOptions;
|
||||
use Illuminate\Http\Request;
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Entities\Controllers;
|
||||
|
||||
use BookStack\Entities\Models\Book;
|
||||
use BookStack\Entities\Tools\ExportFormatter;
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use Throwable;
|
||||
|
||||
class BookExportApiController extends ApiController
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Entities\Controllers;
|
||||
|
||||
use BookStack\Entities\Repos\BookRepo;
|
||||
use BookStack\Entities\Tools\ExportFormatter;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Throwable;
|
||||
|
||||
class BookExportController extends Controller
|
||||
|
@ -7,7 +7,7 @@ use BookStack\Entities\Repos\BookRepo;
|
||||
use BookStack\Entities\Tools\BookContents;
|
||||
use BookStack\Entities\Tools\BookSortMap;
|
||||
use BookStack\Facades\Activity;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class BookSortController extends Controller
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Entities\Controllers;
|
||||
|
||||
use BookStack\Entities\Models\Bookshelf;
|
||||
use BookStack\Entities\Repos\BookshelfRepo;
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use Exception;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Http\Request;
|
||||
|
@ -9,7 +9,7 @@ use BookStack\Entities\Repos\BookshelfRepo;
|
||||
use BookStack\Entities\Tools\ShelfContext;
|
||||
use BookStack\Exceptions\ImageUploadException;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\References\ReferenceFetcher;
|
||||
use BookStack\Util\SimpleListOptions;
|
||||
use Exception;
|
||||
|
@ -5,7 +5,7 @@ namespace BookStack\Entities\Controllers;
|
||||
use BookStack\Entities\Models\Book;
|
||||
use BookStack\Entities\Models\Chapter;
|
||||
use BookStack\Entities\Repos\ChapterRepo;
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
@ -12,7 +12,7 @@ use BookStack\Entities\Tools\NextPreviousContentLocator;
|
||||
use BookStack\Exceptions\MoveOperationException;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Exceptions\PermissionsException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\References\ReferenceFetcher;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Entities\Controllers;
|
||||
|
||||
use BookStack\Entities\Models\Chapter;
|
||||
use BookStack\Entities\Tools\ExportFormatter;
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use Throwable;
|
||||
|
||||
class ChapterExportApiController extends ApiController
|
||||
|
@ -5,7 +5,7 @@ namespace BookStack\Entities\Controllers;
|
||||
use BookStack\Entities\Repos\ChapterRepo;
|
||||
use BookStack\Entities\Tools\ExportFormatter;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Throwable;
|
||||
|
||||
class ChapterExportController extends Controller
|
||||
|
@ -7,7 +7,7 @@ use BookStack\Entities\Models\Chapter;
|
||||
use BookStack\Entities\Models\Page;
|
||||
use BookStack\Entities\Repos\PageRepo;
|
||||
use BookStack\Exceptions\PermissionsException;
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
@ -13,7 +13,7 @@ use BookStack\Entities\Tools\PageEditActivity;
|
||||
use BookStack\Entities\Tools\PageEditorData;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Exceptions\PermissionsException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\References\ReferenceFetcher;
|
||||
use Exception;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Entities\Controllers;
|
||||
|
||||
use BookStack\Entities\Models\Page;
|
||||
use BookStack\Entities\Tools\ExportFormatter;
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use Throwable;
|
||||
|
||||
class PageExportApiController extends ApiController
|
||||
|
@ -6,7 +6,7 @@ use BookStack\Entities\Repos\PageRepo;
|
||||
use BookStack\Entities\Tools\ExportFormatter;
|
||||
use BookStack\Entities\Tools\PageContent;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Throwable;
|
||||
|
||||
class PageExportController extends Controller
|
||||
|
@ -8,7 +8,7 @@ use BookStack\Entities\Repos\PageRepo;
|
||||
use BookStack\Entities\Tools\PageContent;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Facades\Activity;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Util\SimpleListOptions;
|
||||
use Illuminate\Http\Request;
|
||||
use Ssddanbrown\HtmlDiff\Diff;
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Entities\Controllers;
|
||||
|
||||
use BookStack\Entities\Repos\PageRepo;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PageTemplateController extends Controller
|
||||
|
@ -7,7 +7,7 @@ use BookStack\Entities\Models\BookChild;
|
||||
use BookStack\Entities\Models\Chapter;
|
||||
use BookStack\Entities\Models\Deletion;
|
||||
use BookStack\Entities\Repos\DeletionRepo;
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use Closure;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
|
@ -7,7 +7,7 @@ use BookStack\Entities\Models\Deletion;
|
||||
use BookStack\Entities\Models\Entity;
|
||||
use BookStack\Entities\Repos\DeletionRepo;
|
||||
use BookStack\Entities\Tools\TrashCan;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
|
||||
class RecycleBinController extends Controller
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace BookStack\Http\Controllers;
|
||||
namespace BookStack\Http;
|
||||
|
||||
use BookStack\Api\ListingResponseBuilder;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
@ -1,12 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace BookStack\Http\Controllers;
|
||||
namespace BookStack\Http;
|
||||
|
||||
use BookStack\Activity\Models\Loggable;
|
||||
use BookStack\App\Model;
|
||||
use BookStack\Exceptions\NotifyException;
|
||||
use BookStack\Facades\Activity;
|
||||
use BookStack\Http\Responses\DownloadResponseFactory;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Http\JsonResponse;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace BookStack\Http\Responses;
|
||||
namespace BookStack\Http;
|
||||
|
||||
use BookStack\Util\WebSafeMimeSniffer;
|
||||
use Illuminate\Http\Request;
|
@ -5,7 +5,7 @@ namespace BookStack\Permissions;
|
||||
use BookStack\Entities\EntityProvider;
|
||||
use BookStack\Entities\Models\Entity;
|
||||
use BookStack\Entities\Tools\PermissionsUpdater;
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ContentPermissionApiController extends ApiController
|
||||
|
@ -7,7 +7,7 @@ use BookStack\Entities\Models\Bookshelf;
|
||||
use BookStack\Entities\Models\Chapter;
|
||||
use BookStack\Entities\Models\Page;
|
||||
use BookStack\Entities\Tools\PermissionsUpdater;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Permissions\Models\EntityPermission;
|
||||
use BookStack\Users\Models\Role;
|
||||
use Illuminate\Http\Request;
|
||||
|
@ -6,7 +6,7 @@ use BookStack\Entities\Models\Book;
|
||||
use BookStack\Entities\Models\Bookshelf;
|
||||
use BookStack\Entities\Models\Chapter;
|
||||
use BookStack\Entities\Models\Page;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
|
||||
class ReferenceController extends Controller
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Search;
|
||||
|
||||
use BookStack\Api\ApiEntityListFormatter;
|
||||
use BookStack\Entities\Models\Entity;
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class SearchApiController extends ApiController
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Search;
|
||||
|
||||
use BookStack\Entities\Queries\Popular;
|
||||
use BookStack\Entities\Tools\SiblingFetcher;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class SearchController extends Controller
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Settings;
|
||||
|
||||
use BookStack\Activity\ActivityType;
|
||||
use BookStack\Entities\Tools\TrashCan;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Notifications\TestEmail;
|
||||
use BookStack\References\ReferenceStore;
|
||||
use BookStack\Uploads\ImageService;
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace BookStack\Settings;
|
||||
|
||||
use BookStack\Activity\ActivityType;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Users\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace BookStack\Settings;
|
||||
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Uploads\Controllers;
|
||||
|
||||
use BookStack\Entities\Models\Page;
|
||||
use BookStack\Exceptions\FileUploadException;
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use BookStack\Uploads\Attachment;
|
||||
use BookStack\Uploads\AttachmentService;
|
||||
use Exception;
|
||||
|
@ -5,7 +5,7 @@ namespace BookStack\Uploads\Controllers;
|
||||
use BookStack\Entities\Repos\PageRepo;
|
||||
use BookStack\Exceptions\FileUploadException;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Uploads\Attachment;
|
||||
use BookStack\Uploads\AttachmentService;
|
||||
use Exception;
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace BookStack\Uploads\Controllers;
|
||||
|
||||
use BookStack\Exceptions\ImageUploadException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Uploads\ImageRepo;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace BookStack\Uploads\Controllers;
|
||||
|
||||
use BookStack\Exceptions\ImageUploadException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Uploads\ImageRepo;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
@ -4,7 +4,7 @@ namespace BookStack\Uploads\Controllers;
|
||||
|
||||
use BookStack\Exceptions\ImageUploadException;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Uploads\Image;
|
||||
use BookStack\Uploads\ImageRepo;
|
||||
use BookStack\Uploads\ImageService;
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace BookStack\Uploads\Controllers;
|
||||
|
||||
use BookStack\Entities\Models\Page;
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use BookStack\Uploads\Image;
|
||||
use BookStack\Uploads\ImageRepo;
|
||||
use Illuminate\Http\Request;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace BookStack\Users\Controllers;
|
||||
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use BookStack\Permissions\PermissionsRepo;
|
||||
use BookStack\Users\Models\Role;
|
||||
use Illuminate\Http\Request;
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace BookStack\Users\Controllers;
|
||||
|
||||
use BookStack\Exceptions\PermissionsException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Permissions\PermissionsRepo;
|
||||
use BookStack\Users\Models\Role;
|
||||
use BookStack\Users\Queries\RolesAllPaginatedAndSorted;
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace BookStack\Users\Controllers;
|
||||
|
||||
use BookStack\Exceptions\UserUpdateException;
|
||||
use BookStack\Http\Controllers\ApiController;
|
||||
use BookStack\Http\ApiController;
|
||||
use BookStack\Users\Models\User;
|
||||
use BookStack\Users\UserRepo;
|
||||
use Closure;
|
||||
|
@ -5,7 +5,7 @@ namespace BookStack\Users\Controllers;
|
||||
use BookStack\Access\SocialAuthService;
|
||||
use BookStack\Exceptions\ImageUploadException;
|
||||
use BookStack\Exceptions\UserUpdateException;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Uploads\ImageRepo;
|
||||
use BookStack\Users\Models\Role;
|
||||
use BookStack\Users\Queries\UsersAllPaginatedAndSorted;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace BookStack\Users\Controllers;
|
||||
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Settings\UserShortcutMap;
|
||||
use BookStack\Users\UserRepo;
|
||||
use Illuminate\Http\Request;
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace BookStack\Users\Controllers;
|
||||
|
||||
use BookStack\Activity\ActivityQueries;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Users\Queries\UserContentCounts;
|
||||
use BookStack\Users\Queries\UserRecentlyCreatedContent;
|
||||
use BookStack\Users\UserRepo;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace BookStack\Users\Controllers;
|
||||
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Users\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
@ -3,18 +3,11 @@
|
||||
/**
|
||||
* Routes for the BookStack API.
|
||||
* Routes have a uri prefix of /api/.
|
||||
* Controllers are all within app/Http/Controllers/Api.
|
||||
* Controllers all end with "ApiController"
|
||||
*/
|
||||
|
||||
use BookStack\Api\ApiDocsController;
|
||||
use BookStack\Entities\Controllers\BookApiController;
|
||||
use BookStack\Entities\Controllers\BookExportApiController;
|
||||
use BookStack\Entities\Controllers\BookshelfApiController;
|
||||
use BookStack\Entities\Controllers\ChapterApiController;
|
||||
use BookStack\Entities\Controllers\ChapterExportApiController;
|
||||
use BookStack\Entities\Controllers\PageApiController;
|
||||
use BookStack\Entities\Controllers\PageExportApiController;
|
||||
use BookStack\Entities\Controllers\RecycleBinApiController;
|
||||
use BookStack\Entities\Controllers as EntityControllers;
|
||||
use BookStack\Permissions\ContentPermissionApiController;
|
||||
use BookStack\Search\SearchApiController;
|
||||
use BookStack\Uploads\Controllers\AttachmentApiController;
|
||||
@ -31,38 +24,38 @@ Route::get('attachments/{id}', [AttachmentApiController::class, 'read']);
|
||||
Route::put('attachments/{id}', [AttachmentApiController::class, 'update']);
|
||||
Route::delete('attachments/{id}', [AttachmentApiController::class, 'delete']);
|
||||
|
||||
Route::get('books', [BookApiController::class, 'list']);
|
||||
Route::post('books', [BookApiController::class, 'create']);
|
||||
Route::get('books/{id}', [BookApiController::class, 'read']);
|
||||
Route::put('books/{id}', [BookApiController::class, 'update']);
|
||||
Route::delete('books/{id}', [BookApiController::class, 'delete']);
|
||||
Route::get('books', [EntityControllers\BookApiController::class, 'list']);
|
||||
Route::post('books', [EntityControllers\BookApiController::class, 'create']);
|
||||
Route::get('books/{id}', [EntityControllers\BookApiController::class, 'read']);
|
||||
Route::put('books/{id}', [EntityControllers\BookApiController::class, 'update']);
|
||||
Route::delete('books/{id}', [EntityControllers\BookApiController::class, 'delete']);
|
||||
|
||||
Route::get('books/{id}/export/html', [BookExportApiController::class, 'exportHtml']);
|
||||
Route::get('books/{id}/export/pdf', [BookExportApiController::class, 'exportPdf']);
|
||||
Route::get('books/{id}/export/plaintext', [BookExportApiController::class, 'exportPlainText']);
|
||||
Route::get('books/{id}/export/markdown', [BookExportApiController::class, 'exportMarkdown']);
|
||||
Route::get('books/{id}/export/html', [EntityControllers\BookExportApiController::class, 'exportHtml']);
|
||||
Route::get('books/{id}/export/pdf', [EntityControllers\BookExportApiController::class, 'exportPdf']);
|
||||
Route::get('books/{id}/export/plaintext', [EntityControllers\BookExportApiController::class, 'exportPlainText']);
|
||||
Route::get('books/{id}/export/markdown', [EntityControllers\BookExportApiController::class, 'exportMarkdown']);
|
||||
|
||||
Route::get('chapters', [ChapterApiController::class, 'list']);
|
||||
Route::post('chapters', [ChapterApiController::class, 'create']);
|
||||
Route::get('chapters/{id}', [ChapterApiController::class, 'read']);
|
||||
Route::put('chapters/{id}', [ChapterApiController::class, 'update']);
|
||||
Route::delete('chapters/{id}', [ChapterApiController::class, 'delete']);
|
||||
Route::get('chapters', [EntityControllers\ChapterApiController::class, 'list']);
|
||||
Route::post('chapters', [EntityControllers\ChapterApiController::class, 'create']);
|
||||
Route::get('chapters/{id}', [EntityControllers\ChapterApiController::class, 'read']);
|
||||
Route::put('chapters/{id}', [EntityControllers\ChapterApiController::class, 'update']);
|
||||
Route::delete('chapters/{id}', [EntityControllers\ChapterApiController::class, 'delete']);
|
||||
|
||||
Route::get('chapters/{id}/export/html', [ChapterExportApiController::class, 'exportHtml']);
|
||||
Route::get('chapters/{id}/export/pdf', [ChapterExportApiController::class, 'exportPdf']);
|
||||
Route::get('chapters/{id}/export/plaintext', [ChapterExportApiController::class, 'exportPlainText']);
|
||||
Route::get('chapters/{id}/export/markdown', [ChapterExportApiController::class, 'exportMarkdown']);
|
||||
Route::get('chapters/{id}/export/html', [EntityControllers\ChapterExportApiController::class, 'exportHtml']);
|
||||
Route::get('chapters/{id}/export/pdf', [EntityControllers\ChapterExportApiController::class, 'exportPdf']);
|
||||
Route::get('chapters/{id}/export/plaintext', [EntityControllers\ChapterExportApiController::class, 'exportPlainText']);
|
||||
Route::get('chapters/{id}/export/markdown', [EntityControllers\ChapterExportApiController::class, 'exportMarkdown']);
|
||||
|
||||
Route::get('pages', [PageApiController::class, 'list']);
|
||||
Route::post('pages', [PageApiController::class, 'create']);
|
||||
Route::get('pages/{id}', [PageApiController::class, 'read']);
|
||||
Route::put('pages/{id}', [PageApiController::class, 'update']);
|
||||
Route::delete('pages/{id}', [PageApiController::class, 'delete']);
|
||||
Route::get('pages', [EntityControllers\PageApiController::class, 'list']);
|
||||
Route::post('pages', [EntityControllers\PageApiController::class, 'create']);
|
||||
Route::get('pages/{id}', [EntityControllers\PageApiController::class, 'read']);
|
||||
Route::put('pages/{id}', [EntityControllers\PageApiController::class, 'update']);
|
||||
Route::delete('pages/{id}', [EntityControllers\PageApiController::class, 'delete']);
|
||||
|
||||
Route::get('pages/{id}/export/html', [PageExportApiController::class, 'exportHtml']);
|
||||
Route::get('pages/{id}/export/pdf', [PageExportApiController::class, 'exportPdf']);
|
||||
Route::get('pages/{id}/export/plaintext', [PageExportApiController::class, 'exportPlainText']);
|
||||
Route::get('pages/{id}/export/markdown', [PageExportApiController::class, 'exportMarkdown']);
|
||||
Route::get('pages/{id}/export/html', [EntityControllers\PageExportApiController::class, 'exportHtml']);
|
||||
Route::get('pages/{id}/export/pdf', [EntityControllers\PageExportApiController::class, 'exportPdf']);
|
||||
Route::get('pages/{id}/export/plaintext', [EntityControllers\PageExportApiController::class, 'exportPlainText']);
|
||||
Route::get('pages/{id}/export/markdown', [EntityControllers\PageExportApiController::class, 'exportMarkdown']);
|
||||
|
||||
Route::get('image-gallery', [ImageGalleryApiController::class, 'list']);
|
||||
Route::post('image-gallery', [ImageGalleryApiController::class, 'create']);
|
||||
@ -72,11 +65,11 @@ Route::delete('image-gallery/{id}', [ImageGalleryApiController::class, 'delete']
|
||||
|
||||
Route::get('search', [SearchApiController::class, 'all']);
|
||||
|
||||
Route::get('shelves', [BookshelfApiController::class, 'list']);
|
||||
Route::post('shelves', [BookshelfApiController::class, 'create']);
|
||||
Route::get('shelves/{id}', [BookshelfApiController::class, 'read']);
|
||||
Route::put('shelves/{id}', [BookshelfApiController::class, 'update']);
|
||||
Route::delete('shelves/{id}', [BookshelfApiController::class, 'delete']);
|
||||
Route::get('shelves', [EntityControllers\BookshelfApiController::class, 'list']);
|
||||
Route::post('shelves', [EntityControllers\BookshelfApiController::class, 'create']);
|
||||
Route::get('shelves/{id}', [EntityControllers\BookshelfApiController::class, 'read']);
|
||||
Route::put('shelves/{id}', [EntityControllers\BookshelfApiController::class, 'update']);
|
||||
Route::delete('shelves/{id}', [EntityControllers\BookshelfApiController::class, 'delete']);
|
||||
|
||||
Route::get('users', [UserApiController::class, 'list']);
|
||||
Route::post('users', [UserApiController::class, 'create']);
|
||||
@ -90,9 +83,9 @@ Route::get('roles/{id}', [RoleApiController::class, 'read']);
|
||||
Route::put('roles/{id}', [RoleApiController::class, 'update']);
|
||||
Route::delete('roles/{id}', [RoleApiController::class, 'delete']);
|
||||
|
||||
Route::get('recycle-bin', [RecycleBinApiController::class, 'list']);
|
||||
Route::put('recycle-bin/{deletionId}', [RecycleBinApiController::class, 'restore']);
|
||||
Route::delete('recycle-bin/{deletionId}', [RecycleBinApiController::class, 'destroy']);
|
||||
Route::get('recycle-bin', [EntityControllers\RecycleBinApiController::class, 'list']);
|
||||
Route::put('recycle-bin/{deletionId}', [EntityControllers\RecycleBinApiController::class, 'restore']);
|
||||
Route::delete('recycle-bin/{deletionId}', [EntityControllers\RecycleBinApiController::class, 'destroy']);
|
||||
|
||||
Route::get('content-permissions/{contentType}/{contentId}', [ContentPermissionApiController::class, 'read']);
|
||||
Route::put('content-permissions/{contentType}/{contentId}', [ContentPermissionApiController::class, 'update']);
|
||||
|
@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is where you may define all of your Closure based console
|
||||
| commands. Each Closure is bound to a command instance allowing a
|
||||
| simple approach to interacting with each command's IO methods.
|
||||
|
|
||||
*/
|
||||
|
||||
Artisan::command('inspire', function () {
|
||||
$this->comment(Inspiring::quote());
|
||||
})->purpose('Display an inspiring quote');
|
414
routes/web.php
414
routes/web.php
@ -1,43 +1,23 @@
|
||||
<?php
|
||||
|
||||
use BookStack\Activity\Controllers\AuditLogController;
|
||||
use BookStack\Activity\Controllers\CommentController;
|
||||
use BookStack\Activity\Controllers\FavouriteController;
|
||||
use BookStack\Activity\Controllers\TagController;
|
||||
use BookStack\Activity\Controllers\WebhookController;
|
||||
use BookStack\Access\Controllers as AccessControllers;
|
||||
use BookStack\Activity\Controllers as ActivityControllers;
|
||||
use BookStack\Api\ApiDocsController;
|
||||
use BookStack\Api\UserApiTokenController;
|
||||
use BookStack\Entities\Controllers\BookController;
|
||||
use BookStack\Entities\Controllers\BookExportController;
|
||||
use BookStack\Entities\Controllers\BookshelfController;
|
||||
use BookStack\Entities\Controllers\BookSortController;
|
||||
use BookStack\Entities\Controllers\ChapterController;
|
||||
use BookStack\Entities\Controllers\ChapterExportController;
|
||||
use BookStack\Entities\Controllers\PageController;
|
||||
use BookStack\Entities\Controllers\PageExportController;
|
||||
use BookStack\Entities\Controllers\PageRevisionController;
|
||||
use BookStack\Entities\Controllers\PageTemplateController;
|
||||
use BookStack\Entities\Controllers\RecycleBinController;
|
||||
use BookStack\Http\Controllers\Auth;
|
||||
use BookStack\Http\Controllers\HomeController;
|
||||
use BookStack\Http\Controllers\Images;
|
||||
use BookStack\App\HomeController;
|
||||
use BookStack\Entities\Controllers as EntityControllers;
|
||||
use BookStack\Http\Middleware\VerifyCsrfToken;
|
||||
use BookStack\Permissions\PermissionsController;
|
||||
use BookStack\References\ReferenceController;
|
||||
use BookStack\Search\SearchController;
|
||||
use BookStack\Settings\MaintenanceController;
|
||||
use BookStack\Settings\SettingController;
|
||||
use BookStack\Settings\StatusController;
|
||||
use BookStack\Uploads\Controllers\AttachmentController;
|
||||
use BookStack\Users\Controllers\RoleController;
|
||||
use BookStack\Users\Controllers\UserController;
|
||||
use BookStack\Users\Controllers\UserPreferencesController;
|
||||
use BookStack\Users\Controllers\UserProfileController;
|
||||
use BookStack\Users\Controllers\UserSearchController;
|
||||
use BookStack\Settings as SettingControllers;
|
||||
use BookStack\Uploads\Controllers as UploadControllers;
|
||||
use BookStack\Users\Controllers as UserControllers;
|
||||
use Illuminate\Session\Middleware\StartSession;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||
|
||||
Route::get('/status', [StatusController::class, 'show']);
|
||||
Route::get('/status', [SettingControllers\StatusController::class, 'show']);
|
||||
Route::get('/robots.txt', [HomeController::class, 'robots']);
|
||||
Route::get('/favicon.ico', [HomeController::class, 'favicon']);
|
||||
|
||||
@ -45,152 +25,152 @@ Route::get('/favicon.ico', [HomeController::class, 'favicon']);
|
||||
Route::middleware('auth')->group(function () {
|
||||
|
||||
// Secure images routing
|
||||
Route::get('/uploads/images/{path}', [\BookStack\Uploads\Controllers\ImageController::class, 'showImage'])
|
||||
Route::get('/uploads/images/{path}', [UploadControllers\ImageController::class, 'showImage'])
|
||||
->where('path', '.*$');
|
||||
|
||||
// API docs routes
|
||||
Route::redirect('/api', '/api/docs');
|
||||
Route::get('/api/docs', [\BookStack\Api\ApiDocsController::class, 'display']);
|
||||
Route::get('/api/docs', [ApiDocsController::class, 'display']);
|
||||
|
||||
Route::get('/pages/recently-updated', [PageController::class, 'showRecentlyUpdated']);
|
||||
Route::get('/pages/recently-updated', [EntityControllers\PageController::class, 'showRecentlyUpdated']);
|
||||
|
||||
// Shelves
|
||||
Route::get('/create-shelf', [BookshelfController::class, 'create']);
|
||||
Route::get('/shelves/', [BookshelfController::class, 'index']);
|
||||
Route::post('/shelves/', [BookshelfController::class, 'store']);
|
||||
Route::get('/shelves/{slug}/edit', [BookshelfController::class, 'edit']);
|
||||
Route::get('/shelves/{slug}/delete', [BookshelfController::class, 'showDelete']);
|
||||
Route::get('/shelves/{slug}', [BookshelfController::class, 'show']);
|
||||
Route::put('/shelves/{slug}', [BookshelfController::class, 'update']);
|
||||
Route::delete('/shelves/{slug}', [BookshelfController::class, 'destroy']);
|
||||
Route::get('/create-shelf', [EntityControllers\BookshelfController::class, 'create']);
|
||||
Route::get('/shelves/', [EntityControllers\BookshelfController::class, 'index']);
|
||||
Route::post('/shelves/', [EntityControllers\BookshelfController::class, 'store']);
|
||||
Route::get('/shelves/{slug}/edit', [EntityControllers\BookshelfController::class, 'edit']);
|
||||
Route::get('/shelves/{slug}/delete', [EntityControllers\BookshelfController::class, 'showDelete']);
|
||||
Route::get('/shelves/{slug}', [EntityControllers\BookshelfController::class, 'show']);
|
||||
Route::put('/shelves/{slug}', [EntityControllers\BookshelfController::class, 'update']);
|
||||
Route::delete('/shelves/{slug}', [EntityControllers\BookshelfController::class, 'destroy']);
|
||||
Route::get('/shelves/{slug}/permissions', [PermissionsController::class, 'showForShelf']);
|
||||
Route::put('/shelves/{slug}/permissions', [PermissionsController::class, 'updateForShelf']);
|
||||
Route::post('/shelves/{slug}/copy-permissions', [PermissionsController::class, 'copyShelfPermissionsToBooks']);
|
||||
Route::get('/shelves/{slug}/references', [ReferenceController::class, 'shelf']);
|
||||
|
||||
// Book Creation
|
||||
Route::get('/shelves/{shelfSlug}/create-book', [BookController::class, 'create']);
|
||||
Route::post('/shelves/{shelfSlug}/create-book', [BookController::class, 'store']);
|
||||
Route::get('/create-book', [BookController::class, 'create']);
|
||||
Route::get('/shelves/{shelfSlug}/create-book', [EntityControllers\BookController::class, 'create']);
|
||||
Route::post('/shelves/{shelfSlug}/create-book', [EntityControllers\BookController::class, 'store']);
|
||||
Route::get('/create-book', [EntityControllers\BookController::class, 'create']);
|
||||
|
||||
// Books
|
||||
Route::get('/books/', [BookController::class, 'index']);
|
||||
Route::post('/books/', [BookController::class, 'store']);
|
||||
Route::get('/books/{slug}/edit', [BookController::class, 'edit']);
|
||||
Route::put('/books/{slug}', [BookController::class, 'update']);
|
||||
Route::delete('/books/{id}', [BookController::class, 'destroy']);
|
||||
Route::get('/books/{slug}/sort-item', [BookSortController::class, 'showItem']);
|
||||
Route::get('/books/{slug}', [BookController::class, 'show']);
|
||||
Route::get('/books/', [EntityControllers\BookController::class, 'index']);
|
||||
Route::post('/books/', [EntityControllers\BookController::class, 'store']);
|
||||
Route::get('/books/{slug}/edit', [EntityControllers\BookController::class, 'edit']);
|
||||
Route::put('/books/{slug}', [EntityControllers\BookController::class, 'update']);
|
||||
Route::delete('/books/{id}', [EntityControllers\BookController::class, 'destroy']);
|
||||
Route::get('/books/{slug}/sort-item', [EntityControllers\BookSortController::class, 'showItem']);
|
||||
Route::get('/books/{slug}', [EntityControllers\BookController::class, 'show']);
|
||||
Route::get('/books/{bookSlug}/permissions', [PermissionsController::class, 'showForBook']);
|
||||
Route::put('/books/{bookSlug}/permissions', [PermissionsController::class, 'updateForBook']);
|
||||
Route::get('/books/{slug}/delete', [BookController::class, 'showDelete']);
|
||||
Route::get('/books/{bookSlug}/copy', [BookController::class, 'showCopy']);
|
||||
Route::post('/books/{bookSlug}/copy', [BookController::class, 'copy']);
|
||||
Route::post('/books/{bookSlug}/convert-to-shelf', [BookController::class, 'convertToShelf']);
|
||||
Route::get('/books/{bookSlug}/sort', [BookSortController::class, 'show']);
|
||||
Route::put('/books/{bookSlug}/sort', [BookSortController::class, 'update']);
|
||||
Route::get('/books/{slug}/delete', [EntityControllers\BookController::class, 'showDelete']);
|
||||
Route::get('/books/{bookSlug}/copy', [EntityControllers\BookController::class, 'showCopy']);
|
||||
Route::post('/books/{bookSlug}/copy', [EntityControllers\BookController::class, 'copy']);
|
||||
Route::post('/books/{bookSlug}/convert-to-shelf', [EntityControllers\BookController::class, 'convertToShelf']);
|
||||
Route::get('/books/{bookSlug}/sort', [EntityControllers\BookSortController::class, 'show']);
|
||||
Route::put('/books/{bookSlug}/sort', [EntityControllers\BookSortController::class, 'update']);
|
||||
Route::get('/books/{slug}/references', [ReferenceController::class, 'book']);
|
||||
Route::get('/books/{bookSlug}/export/html', [BookExportController::class, 'html']);
|
||||
Route::get('/books/{bookSlug}/export/pdf', [BookExportController::class, 'pdf']);
|
||||
Route::get('/books/{bookSlug}/export/markdown', [BookExportController::class, 'markdown']);
|
||||
Route::get('/books/{bookSlug}/export/zip', [BookExportController::class, 'zip']);
|
||||
Route::get('/books/{bookSlug}/export/plaintext', [BookExportController::class, 'plainText']);
|
||||
Route::get('/books/{bookSlug}/export/html', [EntityControllers\BookExportController::class, 'html']);
|
||||
Route::get('/books/{bookSlug}/export/pdf', [EntityControllers\BookExportController::class, 'pdf']);
|
||||
Route::get('/books/{bookSlug}/export/markdown', [EntityControllers\BookExportController::class, 'markdown']);
|
||||
Route::get('/books/{bookSlug}/export/zip', [EntityControllers\BookExportController::class, 'zip']);
|
||||
Route::get('/books/{bookSlug}/export/plaintext', [EntityControllers\BookExportController::class, 'plainText']);
|
||||
|
||||
// Pages
|
||||
Route::get('/books/{bookSlug}/create-page', [PageController::class, 'create']);
|
||||
Route::post('/books/{bookSlug}/create-guest-page', [PageController::class, 'createAsGuest']);
|
||||
Route::get('/books/{bookSlug}/draft/{pageId}', [PageController::class, 'editDraft']);
|
||||
Route::post('/books/{bookSlug}/draft/{pageId}', [PageController::class, 'store']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}', [PageController::class, 'show']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/export/pdf', [PageExportController::class, 'pdf']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/export/html', [PageExportController::class, 'html']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/export/markdown', [PageExportController::class, 'markdown']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/export/plaintext', [PageExportController::class, 'plainText']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/edit', [PageController::class, 'edit']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/move', [PageController::class, 'showMove']);
|
||||
Route::put('/books/{bookSlug}/page/{pageSlug}/move', [PageController::class, 'move']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/copy', [PageController::class, 'showCopy']);
|
||||
Route::post('/books/{bookSlug}/page/{pageSlug}/copy', [PageController::class, 'copy']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/delete', [PageController::class, 'showDelete']);
|
||||
Route::get('/books/{bookSlug}/draft/{pageId}/delete', [PageController::class, 'showDeleteDraft']);
|
||||
Route::get('/books/{bookSlug}/create-page', [EntityControllers\PageController::class, 'create']);
|
||||
Route::post('/books/{bookSlug}/create-guest-page', [EntityControllers\PageController::class, 'createAsGuest']);
|
||||
Route::get('/books/{bookSlug}/draft/{pageId}', [EntityControllers\PageController::class, 'editDraft']);
|
||||
Route::post('/books/{bookSlug}/draft/{pageId}', [EntityControllers\PageController::class, 'store']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}', [EntityControllers\PageController::class, 'show']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/export/pdf', [EntityControllers\PageExportController::class, 'pdf']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/export/html', [EntityControllers\PageExportController::class, 'html']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/export/markdown', [EntityControllers\PageExportController::class, 'markdown']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/export/plaintext', [EntityControllers\PageExportController::class, 'plainText']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/edit', [EntityControllers\PageController::class, 'edit']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/move', [EntityControllers\PageController::class, 'showMove']);
|
||||
Route::put('/books/{bookSlug}/page/{pageSlug}/move', [EntityControllers\PageController::class, 'move']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/copy', [EntityControllers\PageController::class, 'showCopy']);
|
||||
Route::post('/books/{bookSlug}/page/{pageSlug}/copy', [EntityControllers\PageController::class, 'copy']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/delete', [EntityControllers\PageController::class, 'showDelete']);
|
||||
Route::get('/books/{bookSlug}/draft/{pageId}/delete', [EntityControllers\PageController::class, 'showDeleteDraft']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/permissions', [PermissionsController::class, 'showForPage']);
|
||||
Route::put('/books/{bookSlug}/page/{pageSlug}/permissions', [PermissionsController::class, 'updateForPage']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/references', [ReferenceController::class, 'page']);
|
||||
Route::put('/books/{bookSlug}/page/{pageSlug}', [PageController::class, 'update']);
|
||||
Route::delete('/books/{bookSlug}/page/{pageSlug}', [PageController::class, 'destroy']);
|
||||
Route::delete('/books/{bookSlug}/draft/{pageId}', [PageController::class, 'destroyDraft']);
|
||||
Route::put('/books/{bookSlug}/page/{pageSlug}', [EntityControllers\PageController::class, 'update']);
|
||||
Route::delete('/books/{bookSlug}/page/{pageSlug}', [EntityControllers\PageController::class, 'destroy']);
|
||||
Route::delete('/books/{bookSlug}/draft/{pageId}', [EntityControllers\PageController::class, 'destroyDraft']);
|
||||
|
||||
// Revisions
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/revisions', [PageRevisionController::class, 'index']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/revisions/{revId}', [PageRevisionController::class, 'show']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/revisions/{revId}/changes', [PageRevisionController::class, 'changes']);
|
||||
Route::put('/books/{bookSlug}/page/{pageSlug}/revisions/{revId}/restore', [PageRevisionController::class, 'restore']);
|
||||
Route::delete('/books/{bookSlug}/page/{pageSlug}/revisions/{revId}/delete', [PageRevisionController::class, 'destroy']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/revisions', [EntityControllers\PageRevisionController::class, 'index']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/revisions/{revId}', [EntityControllers\PageRevisionController::class, 'show']);
|
||||
Route::get('/books/{bookSlug}/page/{pageSlug}/revisions/{revId}/changes', [EntityControllers\PageRevisionController::class, 'changes']);
|
||||
Route::put('/books/{bookSlug}/page/{pageSlug}/revisions/{revId}/restore', [EntityControllers\PageRevisionController::class, 'restore']);
|
||||
Route::delete('/books/{bookSlug}/page/{pageSlug}/revisions/{revId}/delete', [EntityControllers\PageRevisionController::class, 'destroy']);
|
||||
|
||||
// Chapters
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/create-page', [PageController::class, 'create']);
|
||||
Route::post('/books/{bookSlug}/chapter/{chapterSlug}/create-guest-page', [PageController::class, 'createAsGuest']);
|
||||
Route::get('/books/{bookSlug}/create-chapter', [ChapterController::class, 'create']);
|
||||
Route::post('/books/{bookSlug}/create-chapter', [ChapterController::class, 'store']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}', [ChapterController::class, 'show']);
|
||||
Route::put('/books/{bookSlug}/chapter/{chapterSlug}', [ChapterController::class, 'update']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/move', [ChapterController::class, 'showMove']);
|
||||
Route::put('/books/{bookSlug}/chapter/{chapterSlug}/move', [ChapterController::class, 'move']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/copy', [ChapterController::class, 'showCopy']);
|
||||
Route::post('/books/{bookSlug}/chapter/{chapterSlug}/copy', [ChapterController::class, 'copy']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/edit', [ChapterController::class, 'edit']);
|
||||
Route::post('/books/{bookSlug}/chapter/{chapterSlug}/convert-to-book', [ChapterController::class, 'convertToBook']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/create-page', [EntityControllers\PageController::class, 'create']);
|
||||
Route::post('/books/{bookSlug}/chapter/{chapterSlug}/create-guest-page', [EntityControllers\PageController::class, 'createAsGuest']);
|
||||
Route::get('/books/{bookSlug}/create-chapter', [EntityControllers\ChapterController::class, 'create']);
|
||||
Route::post('/books/{bookSlug}/create-chapter', [EntityControllers\ChapterController::class, 'store']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}', [EntityControllers\ChapterController::class, 'show']);
|
||||
Route::put('/books/{bookSlug}/chapter/{chapterSlug}', [EntityControllers\ChapterController::class, 'update']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/move', [EntityControllers\ChapterController::class, 'showMove']);
|
||||
Route::put('/books/{bookSlug}/chapter/{chapterSlug}/move', [EntityControllers\ChapterController::class, 'move']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/copy', [EntityControllers\ChapterController::class, 'showCopy']);
|
||||
Route::post('/books/{bookSlug}/chapter/{chapterSlug}/copy', [EntityControllers\ChapterController::class, 'copy']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/edit', [EntityControllers\ChapterController::class, 'edit']);
|
||||
Route::post('/books/{bookSlug}/chapter/{chapterSlug}/convert-to-book', [EntityControllers\ChapterController::class, 'convertToBook']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/permissions', [PermissionsController::class, 'showForChapter']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/pdf', [ChapterExportController::class, 'pdf']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/html', [ChapterExportController::class, 'html']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/markdown', [ChapterExportController::class, 'markdown']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/plaintext', [ChapterExportController::class, 'plainText']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/pdf', [EntityControllers\ChapterExportController::class, 'pdf']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/html', [EntityControllers\ChapterExportController::class, 'html']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/markdown', [EntityControllers\ChapterExportController::class, 'markdown']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/plaintext', [EntityControllers\ChapterExportController::class, 'plainText']);
|
||||
Route::put('/books/{bookSlug}/chapter/{chapterSlug}/permissions', [PermissionsController::class, 'updateForChapter']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/references', [ReferenceController::class, 'chapter']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/delete', [ChapterController::class, 'showDelete']);
|
||||
Route::delete('/books/{bookSlug}/chapter/{chapterSlug}', [ChapterController::class, 'destroy']);
|
||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/delete', [EntityControllers\ChapterController::class, 'showDelete']);
|
||||
Route::delete('/books/{bookSlug}/chapter/{chapterSlug}', [EntityControllers\ChapterController::class, 'destroy']);
|
||||
|
||||
// User Profile routes
|
||||
Route::get('/user/{slug}', [UserProfileController::class, 'show']);
|
||||
Route::get('/user/{slug}', [UserControllers\UserProfileController::class, 'show']);
|
||||
|
||||
// Image routes
|
||||
Route::get('/images/gallery', [\BookStack\Uploads\Controllers\GalleryImageController::class, 'list']);
|
||||
Route::post('/images/gallery', [\BookStack\Uploads\Controllers\GalleryImageController::class, 'create']);
|
||||
Route::get('/images/drawio', [\BookStack\Uploads\Controllers\DrawioImageController::class, 'list']);
|
||||
Route::get('/images/drawio/base64/{id}', [\BookStack\Uploads\Controllers\DrawioImageController::class, 'getAsBase64']);
|
||||
Route::post('/images/drawio', [\BookStack\Uploads\Controllers\DrawioImageController::class, 'create']);
|
||||
Route::get('/images/edit/{id}', [\BookStack\Uploads\Controllers\ImageController::class, 'edit']);
|
||||
Route::put('/images/{id}', [\BookStack\Uploads\Controllers\ImageController::class, 'update']);
|
||||
Route::delete('/images/{id}', [\BookStack\Uploads\Controllers\ImageController::class, 'destroy']);
|
||||
Route::get('/images/gallery', [UploadControllers\GalleryImageController::class, 'list']);
|
||||
Route::post('/images/gallery', [UploadControllers\GalleryImageController::class, 'create']);
|
||||
Route::get('/images/drawio', [UploadControllers\DrawioImageController::class, 'list']);
|
||||
Route::get('/images/drawio/base64/{id}', [UploadControllers\DrawioImageController::class, 'getAsBase64']);
|
||||
Route::post('/images/drawio', [UploadControllers\DrawioImageController::class, 'create']);
|
||||
Route::get('/images/edit/{id}', [UploadControllers\ImageController::class, 'edit']);
|
||||
Route::put('/images/{id}', [UploadControllers\ImageController::class, 'update']);
|
||||
Route::delete('/images/{id}', [UploadControllers\ImageController::class, 'destroy']);
|
||||
|
||||
// Attachments routes
|
||||
Route::get('/attachments/{id}', [AttachmentController::class, 'get']);
|
||||
Route::post('/attachments/upload', [AttachmentController::class, 'upload']);
|
||||
Route::post('/attachments/upload/{id}', [AttachmentController::class, 'uploadUpdate']);
|
||||
Route::post('/attachments/link', [AttachmentController::class, 'attachLink']);
|
||||
Route::put('/attachments/{id}', [AttachmentController::class, 'update']);
|
||||
Route::get('/attachments/edit/{id}', [AttachmentController::class, 'getUpdateForm']);
|
||||
Route::get('/attachments/get/page/{pageId}', [AttachmentController::class, 'listForPage']);
|
||||
Route::put('/attachments/sort/page/{pageId}', [AttachmentController::class, 'sortForPage']);
|
||||
Route::delete('/attachments/{id}', [AttachmentController::class, 'delete']);
|
||||
Route::get('/attachments/{id}', [UploadControllers\AttachmentController::class, 'get']);
|
||||
Route::post('/attachments/upload', [UploadControllers\AttachmentController::class, 'upload']);
|
||||
Route::post('/attachments/upload/{id}', [UploadControllers\AttachmentController::class, 'uploadUpdate']);
|
||||
Route::post('/attachments/link', [UploadControllers\AttachmentController::class, 'attachLink']);
|
||||
Route::put('/attachments/{id}', [UploadControllers\AttachmentController::class, 'update']);
|
||||
Route::get('/attachments/edit/{id}', [UploadControllers\AttachmentController::class, 'getUpdateForm']);
|
||||
Route::get('/attachments/get/page/{pageId}', [UploadControllers\AttachmentController::class, 'listForPage']);
|
||||
Route::put('/attachments/sort/page/{pageId}', [UploadControllers\AttachmentController::class, 'sortForPage']);
|
||||
Route::delete('/attachments/{id}', [UploadControllers\AttachmentController::class, 'delete']);
|
||||
|
||||
// AJAX routes
|
||||
Route::put('/ajax/page/{id}/save-draft', [PageController::class, 'saveDraft']);
|
||||
Route::get('/ajax/page/{id}', [PageController::class, 'getPageAjax']);
|
||||
Route::delete('/ajax/page/{id}', [PageController::class, 'ajaxDestroy']);
|
||||
Route::put('/ajax/page/{id}/save-draft', [EntityControllers\PageController::class, 'saveDraft']);
|
||||
Route::get('/ajax/page/{id}', [EntityControllers\PageController::class, 'getPageAjax']);
|
||||
Route::delete('/ajax/page/{id}', [EntityControllers\PageController::class, 'ajaxDestroy']);
|
||||
|
||||
// Tag routes
|
||||
Route::get('/tags', [TagController::class, 'index']);
|
||||
Route::get('/ajax/tags/suggest/names', [TagController::class, 'getNameSuggestions']);
|
||||
Route::get('/ajax/tags/suggest/values', [TagController::class, 'getValueSuggestions']);
|
||||
Route::get('/tags', [ActivityControllers\TagController::class, 'index']);
|
||||
Route::get('/ajax/tags/suggest/names', [ActivityControllers\TagController::class, 'getNameSuggestions']);
|
||||
Route::get('/ajax/tags/suggest/values', [ActivityControllers\TagController::class, 'getValueSuggestions']);
|
||||
|
||||
// Comments
|
||||
Route::post('/comment/{pageId}', [CommentController::class, 'savePageComment']);
|
||||
Route::put('/comment/{id}', [CommentController::class, 'update']);
|
||||
Route::delete('/comment/{id}', [CommentController::class, 'destroy']);
|
||||
Route::post('/comment/{pageId}', [ActivityControllers\CommentController::class, 'savePageComment']);
|
||||
Route::put('/comment/{id}', [ActivityControllers\CommentController::class, 'update']);
|
||||
Route::delete('/comment/{id}', [ActivityControllers\CommentController::class, 'destroy']);
|
||||
|
||||
// Links
|
||||
Route::get('/link/{id}', [PageController::class, 'redirectFromLink']);
|
||||
Route::get('/link/{id}', [EntityControllers\PageController::class, 'redirectFromLink']);
|
||||
|
||||
// Search
|
||||
Route::get('/search', [SearchController::class, 'search']);
|
||||
@ -201,16 +181,16 @@ Route::middleware('auth')->group(function () {
|
||||
Route::get('/search/suggest', [SearchController::class, 'searchSuggestions']);
|
||||
|
||||
// User Search
|
||||
Route::get('/search/users/select', [UserSearchController::class, 'forSelect']);
|
||||
Route::get('/search/users/select', [UserControllers\UserSearchController::class, 'forSelect']);
|
||||
|
||||
// Template System
|
||||
Route::get('/templates', [PageTemplateController::class, 'list']);
|
||||
Route::get('/templates/{templateId}', [PageTemplateController::class, 'get']);
|
||||
Route::get('/templates', [EntityControllers\PageTemplateController::class, 'list']);
|
||||
Route::get('/templates/{templateId}', [EntityControllers\PageTemplateController::class, 'get']);
|
||||
|
||||
// Favourites
|
||||
Route::get('/favourites', [FavouriteController::class, 'index']);
|
||||
Route::post('/favourites/add', [FavouriteController::class, 'add']);
|
||||
Route::post('/favourites/remove', [FavouriteController::class, 'remove']);
|
||||
Route::get('/favourites', [ActivityControllers\FavouriteController::class, 'index']);
|
||||
Route::post('/favourites/add', [ActivityControllers\FavouriteController::class, 'add']);
|
||||
Route::post('/favourites/remove', [ActivityControllers\FavouriteController::class, 'remove']);
|
||||
|
||||
// Other Pages
|
||||
Route::get('/', [HomeController::class, 'index']);
|
||||
@ -220,41 +200,41 @@ Route::middleware('auth')->group(function () {
|
||||
Route::get('/permissions/form-row/{entityType}/{roleId}', [PermissionsController::class, 'formRowForRole']);
|
||||
|
||||
// Maintenance
|
||||
Route::get('/settings/maintenance', [MaintenanceController::class, 'index']);
|
||||
Route::delete('/settings/maintenance/cleanup-images', [MaintenanceController::class, 'cleanupImages']);
|
||||
Route::post('/settings/maintenance/send-test-email', [MaintenanceController::class, 'sendTestEmail']);
|
||||
Route::post('/settings/maintenance/regenerate-references', [MaintenanceController::class, 'regenerateReferences']);
|
||||
Route::get('/settings/maintenance', [SettingControllers\MaintenanceController::class, 'index']);
|
||||
Route::delete('/settings/maintenance/cleanup-images', [SettingControllers\MaintenanceController::class, 'cleanupImages']);
|
||||
Route::post('/settings/maintenance/send-test-email', [SettingControllers\MaintenanceController::class, 'sendTestEmail']);
|
||||
Route::post('/settings/maintenance/regenerate-references', [SettingControllers\MaintenanceController::class, 'regenerateReferences']);
|
||||
|
||||
// Recycle Bin
|
||||
Route::get('/settings/recycle-bin', [RecycleBinController::class, 'index']);
|
||||
Route::post('/settings/recycle-bin/empty', [RecycleBinController::class, 'empty']);
|
||||
Route::get('/settings/recycle-bin/{id}/destroy', [RecycleBinController::class, 'showDestroy']);
|
||||
Route::delete('/settings/recycle-bin/{id}', [RecycleBinController::class, 'destroy']);
|
||||
Route::get('/settings/recycle-bin/{id}/restore', [RecycleBinController::class, 'showRestore']);
|
||||
Route::post('/settings/recycle-bin/{id}/restore', [RecycleBinController::class, 'restore']);
|
||||
Route::get('/settings/recycle-bin', [EntityControllers\RecycleBinController::class, 'index']);
|
||||
Route::post('/settings/recycle-bin/empty', [EntityControllers\RecycleBinController::class, 'empty']);
|
||||
Route::get('/settings/recycle-bin/{id}/destroy', [EntityControllers\RecycleBinController::class, 'showDestroy']);
|
||||
Route::delete('/settings/recycle-bin/{id}', [EntityControllers\RecycleBinController::class, 'destroy']);
|
||||
Route::get('/settings/recycle-bin/{id}/restore', [EntityControllers\RecycleBinController::class, 'showRestore']);
|
||||
Route::post('/settings/recycle-bin/{id}/restore', [EntityControllers\RecycleBinController::class, 'restore']);
|
||||
|
||||
// Audit Log
|
||||
Route::get('/settings/audit', [AuditLogController::class, 'index']);
|
||||
Route::get('/settings/audit', [ActivityControllers\AuditLogController::class, 'index']);
|
||||
|
||||
// Users
|
||||
Route::get('/settings/users', [UserController::class, 'index']);
|
||||
Route::get('/settings/users/create', [UserController::class, 'create']);
|
||||
Route::get('/settings/users/{id}/delete', [UserController::class, 'delete']);
|
||||
Route::post('/settings/users/create', [UserController::class, 'store']);
|
||||
Route::get('/settings/users/{id}', [UserController::class, 'edit']);
|
||||
Route::put('/settings/users/{id}', [UserController::class, 'update']);
|
||||
Route::delete('/settings/users/{id}', [UserController::class, 'destroy']);
|
||||
Route::get('/settings/users', [UserControllers\UserController::class, 'index']);
|
||||
Route::get('/settings/users/create', [UserControllers\UserController::class, 'create']);
|
||||
Route::get('/settings/users/{id}/delete', [UserControllers\UserController::class, 'delete']);
|
||||
Route::post('/settings/users/create', [UserControllers\UserController::class, 'store']);
|
||||
Route::get('/settings/users/{id}', [UserControllers\UserController::class, 'edit']);
|
||||
Route::put('/settings/users/{id}', [UserControllers\UserController::class, 'update']);
|
||||
Route::delete('/settings/users/{id}', [UserControllers\UserController::class, 'destroy']);
|
||||
|
||||
// User Preferences
|
||||
Route::redirect('/preferences', '/');
|
||||
Route::get('/preferences/shortcuts', [UserPreferencesController::class, 'showShortcuts']);
|
||||
Route::put('/preferences/shortcuts', [UserPreferencesController::class, 'updateShortcuts']);
|
||||
Route::patch('/preferences/change-view/{type}', [UserPreferencesController::class, 'changeView']);
|
||||
Route::patch('/preferences/change-sort/{type}', [UserPreferencesController::class, 'changeSort']);
|
||||
Route::patch('/preferences/change-expansion/{type}', [UserPreferencesController::class, 'changeExpansion']);
|
||||
Route::patch('/preferences/toggle-dark-mode', [UserPreferencesController::class, 'toggleDarkMode']);
|
||||
Route::patch('/preferences/update-code-language-favourite', [UserPreferencesController::class, 'updateCodeLanguageFavourite']);
|
||||
Route::patch('/preferences/update-boolean', [UserPreferencesController::class, 'updateBooleanPreference']);
|
||||
Route::get('/preferences/shortcuts', [UserControllers\UserPreferencesController::class, 'showShortcuts']);
|
||||
Route::put('/preferences/shortcuts', [UserControllers\UserPreferencesController::class, 'updateShortcuts']);
|
||||
Route::patch('/preferences/change-view/{type}', [UserControllers\UserPreferencesController::class, 'changeView']);
|
||||
Route::patch('/preferences/change-sort/{type}', [UserControllers\UserPreferencesController::class, 'changeSort']);
|
||||
Route::patch('/preferences/change-expansion/{type}', [UserControllers\UserPreferencesController::class, 'changeExpansion']);
|
||||
Route::patch('/preferences/toggle-dark-mode', [UserControllers\UserPreferencesController::class, 'toggleDarkMode']);
|
||||
Route::patch('/preferences/update-code-language-favourite', [UserControllers\UserPreferencesController::class, 'updateCodeLanguageFavourite']);
|
||||
Route::patch('/preferences/update-boolean', [UserControllers\UserPreferencesController::class, 'updateBooleanPreference']);
|
||||
|
||||
// User API Tokens
|
||||
Route::get('/settings/users/{userId}/create-api-token', [UserApiTokenController::class, 'create']);
|
||||
@ -265,89 +245,89 @@ Route::middleware('auth')->group(function () {
|
||||
Route::delete('/settings/users/{userId}/api-tokens/{tokenId}', [UserApiTokenController::class, 'destroy']);
|
||||
|
||||
// Roles
|
||||
Route::get('/settings/roles', [RoleController::class, 'index']);
|
||||
Route::get('/settings/roles/new', [RoleController::class, 'create']);
|
||||
Route::post('/settings/roles/new', [RoleController::class, 'store']);
|
||||
Route::get('/settings/roles/delete/{id}', [RoleController::class, 'showDelete']);
|
||||
Route::delete('/settings/roles/delete/{id}', [RoleController::class, 'delete']);
|
||||
Route::get('/settings/roles/{id}', [RoleController::class, 'edit']);
|
||||
Route::put('/settings/roles/{id}', [RoleController::class, 'update']);
|
||||
Route::get('/settings/roles', [UserControllers\RoleController::class, 'index']);
|
||||
Route::get('/settings/roles/new', [UserControllers\RoleController::class, 'create']);
|
||||
Route::post('/settings/roles/new', [UserControllers\RoleController::class, 'store']);
|
||||
Route::get('/settings/roles/delete/{id}', [UserControllers\RoleController::class, 'showDelete']);
|
||||
Route::delete('/settings/roles/delete/{id}', [UserControllers\RoleController::class, 'delete']);
|
||||
Route::get('/settings/roles/{id}', [UserControllers\RoleController::class, 'edit']);
|
||||
Route::put('/settings/roles/{id}', [UserControllers\RoleController::class, 'update']);
|
||||
|
||||
// Webhooks
|
||||
Route::get('/settings/webhooks', [WebhookController::class, 'index']);
|
||||
Route::get('/settings/webhooks/create', [WebhookController::class, 'create']);
|
||||
Route::post('/settings/webhooks/create', [WebhookController::class, 'store']);
|
||||
Route::get('/settings/webhooks/{id}', [WebhookController::class, 'edit']);
|
||||
Route::put('/settings/webhooks/{id}', [WebhookController::class, 'update']);
|
||||
Route::get('/settings/webhooks/{id}/delete', [WebhookController::class, 'delete']);
|
||||
Route::delete('/settings/webhooks/{id}', [WebhookController::class, 'destroy']);
|
||||
Route::get('/settings/webhooks', [ActivityControllers\WebhookController::class, 'index']);
|
||||
Route::get('/settings/webhooks/create', [ActivityControllers\WebhookController::class, 'create']);
|
||||
Route::post('/settings/webhooks/create', [ActivityControllers\WebhookController::class, 'store']);
|
||||
Route::get('/settings/webhooks/{id}', [ActivityControllers\WebhookController::class, 'edit']);
|
||||
Route::put('/settings/webhooks/{id}', [ActivityControllers\WebhookController::class, 'update']);
|
||||
Route::get('/settings/webhooks/{id}/delete', [ActivityControllers\WebhookController::class, 'delete']);
|
||||
Route::delete('/settings/webhooks/{id}', [ActivityControllers\WebhookController::class, 'destroy']);
|
||||
|
||||
// Settings
|
||||
Route::get('/settings', [SettingController::class, 'index'])->name('settings');
|
||||
Route::get('/settings/{category}', [SettingController::class, 'category'])->name('settings.category');
|
||||
Route::post('/settings/{category}', [SettingController::class, 'update']);
|
||||
Route::get('/settings', [SettingControllers\SettingController::class, 'index'])->name('settings');
|
||||
Route::get('/settings/{category}', [SettingControllers\SettingController::class, 'category'])->name('settings.category');
|
||||
Route::post('/settings/{category}', [SettingControllers\SettingController::class, 'update']);
|
||||
});
|
||||
|
||||
// MFA routes
|
||||
Route::middleware('mfa-setup')->group(function () {
|
||||
Route::get('/mfa/setup', [\BookStack\Access\Controllers\MfaController::class, 'setup']);
|
||||
Route::get('/mfa/totp/generate', [\BookStack\Access\Controllers\MfaTotpController::class, 'generate']);
|
||||
Route::post('/mfa/totp/confirm', [\BookStack\Access\Controllers\MfaTotpController::class, 'confirm']);
|
||||
Route::get('/mfa/backup_codes/generate', [\BookStack\Access\Controllers\MfaBackupCodesController::class, 'generate']);
|
||||
Route::post('/mfa/backup_codes/confirm', [\BookStack\Access\Controllers\MfaBackupCodesController::class, 'confirm']);
|
||||
Route::get('/mfa/setup', [AccessControllers\MfaController::class, 'setup']);
|
||||
Route::get('/mfa/totp/generate', [AccessControllers\MfaTotpController::class, 'generate']);
|
||||
Route::post('/mfa/totp/confirm', [AccessControllers\MfaTotpController::class, 'confirm']);
|
||||
Route::get('/mfa/backup_codes/generate', [AccessControllers\MfaBackupCodesController::class, 'generate']);
|
||||
Route::post('/mfa/backup_codes/confirm', [AccessControllers\MfaBackupCodesController::class, 'confirm']);
|
||||
});
|
||||
Route::middleware('guest')->group(function () {
|
||||
Route::get('/mfa/verify', [\BookStack\Access\Controllers\MfaController::class, 'verify']);
|
||||
Route::post('/mfa/totp/verify', [\BookStack\Access\Controllers\MfaTotpController::class, 'verify']);
|
||||
Route::post('/mfa/backup_codes/verify', [\BookStack\Access\Controllers\MfaBackupCodesController::class, 'verify']);
|
||||
Route::get('/mfa/verify', [AccessControllers\MfaController::class, 'verify']);
|
||||
Route::post('/mfa/totp/verify', [AccessControllers\MfaTotpController::class, 'verify']);
|
||||
Route::post('/mfa/backup_codes/verify', [AccessControllers\MfaBackupCodesController::class, 'verify']);
|
||||
});
|
||||
Route::delete('/mfa/{method}/remove', [\BookStack\Access\Controllers\MfaController::class, 'remove'])->middleware('auth');
|
||||
Route::delete('/mfa/{method}/remove', [AccessControllers\MfaController::class, 'remove'])->middleware('auth');
|
||||
|
||||
// Social auth routes
|
||||
Route::get('/login/service/{socialDriver}', [\BookStack\Access\Controllers\SocialController::class, 'login']);
|
||||
Route::get('/login/service/{socialDriver}/callback', [\BookStack\Access\Controllers\SocialController::class, 'callback']);
|
||||
Route::post('/login/service/{socialDriver}/detach', [\BookStack\Access\Controllers\SocialController::class, 'detach'])->middleware('auth');
|
||||
Route::get('/register/service/{socialDriver}', [\BookStack\Access\Controllers\SocialController::class, 'register']);
|
||||
Route::get('/login/service/{socialDriver}', [AccessControllers\SocialController::class, 'login']);
|
||||
Route::get('/login/service/{socialDriver}/callback', [AccessControllers\SocialController::class, 'callback']);
|
||||
Route::post('/login/service/{socialDriver}/detach', [AccessControllers\SocialController::class, 'detach'])->middleware('auth');
|
||||
Route::get('/register/service/{socialDriver}', [AccessControllers\SocialController::class, 'register']);
|
||||
|
||||
// Login/Logout routes
|
||||
Route::get('/login', [\BookStack\Access\Controllers\LoginController::class, 'getLogin']);
|
||||
Route::post('/login', [\BookStack\Access\Controllers\LoginController::class, 'login']);
|
||||
Route::post('/logout', [\BookStack\Access\Controllers\LoginController::class, 'logout']);
|
||||
Route::get('/register', [\BookStack\Access\Controllers\RegisterController::class, 'getRegister']);
|
||||
Route::get('/register/confirm', [\BookStack\Access\Controllers\ConfirmEmailController::class, 'show']);
|
||||
Route::get('/register/confirm/awaiting', [\BookStack\Access\Controllers\ConfirmEmailController::class, 'showAwaiting']);
|
||||
Route::post('/register/confirm/resend', [\BookStack\Access\Controllers\ConfirmEmailController::class, 'resend']);
|
||||
Route::get('/register/confirm/{token}', [\BookStack\Access\Controllers\ConfirmEmailController::class, 'showAcceptForm']);
|
||||
Route::post('/register/confirm/accept', [\BookStack\Access\Controllers\ConfirmEmailController::class, 'confirm']);
|
||||
Route::post('/register', [\BookStack\Access\Controllers\RegisterController::class, 'postRegister']);
|
||||
Route::get('/login', [AccessControllers\LoginController::class, 'getLogin']);
|
||||
Route::post('/login', [AccessControllers\LoginController::class, 'login']);
|
||||
Route::post('/logout', [AccessControllers\LoginController::class, 'logout']);
|
||||
Route::get('/register', [AccessControllers\RegisterController::class, 'getRegister']);
|
||||
Route::get('/register/confirm', [AccessControllers\ConfirmEmailController::class, 'show']);
|
||||
Route::get('/register/confirm/awaiting', [AccessControllers\ConfirmEmailController::class, 'showAwaiting']);
|
||||
Route::post('/register/confirm/resend', [AccessControllers\ConfirmEmailController::class, 'resend']);
|
||||
Route::get('/register/confirm/{token}', [AccessControllers\ConfirmEmailController::class, 'showAcceptForm']);
|
||||
Route::post('/register/confirm/accept', [AccessControllers\ConfirmEmailController::class, 'confirm']);
|
||||
Route::post('/register', [AccessControllers\RegisterController::class, 'postRegister']);
|
||||
|
||||
// SAML routes
|
||||
Route::post('/saml2/login', [\BookStack\Access\Controllers\Saml2Controller::class, 'login']);
|
||||
Route::post('/saml2/logout', [\BookStack\Access\Controllers\Saml2Controller::class, 'logout']);
|
||||
Route::get('/saml2/metadata', [\BookStack\Access\Controllers\Saml2Controller::class, 'metadata']);
|
||||
Route::get('/saml2/sls', [\BookStack\Access\Controllers\Saml2Controller::class, 'sls']);
|
||||
Route::post('/saml2/acs', [\BookStack\Access\Controllers\Saml2Controller::class, 'startAcs'])->withoutMiddleware([
|
||||
Route::post('/saml2/login', [AccessControllers\Saml2Controller::class, 'login']);
|
||||
Route::post('/saml2/logout', [AccessControllers\Saml2Controller::class, 'logout']);
|
||||
Route::get('/saml2/metadata', [AccessControllers\Saml2Controller::class, 'metadata']);
|
||||
Route::get('/saml2/sls', [AccessControllers\Saml2Controller::class, 'sls']);
|
||||
Route::post('/saml2/acs', [AccessControllers\Saml2Controller::class, 'startAcs'])->withoutMiddleware([
|
||||
StartSession::class,
|
||||
ShareErrorsFromSession::class,
|
||||
VerifyCsrfToken::class,
|
||||
]);
|
||||
Route::get('/saml2/acs', [\BookStack\Access\Controllers\Saml2Controller::class, 'processAcs']);
|
||||
Route::get('/saml2/acs', [AccessControllers\Saml2Controller::class, 'processAcs']);
|
||||
|
||||
// OIDC routes
|
||||
Route::post('/oidc/login', [\BookStack\Access\Controllers\OidcController::class, 'login']);
|
||||
Route::get('/oidc/callback', [\BookStack\Access\Controllers\OidcController::class, 'callback']);
|
||||
Route::post('/oidc/login', [AccessControllers\OidcController::class, 'login']);
|
||||
Route::get('/oidc/callback', [AccessControllers\OidcController::class, 'callback']);
|
||||
|
||||
// User invitation routes
|
||||
Route::get('/register/invite/{token}', [\BookStack\Access\Controllers\UserInviteController::class, 'showSetPassword']);
|
||||
Route::post('/register/invite/{token}', [\BookStack\Access\Controllers\UserInviteController::class, 'setPassword']);
|
||||
Route::get('/register/invite/{token}', [AccessControllers\UserInviteController::class, 'showSetPassword']);
|
||||
Route::post('/register/invite/{token}', [AccessControllers\UserInviteController::class, 'setPassword']);
|
||||
|
||||
// Password reset link request routes
|
||||
Route::get('/password/email', [\BookStack\Access\Controllers\ForgotPasswordController::class, 'showLinkRequestForm']);
|
||||
Route::post('/password/email', [\BookStack\Access\Controllers\ForgotPasswordController::class, 'sendResetLinkEmail']);
|
||||
Route::get('/password/email', [AccessControllers\ForgotPasswordController::class, 'showLinkRequestForm']);
|
||||
Route::post('/password/email', [AccessControllers\ForgotPasswordController::class, 'sendResetLinkEmail']);
|
||||
|
||||
// Password reset routes
|
||||
Route::get('/password/reset/{token}', [\BookStack\Access\Controllers\ResetPasswordController::class, 'showResetForm']);
|
||||
Route::post('/password/reset', [\BookStack\Access\Controllers\ResetPasswordController::class, 'reset']);
|
||||
Route::get('/password/reset/{token}', [AccessControllers\ResetPasswordController::class, 'showResetForm']);
|
||||
Route::post('/password/reset', [AccessControllers\ResetPasswordController::class, 'reset']);
|
||||
|
||||
// Metadata routes
|
||||
Route::view('/help/wysiwyg', 'help.wysiwyg');
|
||||
|
Loading…
Reference in New Issue
Block a user