Support the ongoing development of Laravel.io →
Views
Last updated 1 year ago.
0
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.

0

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 !!}}

Last updated 8 years ago.
0

@ftiersch solved it. Error marking solution.

Thanks @ftiersch

0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.