Back to buildsBUILD RECORD

Portfolio Site with Admin Panel / Early Laravel portfolio study / 2023

Preparing portfolio images during the upload flow.

My early Laravel CMS coursework resizes images before saving their paths and handles written edits separately from image replacement.

THE WORK

The project.

This 2023 coursework connects portfolio, blog and gallery editing to a Laravel website. Its portfolio upload path uses Intervention Image to create a 1020 by 519 image before saving the file path with the content. A text-only edit leaves that image untouched; an image replacement takes a separate branch. The study makes the difference between editing a record and managing its files visible in the controller.

IMPLEMENTATION

Design choices.

  1. Resizing on upload produces a stored image at the intended presentation dimensions. The page doesn't rely only on CSS to size the original file.
  2. Text-only edits skip image processing, keeping a description change from also replacing its associated file.
  3. The controller performs filesystem and database operations separately. A failure between them needs recovery handling rather than an assumption that one operation will undo the other.

HOW IT FITS TOGETHER

Architecture.

  • Web routes connect public pages and editing forms to controllers, which load and save the models rendered by Blade. The current route file also leaves several editing actions outside its authenticated group.
  • The portfolio upload handler resizes the file with Intervention Image, saves it and writes the resulting path to the record. On update, a file's presence selects the replacement branch; otherwise only the written fields change.
  • Portfolio deletion unlinks the image before removing the database record. Contact submissions take a separate storage path and are listed for administrative review.

MADE WITH

PHP · Laravel 10 · Blade · Eloquent · Intervention Image

ACCESS & INPUT

Security controls.

  • Several content-editing routes sit outside the authenticated group. Route protection and upload validation need work before this study could be reused as an admin system.

CHECKS & RESULTS

What was checked.

A source review shows what the code does. It is not a fresh test of the running app.

  1. Code and development records reviewedReviewed

    The code, tests and available development records were checked. Reported test results keep their original scope. No fresh app or live deployment check was run for this write-up.

    Scope of this check
    Code review, not a fresh run of the app

NEXT

Still to work through.

I keep this as an early learning snapshot, with its limitations visible. Editing-route protection, stronger upload checks and recovery after file or database failures come before any reuse. No current runtime result is claimed.