Webbyx laravel media
Skill Apikmmar/agent-laravel-skills/skills/webbyx-laravel-media
Use when adding media or file upload support to the project. Triggers when user asks to add media, implement file uploads, manage file collections, add image support, or set up Spatie media library integration on BaseModel or BaseController.From its SKILL.md
npx -y skills add Apikmmar/agent-laravel-skills --skill webbyx-laravel-mediaAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.3 KB, as published. Nobody here has run it
Rule
Add all media methods directly to App\Models\BaseModel and App\Http\Controllers\Controller. This is the only place media logic lives — modules inherit it automatically.
What to Add
BaseModel (app/Models/BaseModel.php)
HasMediainterface +InteractsWithMediatraitgetFirstMediaUrlInCollection()— returns{ id, full_url, thumb_url, type }getAllMediaUrlInCollection()— returns array of the same shaperegisterMediaConversions()— registersthumb(640px, JPG, non-queued)
BaseController (app/Http/Controllers/Controller.php)
uploadMedia()— accepts model, field name, collection name; returns updated media shapedeleteMedia()— accepts model, collection, media ID; verifies ownership then deletes; returns updated media shape
Steps
- Read
app/Models/BaseModel.phpandapp/Http/Controllers/Controller.php - Add only what is missing — never duplicate existing methods
- See the reference implementation below and add only what is missing
@references/MEDIA.md