Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Attempt to read property "headers" on string

Well in my case, the error happened in my middleware called 
AuthenticationMiddleware when i tried the example below:

I was giving a return of a response without using the Response method. 

Error : return "Welcome, " . $request->session()->get('user')->name

Solution: return Response("Welcome, " . $request->session()->get('user')->name);
 
PREVIOUS NEXT
Tagged: #Attempt #read #property #string
ADD COMMENT
Topic
Name
1+2 =