Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to add Views namespace causes a fatal error #6578

Closed
Binternet opened this issue Dec 4, 2014 · 1 comment
Closed

Trying to add Views namespace causes a fatal error #6578

Binternet opened this issue Dec 4, 2014 · 1 comment

Comments

@Binternet
Copy link

I Want to add mobile support [not responsive, yet a whole different views dir] in laravel,
so I did a view-configuration based on agent detection, see http://pastebin.com/H2d0sszS with the full code. for some reason, line #22 breaks the code.

Now, for emails, I want to use a single directory for both desktop/mobile versions of the site so I'm trying to set a namespace for it and then everything breaks.

I tried placing the View::addNamespace in app/start/global.php but then I a different error:
Symfony \ Component \ Debug \ Exception \ FatalErrorException --> Method Illuminate\View\View::__toString() must not throw an exception

And that suddenly happens in vendor/laravel/framework/src/Illuminate/Database/Connection.php

Any ideas?

@jasonlewis
Copy link
Contributor

That exceptions sounds like there's something wrong with the view itself. Make sure the views are right and that they don't have any errors, because to me it sounds like the view is causing the error. The namespace setup looks fine and shouldn't be breaking it.

As an aside, this is probably better off on the Laravel forums and not as a GitHub issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants