Download the PHP package quintenmbusiness/laravelwired without Composer
On this page you can find all versions of the php package quintenmbusiness/laravelwired. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download quintenmbusiness/laravelwired
More information about quintenmbusiness/laravelwired
Files in quintenmbusiness/laravelwired
Package laravelwired
Short Description Model-driven Livewire forms and tables
License MIT
Informations about the package laravelwired
LaravelWired
LaravelWired is a small opinionated helper package that wires Eloquent models, Livewire components, and routes together with almost zero boilerplate.
It provides:
- Base Livewire components for model-driven forms and tables
- Traits you add to your Eloquent models
- Route macros that automatically register CRUD-style routes
- A predictable convention-over-configuration flow
This package is designed to be used inside an application, not necessarily as a standalone Composer-distributed package.
At this moment the package is still under development and it is not recommended to use in a production app at this time.
Installation
Since this is local to your app, register the service provider manually if needed:
Optionally publish the config and views:
Core Concepts
LaravelWired revolves around models declaring which Livewire components belong to them, and routes being generated from the model itself.
There are two main features:
- Model Forms
- Model Tables
Each is enabled by a trait on the model and a single route call.
Model Forms
1. Add the trait to your model
2. Create the Livewire form component
3. Define the routes
4. Routes that get registered
This single call generates:
| Method | URI | Name |
|---|---|---|
| GET | /categories/create | categories.create |
| GET | /categories/{id} | categories.show |
| GET | /categories/{id}/edit | categories.edit |
All routes:
- Are behind the
authmiddleware - Resolve to the Livewire component defined by the model
- Automatically receive an
actionparameter (create,show,edit)
Model Tables
1. Add the trait to your model
2. Create the Livewire table component
3. Define the routes
4. Routes that get registered
| Method | URI | Name |
|---|---|---|
| GET | /products | products.index |
This route renders the Livewire table component declared by the model.
Using Multiple Models
You can freely mix forms and tables:
No duplication, no manual route definitions.
What the Traits Do
HasModelForm
Requires the model to define (or inherit defaults for):
formComponent()formRoutePrefix()
These are used internally by the route macro.
HasModelTable
Requires the model to define (or inherit defaults for):
tableComponent()tableRoutePrefix()
Why This Exists
LaravelWired exists to:
- Remove repetitive CRUD route definitions
- Make Livewire components model-centric
- Keep routing expressive and minimal
- Allow large apps to scale CRUD behavior consistently
Philosophy
- Models declare behavior
- Routes stay thin
- Livewire handles UI logic
- Convention beats configuration
License
MIT