Answer the question
In order to leave comments, you need to log in
Error in Laravel ( Whoops, looks like something went wrong.), how to fix it?
Good day to all!
Guys, for some reason, one of the users stopped opening the page after patching phpmyadmin. Error . How to fix it?
Thank you!
Answer the question
In order to leave comments, you need to log in
Most likely, the error is somewhere here, since the follower is simply absent, and therefore its attributes cannot be obtained.
To prevent such errors, you need to use the optional () helper function.
But it is better to think over the architecture in such a way as to check for the presence of a follower and display / not display information about it
More you can use such a short construction of PHP itself$follower->follower->username_slug ?? 'undefined';
In the error you wrote
In Russian, this means that on line 124 of the userapp.blade.php file, you are calling a field that does not exist in the object. Here is a simpler example that will have the same error
<?php
$obj = null;
$obj->a;
<?php
$obj = null;
if (is_object($obj) && property_exists($obj, 'a')) {
$obj->a;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question