grungestranger/laravel-eloquent-table-name-trait
Eloquent trait to get the names of tables of your models statically.
13,820
1
| Install | |
|---|---|
composer require grungestranger/laravel-eloquent-table-name-trait |
|
| Latest Version: | v1.0.0 |
| PHP: | >=7.1.0 |
| License: | MIT |
| Last Updated: | Oct 17, 2019 |
| Links: | GitHub · Packagist |
Maintainer: grungestranger
grungestranger/laravel-eloquent-table-name-trait
Provides an Eloquent trait to get the names of tables of your models statically.
Requirements
- This package requires PHP 7.1+
- It works with Laravel >=4.2
Installation
Require this package with composer
composer require grungestranger/laravel-eloquent-table-name-trait
Load the trait in your Model.
use Grungestranger\TableName\TableName;
class Example extends Model {
use TableName;
}
To get the name of the table, use the static getTableName method:
Example::getTableName();
License
This open-source software is licensed under the MIT license.
Related Packages
koodoo/laravel-trait-uuid
A Laravel Eloquent Model trait for adding a UUID to Eloquent Models
16,699
0
ironshark/laravel-extendable
Traits for Laravel to add and manage custom Eloquent model fields.
11,037
24
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v1.0.0 | >=7.1.0 | >=4.2 | MIT |