© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
11 replies
Schilly

dynamic Use $class;

I am working on making a plugin / module / whatever you want to call it...

I am curious to know if it is possible to dynamically call a model name based off a config value.

EG: config value is:
USER_MODEL = "\App\Model\User"
USER_MODEL = "\App\Model\User"
and in the model class I want to be able to dynamically set that for the:

Use $user_model;
Use $user_model;
part at the top..

I am not sure if this is even possible or not?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Dynamic columns on Importer class
FilamentFFilament / ❓┊help
2y ago
Use of unknown class: ..
FilamentFFilament / ❓┊help
2y ago
How to use ViewComponent Class
FilamentFFilament / ❓┊help
3y ago
Issue with Dynamic Class Application in `TextInput::make`
FilamentFFilament / ❓┊help
17mo ago