I noticed some strange behaviour in my application (Laravel 5.4.33).
As soon as I use the following snippets within my views (any kind of Auth:: combination) it breaks my code at this part of the code, but I don't get any errors
Let's clean that view up anyway. If the user isn't logged in, then they shouldn't even have a notifications dropdown.
So, wrap all of that dropdown between an if statement to check whether a user is signed in. Then you don't need to check whether they're authenticated for the classes etc.
@JackJones
Unfortunately this doesn't work, the code still breaks.
@Snapey
PHP 7.0 has configured 128mb and 7.1 has even 512mb configured in my php.ini, so it shouldn't be a memory issue as it seems. Also I don't have any notifications in my database, so count returns 0 at the moment.
@Jaytee
This doesn't help either, anything like Auth::check oder Auth::user still breaks the code.
I am quite clueless why this is happening, it never happended before with PHP 7.0 and switching back to this version isn't an option for me :(
everything seems normal so far.
I have about 7-8 queries inside my dashboard view.
At the most I have about 17 queries in a meal listing view, but I have to optimize it later on.
Isn't profiling and collecting params on every request via xdebug resource hungry? My app works now much faster after I removed the code snippet above.
Do you mean there could be some more problems in my app causing this to happen with xdebug?