Answer the question
In order to leave comments, you need to log in
Why is the data from the Resource Controllers (show) method not displayed on the blade template?
Controller.php
public function show(Open $open)
{
// return view('admin.centerPage.center', [
// 'open' => Open::findOrFail($open)
// ]);
// return view('admin.centerPage.center')->with('open', $open);
$open = Open::query()->findOrFail($open);
return view('admin.centerPage.center', compact('open'));
}
<section class="content">
<div class="card">
<div class="card-body">
{{ $open->email }}
<br>
Start creating your amazing application!
</div>
<div class="card-footer">Footer</div>
</div>
</section>
Exception
Property [email] does not exist on this collection instance. (View: C:\Users\mylux\Desktop\OpenServer\domains\ADL\adminka\resources\views\admin\centerPage\center.blade.php)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question