📅  最后修改于: 2022-03-11 14:53:43.742000             🧑  作者: Mango
$dept = DB::table('master_department')->get();
$design = DB::table('master_designation')->get();
return view('registration', ['dept' => $dept], compact('design'));
#if we send as array
@foreach($dept as $key=>$d)
{{ $dept[$key]->dept_title }}
@endforeach
#if we send as compact object
@foreach($design as $deg)
@endforeach