1$dept = DB::table('master_department')->get();
2$design = DB::table('master_designation')->get();
3return view('registration', ['dept' => $dept], compact('design'));
4
5#if we send as array
6@foreach($dept as $key=>$d)
7 {{ $dept[$key]->dept_title }}
8@endforeach
9
10#if we send as compact object
11@foreach($design as $deg)
12 <option value="{{ $deg->id }}">{{ $deg->deg_title }}</option>
13@endforeach