agentsclimarketplace

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

Install
npx -y skills add Apikmmar/agent-laravel-skills --skill webbyx-laravel-media

Assembled 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)

  • HasMedia interface + InteractsWithMedia trait
  • getFirstMediaUrlInCollection() — returns { id, full_url, thumb_url, type }
  • getAllMediaUrlInCollection() — returns array of the same shape
  • registerMediaConversions() — registers thumb (640px, JPG, non-queued)

BaseController (app/Http/Controllers/Controller.php)

  • uploadMedia() — accepts model, field name, collection name; returns updated media shape
  • deleteMedia() — accepts model, collection, media ID; verifies ownership then deletes; returns updated media shape

Steps

  1. Read app/Models/BaseModel.php and app/Http/Controllers/Controller.php
  2. Add only what is missing — never duplicate existing methods
  3. See the reference implementation below and add only what is missing

@references/MEDIA.md

Keep looking

Skills are one crate of 626,474. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.