Support the ongoing development of Laravel.io →
posted 8 years ago
Blade Forms
Last updated 2 years ago.
0
Solution

Why are you passing a string literal as the model to Form::model that should be an instance of a model.

0

I tried with

$page = Page::findOrFail($id)->first();
return view('pages.index', compact('page'));

or

$page = Page::findOrFail($id);
return view('pages.index', compact('page'));

with same result:

{!! $page->title !!}

prints out the title in the page (so I think the model is correctly passed to the view), but the form's fields are empty.. :(

Please, can you be a little more clear?

Thank you in advance.

0

Sorry, now I see the quotes around $page on Form::model()... Thank you so much... It was very late last night, I should have gone in bed...

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

giraz82 giraz82 Joined 9 Apr 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.