You may try
$student = $this->student
->with('user')
->first();
$student = array_flatten($student->toArray());
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community