4 years ago

Trying to get property of non-object

Posted 4 years ago by Shiva

I'm getting this error

Trying to get property of non-object (View: C:\wamp\www\webkrunch-test\app\views\index.blade.php) 

I can't seem to see where that error is happening. My home controller

public function index()

        $menus = Menu::all();
        $menus_child = Menu::where('menu_id', 0)->with('menusP')->get();

        $content = Content::find('30');
        return View::make('index', compact('menus', 'menus_child', 'content'));

my index.blade.php


{{ $content->title }}
{{ $content->content }}


Please sign in or create an account to participate in this conversation.