imritesh/livecrud
LiveCRUD for Laravel generates ready-to-use create, read, update, and delete interfaces with live, reactive updates. Scaffold CRUD screens fast, reduce boilerplate, and keep data in sync without writing repetitive controller and view code.
composer require imritesh/livecrud
livewire/livewire installed, @livewireStyles in <head>, and @livewireScripts before </body> in your layout.php artisan vendor:publish --provider="Imritesh\LiveCrud\LiveCrudServiceProvider"
Look in config/livecrud.php (or similarly named config) and the published stubs/ directory first — that tells you exactly what files the generator will emit and which placeholders it expects.php artisan make:model Post -m and php artisan migrate need to happen before generation.php artisan livecrud:generate Post).Route::get('/posts', \App\Http\Livewire\PostCrud::class);
If the page renders a Tailwind table with create/edit modals and delete buttons, you're set.First use case: pick a single, flat resource with no relationships — a Category or Post table with string, text, boolean, and date columns. That is the shape this package is optimized for. Treat it as a sprint-0 CRUD screen for an internal admin tool, not as a foundation for a public-facing app.
Route::get pointing at the class. If you need it inside an admin panel, wrap it with Route::middleware(['auth']) or mount it as a child component inside your existing layout:
@livewire('post-crud')
$search, tightening validation, changing the pagination count), edit the published stub instead. That's the package's main extension point.$rules from column definitions. After generating, move rules into a rules() method backed by a Form Request or a dedicated rules array so you can reuse them for API endpoints and tests.public $search and use WithPagination. Call $this->resetPage() inside updatingSearch() if it isn't already there, otherwise pagination breaks when filtering.$isOpen/$editingId flag. When adding fields, remember to reset them in both the create() and edit() methods — the generated code often only clears a subset.@livewireStyles/@livewireScripts into your existing layout once, and keep the generated view as a partial. Mixing the package's default layout with your own is the fastest way to get duplicate Tailwind resets.string→text, text→textarea, boolean→checkbox, date→date picker). That mapping is what you'll need to work around for enums, JSON columns, and foreign keys.composer conflicts or runtime errors around $emit, wire:model, and lifecycle hooks. Check composer.json constraints before installing; if needed, pin Livewire 2 in a separate app or vendor the stubs into your own generator.resources/views/livewire, so they're covered by a standard content config — but if Tailwind classes disappear in production it's almost always because the package's published views are outside your content globs. Add the path explicitly.@livewireScripts, no delete confirmation, no modals. It looks like broken JS but it's a missing directive.id as the key and $model->find($id) semantics. UUIDs, composite keys, and soft deletes generally aren't handled — you'll need to edit the generated edit()/delete() methods.Model::create($this->all()) or update($this->all()). Verify $fillable/$guarded on the model before shipping; a permissive $guarded = [] plus a generated form is an easy mass-assignment hole.WithFileUploads, belongsTo dropdowns, or $this->authorize() calls. Add these by hand — don't assume the scaffold implies them.nullable, max:255, and required get inferred; unique constraints, enums, and cross-field rules do not. Treat generated rules as a starting draft.dd() inside render() still works, but Livewire::dump()/the Livewire devtools browser extension will show you the round-trip payloads faster when a modal silently fails to open.NOASSERTION, meaning GitHub couldn't detect a recognized license file. If you're using this commercially, read LICENSE in the repo or contact the author — absence of a license is not permission.How can I help you explore Laravel packages today?