New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

grungestranger/laravel-eloquent-table-name-trait

Eloquent trait to get the names of tables of your models statically.
13,831 1
Install
composer require grungestranger/laravel-eloquent-table-name-trait
Latest Version:v1.0.0
PHP:>=7.1.0
Laravel:4 · 5 · 6
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

pawelmysior/laravel-publishable

Toggle the published state of your Eloquent models easily

19,442 22
koodoo/laravel-trait-uuid

A Laravel Eloquent Model trait for adding a UUID to Eloquent Models

16,731 0
koodoo/laravel-trait-updatedby

A Laravel Eloquent Model trait for adding User Id's to Eloquent Models

16,642 1
greabock/tentacles

Da epic tentacles for Eloquent

34,559 36
p-andrey/tentacles

Da epic tentacles for Eloquent

13,852 1

Version History

Version Released PHP Laravel License
v1.0.0 >=7.1.0 >=4.2 MIT