I'm using Laravel 5.5.
I'm trying to get an object instance with the Query Builder of Laravel.
public function functionName(Request $request) {
$seance = Seance::where('id_seance', '=', $request->idSeance)->get();
return $seance->type_seance;
}
My model : Seance(id_seance, type_seance, capacite_seance, niveau_seance, avec_coach, date_seance, heure_seance)
.
However I get this error :
Exception: Property [type_seance] does not exist on this collection instance
Thank's for help!