Support the ongoing development of Laravel.io →
Eloquent Views Blade
Last updated 2 years ago.
0

define your model in the alias array in config/app.php

0

Okey, and can I do this for only one controller? I mean I dynamically change the view from a fix controllers fix action. And I would use the models without namespace only in this controller.

0

your view is not included in the controller's namespace. it just parses blade to html. So i don't think you can for just a single controller. alias is the easiest way

0

Sign in to participate in this thread!

Eventy

Your banner here too?

ttimot24 ttimot24 Joined 21 Oct 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.