0
I need to get the table name that is used by determined model
in my written application in Laravel
.
In the past, in the Laravel 3
, it was only necessary to do this to find out the table name:
var_dump(MeuModel::$table);
However, in the Laravel 4 >=
this property is no longer static, let alone public
.
For example:
class Usuario extends Eloquent
{
protected $table = 'tbl_usuarios';
}
That is, with the property being protected
cannot catch it "outside the model instance".
I need, in Controller, I can get the value of protected $table
to display it.
Is there any way to do that in the Laravel
?