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
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2wIvtQJ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire