grungestranger / laravel-eloquent-table-name-trait
Eloquent trait to get the names of tables of your models statically.
Installs: 10 645
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 1
Requires
- php: >=7.1.0
- laravel/framework: >=4.2
This package is auto-updated.
Last update: 2025-04-17 21:25:26 UTC
README
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.