DashboardController
The main admin dashboard controller that displays the admin panel home page. Namespace:App\Http\Controllers\Admin\DashboardController
dashboard()
Display the admin dashboard home page. Route:GET /admin (admin.dashboard)
Middleware: auth, verified, permission:access.admin.panel
Returns: View - Admin dashboard view
Example:
AlbumController
Handles album management operations in the admin panel. Namespace:App\Http\Controllers\Admin\AlbumController
Routes: Resource controller under admin/gallery/albums prefix
index()
Display a listing of all photo albums with their cover photos and photo counts. Route:GET /admin/gallery/albums (admin.gallery.albums.index)
Returns: View - Admin albums listing page
Example:
- Eager loads the
cover_photorelationship - Includes a count of photos in each album
- Ordered by creation date (newest first)
create()
Show the form for creating a new album. Route:GET /admin/gallery/albums/create (admin.gallery.albums.create)
Status: Not yet implemented
Source: Admin/AlbumController.php:27
store()
Store a newly created album in storage. Route:POST /admin/gallery/albums (admin.gallery.albums.store)
HTTP request containing album data
show()
Display a specific album. Route:GET /admin/gallery/albums/{id} (admin.gallery.albums.show)
The album ID
edit()
Show the form for editing a specific album. Route:GET /admin/gallery/albums/{id}/edit (admin.gallery.albums.edit)
The album ID
update()
Update a specific album in storage. Route:PUT/PATCH /admin/gallery/albums/{id} (admin.gallery.albums.update)
HTTP request containing updated album data
The album ID
destroy()
Remove a specific album from storage. Route:DELETE /admin/gallery/albums/{id} (admin.gallery.albums.destroy)
The album ID
PhotoController
Handles photo management operations in the admin panel with full CRUD functionality. Namespace:App\Http\Controllers\Admin\PhotoController
Routes: Resource controller under admin/gallery/photos prefix
index()
Display a listing of all photos with their media attachments. Route:GET /admin/gallery/photos (admin.gallery.photos.index)
Returns: View - Admin photos listing page
Example:
create()
Show the form for creating a new photo. Route:GET /admin/gallery/photos/create (admin.gallery.photos.create)
Returns: View - Photo creation form
Example:
store()
Store a newly created photo in storage. Route:POST /admin/gallery/photos (admin.gallery.photos.store)
Form request with validated photo data
RedirectResponse - Redirects to photos index with success message
Example:
StorePhotoRequest validation rules are currently empty and need to be implemented.
Source: Admin/PhotoController.php:32
show()
Display a specific photo. Route:GET /admin/gallery/photos/{photo} (admin.gallery.photos.show)
Photo instance (route model binding)
View - Photo detail page
Example:
edit()
Show the form for editing a specific photo. Route:GET /admin/gallery/photos/{photo}/edit (admin.gallery.photos.edit)
Photo instance (route model binding)
View - Photo edit form
Example:
update()
Update a specific photo in storage. Route:PUT/PATCH /admin/gallery/photos/{photo} (admin.gallery.photos.update)
Form request with validated photo data
Photo instance to update (route model binding)
RedirectResponse - Redirects to photos index with success message
Example:
UpdatePhotoRequest validation rules are currently empty and need to be implemented.
Source: Admin/PhotoController.php:58
destroy()
Remove a specific photo from storage. Route:DELETE /admin/gallery/photos/{photo} (admin.gallery.photos.destroy)
Photo instance to delete (route model binding)
RedirectResponse - Redirects to photos index with success message
Example:
GalleryController (Admin)
Alternative admin gallery controller with simplified album and photo views. Namespace:App\Http\Controllers\Admin\GalleryController
Note: This controller appears to be an alternative to the resource controllers above.
Albums()
Display all albums with cover photos and photo counts. Returns:View - Admin gallery albums page
Example:
Photos()
Display all photos with their media attachments. Returns:View - Admin gallery photos page
Example:
URLShortener
Manages the URL shortener tool in the admin panel. Namespace:App\Http\Controllers\Admin\URLShortener
index()
Display the URL shortener management page. Route:GET /admin/url-shortener (admin.url.short)
Middleware: auth, verified, permission:access.admin.panel
Returns: View - URL shortener admin page
Example:
URLRedirect
Manages URL redirects in the admin panel. Namespace:App\Http\Controllers\Admin\URLRedirect
index()
Display the URL redirect management page. Route:GET /admin/url-redirect (admin.url.redirect)
Middleware: auth, verified, permission:access.admin.panel
Returns: View - URL redirect admin page
Example:
Middleware
All admin controllers are protected by the following middleware:auth- Requires authenticated userverified- Requires email verificationpermission:access.admin.panel- Requires admin panel access permission
Route Grouping
All admin routes are grouped under the/admin prefix with the admin. name prefix: