โ˜… Getting information about all the models in your Laravel app

1 ยท Freek Van der Herten ยท Sept. 7, 2022, 8:44 a.m.
I'm proud to announce that our team has released a new small package: spatie/laravel-model-info. Let's take a look at what this package can do. Using laravel-model-info This package makes it easy to determine your model classes' attributes and relations. use Spatie\ModelInfo\ModelInfo; $modelInfo = ModelInfo::forModel(YourModel::class); // returns the filename that contains your model $modelInfo->fileName; // returns the name of the table your models are stored in $modelInfo->tableName; /...