1 Commits
Author SHA1 Message Date
Parsa Aghayi 99f786265e Let the admin panel manage services, skills and testimonials
These three had read endpoints or nothing at all, so their content could only
be changed by hand in the database. All writes are admin-only and rate
limited like the existing admin routes.

Testimonials are the awkward one: the migration that collapsed the legacy
per-locale tables into JSON columns deliberately skipped them, so they still
live in a child table. Testimonial therefore exposes a translations accessor
to present the same translations[key][locale] shape as Service and Skill,
which is what the generic resource form binds to. Reading the child relation
has to go through getRelation(), since a plain $this->translations inside an
accessor of that name re-enters the accessor and silently yields nulls.

The store requests now mark the NOT NULL columns as required. Leaving them
nullable let a bad payload reach the database and come back as a 500 instead
of a 422, and about_me_id is additionally a cascading foreign key.

Also registers the three resources with the admin read endpoint so the panel
can list them, eager loading the relations their forms need.
2026-10-01 18:19:32 -04:00