I am using Laravel 5 and I have model class
class Apartment extends Property
{
protected $table = 'apartments';
}
and parent class
abstract class Property extends Model
{
protected $table = '';
public function doSomthing ()
{
echo $table = $this->getTable(); //$this->table
}
}
how I can read $table (apartments) or get table name in parent class
$this->getTable(); and $this->table and self::$table not work