Why do you still need to say:
use MyClass\Table\Facades\Table
;
at the top of a laravel controller
even if you have specified it in app/config/app.php
'aliases' => [
'Table' => MyClass\Table\Facades\Table::class,
Why do you still need to say:
use MyClass\Table\Facades\Table
;
at the top of a laravel controller
even if you have specified it in app/config/app.php
'aliases' => [
'Table' => MyClass\Table\Facades\Table::class,
You don't?
'aliases' => [
'MyClass' => Some\Vendor\Something\Facades\MyClass::class,
]
Then you can do
use Myclass;
class MyController extends Controller {
public function fetch($id) {
return MyClass::find(1)
}