To answer http://forumsarchive.laravel.io/viewtopic.php?id=11485
$test = new Test();
$test->setTable('fields');
$data = $test->getQuery()->find(1);
You need the getQuery function before the find for to get past the "Base table or view not found: 1146 Table 'test.tests' doesn't exist" error.
Unfortunately findOrFail doesn't work this way.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community