Skip to main content

Laravel Prompt to Generate a Filament 3 Resource

Generate a complete Filament 3 admin resource — forms, tables, filters, custom actions, relation managers, media uploads, and exports.

Füllen Sie die Platzhalter aus

Edit the values, then copy your finished prompt.

Ihr Prompt
prompt.txt

                                

What this prompt does

This prompt asks the AI to scaffold a complete Filament 3 admin resource for one Eloquent model, end to end. Instead of generating a bare resource and leaving you to wire up the form, table, filters, and actions by hand, it spells out eight concrete deliverables in a single pass: a form schema, a sortable/searchable table, relation managers, custom actions, validation, media uploads, translatable fields, and an export action.

The structure works because it forces the model name and its surrounding concerns to be decided up front. You set [model_name] to the model you're managing, list the [form_fields] so the AI picks correct field types (rich editor vs text vs select), declare a [filter_count] so the table isn't under- or over-filtered, name the [relations] that need relation managers, the [custom_actions] beyond the default CRUD, and the [export_format]. Because each variable maps to a real Filament concern, the output lands close to production rather than a generic stub.

When to use it

  • Standing up a new admin panel section for a model that needs full CRUD plus media and exports
  • Scaffolding a resource where you already know the fields and relations but don't want to type the boilerplate
  • Building a content-managed model (posts, products) that needs a rich editor and a featured image
  • Adding a resource that must stay consistent with Form Request validation used elsewhere in the app
  • Generating translatable resources for multi-locale admin panels
  • Wiring publish/archive/duplicate-style workflow actions onto an existing model

Example output

You get a set of PHP files: a Filament Resource class with form() and table() methods, one or more relation manager classes, and supporting bits like a Form Request and an export action. The form uses typed components matching your [form_fields], the table declares searchable/sortable columns plus the requested [filter_count] filters, and the custom actions appear as table or header actions. Expect navigation grouping and Spatie Media Library wiring included rather than as an afterthought.

Pro tips

  • Be specific in [form_fields] — note which field is a rich editor, which is a select, and which is the featured image, so the AI doesn't default everything to text inputs
  • Keep [filter_count] honest; four well-chosen filters beat ten that nobody uses, and the AI will pad to hit the number you give
  • List only the [relations] you actually manage inline — extra relation managers add clutter and queries
  • Name [custom_actions] as verbs (publish, archive, duplicate) so the AI generates the right action callbacks and confirmation modals
  • Confirm the generated validation matches your real Form Request rules; treat the prompt output as a starting contract, not gospel
  • Set [export_format] to exactly what you need (CSV and Excel) so it doesn't scaffold export plumbing you'll never ship

Frequently Asked Questions

Does this prompt generate the Form Request validation too?
Yes, item five of the prompt asks for validation using Form Request rules. You should still review the generated rules against your real requirements, since the AI infers them from field names rather than your domain logic.
Will it set up Spatie Media Library for image uploads?
Yes, the prompt explicitly requests image upload wiring with Spatie Media Library. Make sure the package is installed and your model uses the InteractsWithMedia trait, because the AI assumes that setup exists.
Can I use this for a model that doesn't need translations or exports?
You can, but trim those numbered requirements from the prompt first. Otherwise the AI will scaffold translatable fields and an export action you don't need, which adds code you then have to delete.
Does it follow Filament 3 conventions specifically?
The prompt asks for Filament 3 best practices including navigation grouping. Filament 3 and Filament 4 differ in some APIs, so verify the generated method signatures against your installed version before running it.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

Mehr in Laravel & PHP Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support