Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

M-OMER-DEV's avatar

Livewire Component Rendering Issue

Hi, I am using livewire as the starter kit but when i try to use the routes as mentioned in the documentation Route::get('/', Home::class); , the server shows the error "Attempt to read property "name" on null" any quick fix for this , I imported the classes in the routes file too

0 likes
2 replies
kerelka's avatar

Need to show your controller for that. i assume it should be something wrong with your eloquent model.

between your controller or your view, it tried to access object name on something you called (Eloquent model or variabel)

and laravel tried to access name object but eloquent model or variable you called is null and cannot read property of name if the caller is null.

More like you want to calling someone name, but the people doesn't exist / null / empty

M-OMER-DEV's avatar

it was not about the controller , I was using incorrect method to render my components and layouts in views , now I have done it the right way , thankyou

Please or to participate in this conversation.