how to resources field data in model

I need resources form field data in my model boot method but those field data is not related to that model so i cannot get those data in model attributes how to get those that
3 Replies
Dennis Koch
Dennis Koch2y ago
Can you please explain what you are trying to do? Because I didn't understand anything
ba_mbi_07
ba_mbi_07OP2y ago
There are some form field in resource which are not related to my model but i need to get those form field data in boot method
protected static function boot()
{
parent::boot();
static::created(function (Model $model) {
dd($model);

$currentUserId = Auth::id();
$currentTime = Carbon::now();

WpTermTaxonomy::create([
"term_id" => $model->term_id,
"taxonomy" => "kheltags",
"parent" => 3,
"description" => ""
]);

});
}
protected static function boot()
{
parent::boot();
static::created(function (Model $model) {
dd($model);

$currentUserId = Auth::id();
$currentTime = Carbon::now();

WpTermTaxonomy::create([
"term_id" => $model->term_id,
"taxonomy" => "kheltags",
"parent" => 3,
"description" => ""
]);

});
}
Dennis Koch
Dennis Koch2y ago
Use a filament lifecycle hook instead of a model event
Want results from more Discord servers?
Add your server