protected $table = 'DomainRelatedSettings';
protected $table = 'table_name';
//$this refer to model that you are in that
$this->getTable();
$model->getTable();
public $table = "dpl_user";
protected $fillable = [ 'user_id', 'fname', 'lname', 'email', 'phone', 'msg'];
$item = new Item;
$table = $item->getTable();
print_r($table);
class BaseModel extends Eloquent {
public static function getTableName()
{
return with(new static)->getTable();
}
}
class User extends BaseModel {
}
User::getTableName();