Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/OswalSnow/AR-Barber/llms.txt

Use this file to discover all available pages before exploring further.

AR Barbería gives each barber a public portfolio of haircut and style photos that potential customers can browse before booking. Images are uploaded directly from the staff panel, stored on the server’s public disk, and displayed dynamically in the Nuevos Cortes tab on the /servicios page. Any authenticated barber can remove their own photos at any time without any other changes required.

Where portfolio images appear

Portfolio images are loaded from the database and rendered on /servicios under the Nuevos Cortes tab. The tab is populated dynamically, so newly uploaded images appear immediately after upload without requiring a page rebuild or cache clear. Customers browsing /servicios can view the full gallery to get a sense of each barber’s style before choosing a service and making a booking.

Uploading a photo

1

Open the staff panel

Navigate to /dashboard and log in with your barber credentials if you have not already done so.
2

Locate the portfolio upload section

Scroll to the portfolio upload section at the bottom of the dashboard. It contains a file input and a Subir button.
3

Choose an image file

Click the file input and select a JPEG or PNG image from your device. The file must be no larger than 2 MB.
4

Click Subir

Click Subir to upload. The form sends a POST request to /staff/portfolio with the image attached as a multipart upload. On success, the image is saved to storage/app/public/portfolio/ and a database record is created.
Only JPEG and PNG files are accepted. The maximum file size is 2 MB (2048 KB). Files that exceed these limits are rejected by server-side validation before being stored.

File storage location

Uploaded images are stored on Laravel’s public disk under the portfolio/ path.
storage/app/public/portfolio/<filename>
To make these files publicly accessible via the web server, the storage directory must be symlinked to public/storage. Run this Artisan command once after deploying:
If portfolio images are not loading on /servicios, the storage symlink is likely missing. Run php artisan storage:link from the project root to create it.
php artisan storage:link

POST /staff/portfolio

POST /staff/portfolio
Content-Type: multipart/form-data
Authorization: session cookie (auth middleware)
Parameters
image
file
required
The image to upload. Must be a JPEG or PNG file, maximum 2048 KB (2 MB).
Example
curl --request POST \
  --url https://your-barbershop.com/staff/portfolio \
  --header 'Content-Type: multipart/form-data' \
  --form 'image=@/path/to/photo.jpg'

Deleting a photo

Authenticated staff see a Borrar Foto button beneath each portfolio image on the /servicios page. Clicking it sends a DELETE request to /staff/portfolio/{id}.
DELETE /staff/portfolio/{id}
Authorization: session cookie (auth middleware)
The controller removes the file from the public disk and deletes the corresponding database record. The image disappears from the Nuevos Cortes gallery immediately.
Deleting a portfolio image is permanent. The file is removed from the server’s public disk and cannot be recovered. Download a copy before deleting if you want to keep the photo.

Summary of portfolio endpoints

Upload image

POST /staff/portfolioAccepts a JPEG or PNG file up to 2 MB. Stores the file under storage/app/public/portfolio/ and creates a database record.

Delete image

DELETE /staff/portfolio/{id}Deletes the file from the public disk and removes the database record. Action is permanent.

Build docs developers (and LLMs) love