BookStack/app/Http/Controllers
Dan Brown ff8dadefee
Reviewed recycle bin API PR and made changes
Made the following changes, many of these are just to align with
existing conventions.

- Updated urls to be hypenated, instead of underscored, to match other system endpoints.
- Updated URL parameter to be `deletionId` instead of `id`, and removed the ID-based comment on controller methods, so the required ID model is clear from the URL alone, since its not clear from the URL endpoint alone like existing endpoints. This follows the pattern used in the "web" routes.
- Added extra detail on some controller method comments, and copied permission comment to each method.
- Removed existing field visibility mechanisms to use simpler model-based visibility since we didn't need anything too special here (After some of my other changes).
- Allowed the "deletable" model to be shown in response to provide a little more detail on the main deleted item.
- Updated parent/child-count loading to be on the "deletable" model instead of additional properties which results in simpler controller logic and enforces the idea these are relations on the deletable, not the deletion itself. It also removes additional exposure of model namespacing.
- Updated (int) casts to intval, just since that's our most common conversion method in the codebase.
- Testing: Removed `actingAsAuthorizedUser` and used the admin user instead to prevent extra auth steps on each test.
- Testing: Cut logic/data-checks from tests if already covered by other tests.
- Testing: Added simple assertions for delete/restore response data.
- Examples: Updated list example to reflect changes.

Review of PR #3377
To be followed up with changes to polymorphic relations to hide
namespacing.
2022-04-25 17:54:59 +01:00
..
Api Reviewed recycle bin API PR and made changes 2022-04-25 17:54:59 +01:00
Auth Applied latest StyleCI changes 2022-02-24 15:04:09 +00:00
Images Standardised laravel validation to be array based 2021-11-05 00:26:55 +00:00
AttachmentController.php Fixed page editor back button sometimes going nowhere 2021-11-15 11:19:03 +00:00
AuditLogController.php Fix PHP CS 2021-12-10 14:58:05 +08:00
BookController.php Added ability to clone books 2021-12-19 19:20:31 +00:00
BookExportController.php
BookshelfController.php Applied latest StyleCI changes 2021-12-18 11:43:05 +00:00
BookSortController.php Changed model loading and permission checking on book sort 2022-01-04 21:09:34 +00:00
ChapterController.php Aligned chapter move permissions with page move permissions 2022-01-05 16:18:19 +00:00
ChapterExportController.php
CommentController.php Standardised laravel validation to be array based 2021-11-05 00:26:55 +00:00
Controller.php Updated with latest styleci changes 2022-02-08 15:29:58 +00:00
FavouriteController.php Added page titles to many missing app areas 2022-01-04 13:33:24 +00:00
HomeController.php Aligned some editor events, Changed wysiwyg custom styles loading 2022-02-08 01:01:37 +00:00
MaintenanceController.php Allowed database queue usage where desired 2021-12-13 18:34:18 +00:00
PageController.php Added parent context to recently updated items 2022-01-24 21:21:30 +00:00
PageExportController.php
PageRevisionController.php Added extendable/scalable formatter for webhook data 2022-03-26 16:53:02 +00:00
PageTemplateController.php
RecycleBinController.php Start recycle bin API endpoints: list, restore, delete 2022-04-07 22:34:00 +02:00
RoleController.php Applied latest styleCI changes 2022-01-06 12:18:11 +00:00
SearchController.php Applied StyleCI changes 2021-11-13 13:28:17 +00:00
SettingController.php Fixed settings redirect issue and custom head display 2022-03-30 19:15:24 +01:00
StatusController.php Added inital phpstan/larastan setup 2021-11-05 16:18:06 +00:00
TagController.php Added page titles to many missing app areas 2022-01-04 13:33:24 +00:00
UserApiTokenController.php Standardised laravel validation to be array based 2021-11-05 00:26:55 +00:00
UserController.php Applied StyleCI changes, updated readme badges & roadmap 2022-02-13 13:16:43 +00:00
UserProfileController.php Made a pass to clean up UserRepo 2022-02-13 12:56:26 +00:00
UserSearchController.php Applied latest StyleCI changes 2021-12-15 13:49:20 +00:00
WebhookController.php Applied latest styleCI changes 2022-01-06 12:18:11 +00:00