Views 203
Copies 164

Community Discussion

4.2 (26 reviews)

No comments yet. Be the first to share your thoughts!

100% Free

Laravel Artisan — Full Feature Generator

Intermediate #qfqVN2pF 1 month ago
Prompt
Created by Prompt
PROMPT
1026 chars Claude 3.5 Sonnet
You are a senior Laravel developer. Generate a complete feature implementation for: ## Feature: [Describe the feature] ## Laravel Version: [10/11/12] ## Generate all of the following: ### 1. Migration - Table with all necessary columns, proper types, indexes - Foreign keys with cascade rules - Include timestamps and soft deletes if appropriate ### 2. Model - Fillable fields, casts, relationships - Scopes for common queries - Accessors/mutators where needed ### 3. Controller (Resource) - index, create, store, show, edit, update, destroy - Proper authorization checks - Eager loading to prevent N+1 - Flash messages for user feedback ### 4. Form Request - Validation rules for store and update - Custom error messages in English - Authorization method ### 5. Routes - Resource routes with middleware - Named routes ### 6. Blade Views - index with pagination and search - create/edit form with validation errors - show page with related data Follow Laravel naming conventions strictly. Use Eloquent best practices.

How to Use This Prompt

1. Describe your feature clearly (e.g., 'Blog system with posts, categories, and tags').
2. Specify your Laravel version — syntax differs between 10, 11, and 12.
3. Mention if you use any packages (Spatie permissions, Laravel Sanctum, etc.).
4. If this feature relates to existing models, describe those relationships.
5. Copy each generated file into the correct Laravel directory. Run 'php artisan migrate' after adding the migration.
Created Feb 13, 2026
Updated 1 month ago
Language English
Version 3.5

Similar Prompts

View All