Ken Graham

1

votes
1

answer
46

views

Laravel accesing data from db inside controller

I am trying to get data from one form and save it to another db table with modifications. But, I am getting error: trying to get property of non-object on the last line from the given block of codes. $ply->team_name = $request->get('team_name'); $team_name=$ply->team_name; $team=Team::find($team_nam...
Ken Graham
0

votes
0

answer
26

views

Array getting converted to stdClass on addition

I have two arrays which I want to add under certain conditions which is provided by for loop. But I get the error, 'Object of class stdClass could not be converted to number.' on the last line. $reld=DB::table('jp')->select('cp')->get()->toArray(); //dd($reld); for($i=19;$i float(170.6) } [1]=> obj...
Ken Graham