I have a table with column code ,program_string_id,practice_string_id
$project=db::table('project as p')->where('p.code',$asset_request->project_code);
$project_type=$project->select('p.practice_string_id','p.program_string_id')
->first();
print_r($project_type)
gives stdClass Object ( [practice_string_id] => PRACTICE0019 [program_string_id] => )
print_r($project_type->practice_string_id);
returns Trying to get property of non-object
.how to get the value in laravel query
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire