I am receiving this error when i try to get the value from database to edit form text box. Property [name] does not exist on this collection instance. (View: E:\fyp\resources\views\buses\editbustype.blade.php) here is the code for edit section
public function edit(addbustype $id) {
$bustype = addbustype::find($id);
return view('buses.editbustype', compact('bustype','id'));
}
when i changed $id to any number (1) it gives me perfect result for that id but only for a single one. The code for edit bus type section is here
<div class="form-group col-md-6">
<label for="companyname">Company Name</label>
<input type="text" class="form-control" name="companyname" placeholder="Company Name" value="">
</div>
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2GTZVvu
via IFTTT
Aucun commentaire:
Enregistrer un commentaire