php - Laravel : Creating default object from empty value When insertion -
i have problem creating default object empty value
on line $analyses->result = 1.0;
checked in db has these column.
$analysis = new analysis; $analysis->psubid = '1'; $analysis->subjectid = '1'; $analyses->result = 1.0; $analyses->rtd = 2.0; $analyses->save(); $analysis = analysis::all(); return $analysis;
you initiating variable $analysis
name , using $analyses
in of statement. use same name all
$analysis = new analysis; $analysis->psubid = '1'; $analysis->subjectid = '1'; $analysis->result = 1.0; $analysis->rtd = 2.0; $analysis->save(); $analysis = analysis::all(); return $analysis;
Comments
Post a Comment