Hik
Hik
Explore posts from servers
FFilament
Created by Hik on 8/16/2024 in #❓┊help
Form Wizard multiple models
is it possible to submit the form in the first step and then submit again in the final step?
7 replies
FFilament
Created by Moh Widodo Nurcahyono on 7/18/2024 in #❓┊help
invoice number in a field
this is if you want to create it after the record is saved in the db. User model:
public static function boot()
{
parent::boot();

self::creating(function ($model) {
// ... code here
});

self::created(function ($model) {
// USER00001
$model->special_identifier = 'USER' . str_pad($model->id, 5, '0', STR_PAD_LEFT);

$model->save(); // You need to save again since this happens after creation
});

self::updating(function ($model) {
// ... code here
});

self::updated(function ($model) {
// ... code here
});

self::deleting(function ($model) {
// ... code here
});

self::deleted(function ($model) {
// ... code here
});
}
public static function boot()
{
parent::boot();

self::creating(function ($model) {
// ... code here
});

self::created(function ($model) {
// USER00001
$model->special_identifier = 'USER' . str_pad($model->id, 5, '0', STR_PAD_LEFT);

$model->save(); // You need to save again since this happens after creation
});

self::updating(function ($model) {
// ... code here
});

self::updated(function ($model) {
// ... code here
});

self::deleting(function ($model) {
// ... code here
});

self::deleted(function ($model) {
// ... code here
});
}
4 replies
FFilament
Created by Hik on 8/16/2024 in #❓┊help
js date time picker time interval
No description
3 replies
FFilament
Created by Hik on 8/16/2024 in #❓┊help
Best option to generate translations
Cool thanks for the reply
4 replies