return view('assessments.edit')->with('$editassessments', $editassessments);
The first parameter is a string which will be available as variable in the view, you don't need the $ here.
return view('assessments.edit')->with('editassessments', $editassessments);
That should fix your problem.
Thanks. I've removed the '$' sign. I now get this error in the header:
`Undefined property: Illuminate\Database\Eloquent\Collection::$name`
I'm certain there is a 'name' parameter in the database because the index method to display all assessments work well(without ajax)
This is the index function:
public function index()
{
$assessments = Assessment::all();
return view('assessments.index')->with('assessments', $assessments);
}
The view(without ajax) works well when called: {{!! $assessments->name !!}}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community