hades

Hades is a premium package, get your license here

Installation

You can install Lara Zeus Hades by running the following commands in your Laravel project directory.

1composer require lara-zeus/hades

Usage:

you only need to add one trait to your create page:

1use LaraZeus\Hades\Concerns\UseDraftable;
2 
3class CreateCar extends CreateRecord
4{
5 use UseDraftable; // <<< Add this
6 
7 protected static string $resource = CarResource::class;
8}

customize the actions:

to change the label, color, size or icons for the actions, simply, override the actions:

1protected function getFormActions(): array
2{
3 return [
4 ...parent::getFormActions(),
5 
6 Action::make('saveDraft')
7 ->action(fn () => $this->saveDraft())// << dont forget this
8 ->color('info'),
9 Action::make('restoreDraft')
10 ->action(fn () => $this->restoreDraft())// << dont forget this
11 ->color('info'),
12 ];
13}

excluded form Inputs:

you can prevent saving any form input on your class:

1public ?array $excludedInputs = ['password'];

Zeus is an open-source project. Thanks to my sponsors for helping me maintain this project.