Lucid is an excellent Laravel helper package with model schema, factory definition, & observer methods. Also some Nova tweaks & helper commands for a better DX. Some of the package features include: define table schemas inside model classes via a schema method define factory definitions inside model classes via a definition method define observer events inside model classes via onX methods quickly install Laravel Nova with a single command

Lucid allows you to define table schemas directly inside model classes via a schema method: namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Schema\Blueprint; class Post extends Model { public function schema(Blueprint $table) { $table->id(); $table->string('title'); $table->string('slug'); $table->text('body'); $table->timestamps(); }}

Lucid allows you to define model observer events directly inside model classes via onX methods: namespace App\Models; use App\Jobs\SendNewPostNotifications; use Dionsaur84\Lucid\Traits\ObservesEvents; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Str; class Post extends Model { use ObservesEvents; public function onCreating() { $this->slug = Str::slug($this->title); } public function onCreated() { SendNewPostNotifications::dispatch($this); }}
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners