Undefined property: Illuminate\Database\Eloquent\Collection::$id Laravel 4

bin ich mit laravel 4.2 v..
ich möchte zu erstellen, Datensatz aktualisieren.
können Sie mir helfen.. was stimmt an diesem code...
das ist mein code :

MatakuliahsController.php

public function edit($id) 
{ 
//$matakuliahs = $this->matakuliahs->find($id); 
$matakuliahs = Matakuliah::where('id','=',$id)->get(); 

if(is_null($matakuliahs)){ 
return Redirect::route('matakuliahs.index'); 
} 

return View::make('matakuliahs.Bearbeiten',compact('matakuliahs')); 
} 

edit.blade.php

{{ Form::open(array('autocomplete' => 'off', 'method' => 'PATCH', 'route' => array('matakuliahs.update' $matakuliahs->id))) }} 
... 
{{ Form::close() }} 

Fehler :

Undefined property: Illuminate\Database\Eloquent\Collection::$id (View: C:\xampp\htdocs\Laravel 4\projectLaravel\app\views\matakuliahs\edit.blade.php) 

Dank für Ihre Aufmerksamkeit und Ihre Hilfe..

Schreibe einen Kommentar