Answers for "laravel get model table name"

PHP
4

laravel model tablename

protected $table = 'DomainRelatedSettings';
Posted by: Guest on January-07-2021
1

get table column names sql laravel

use Illuminate\Support\Facades\Schema;

use Illuminate\Support\Facades\DB;

public function getTableColumns($table)
{
    return DB::getSchemaBuilder()->getColumnListing($table);

    // OR

    return Schema::getColumnListing($table);

}
Posted by: Guest on December-05-2020
1

get table name from model laravel

$item = new Item;
$table = $item->getTable();
print_r($table);
Posted by: Guest on October-11-2020

Code answers related to "laravel get model table name"

Browse Popular Code Answers by Language