The function str_random() has been deprecated with message: Str::random() should be used directly instead. Will be removed in Laravel 5.9.
This function has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be
removed from the class and what other function to use instead.
The method json does only exist in Illuminate\Contracts\Routing\ResponseFactory, but not in Illuminate\Http\Response.
It seems like the method you are trying to call exists only in some of the
possible types.
Let’s take a look at an example:
classA{publicfunctionfoo(){}}classBextendsA{publicfunctionbar(){}}/** * @param A|B $x */functionsomeFunction($x){$x->foo();// This call is fine as the method exists in A and B.$x->bar();// This method only exists in B and might cause an error.}
This function has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.