is it possible to get model name inside resource?

is it possible to get model name inside resource? i want to get model name and query it like this
(fn (Builder $query) => $query->where('type', $modelName/$resourcesName)->where('deleted_at',)),
(fn (Builder $query) => $query->where('type', $modelName/$resourcesName)->where('deleted_at',)),
Is that possible? thank you!
Solution:
you can use static::getModel() and it will return the class...
Jump to solution
2 Replies
Solution
Lara Zeus
Lara Zeus2mo ago
you can use static::getModel() and it will return the class
thyk123
thyk1232mo ago
Thank you!
Want results from more Discord servers?
Add your server
More Posts