Ok, I figured this one out.
I realize there' s a getTable() method in the Model class.
public function __construct()
{
$prefix = Config::get('database.connections.mysql.prefix');
$this->setTable( $prefix.$this->table );
}
That works, but isn´t the best way to do this. Just use Laravels function ;)
DB::getTablePrefix();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community