Here is my anything.blade.php code:
@foreach ($data2 as $value2)
<p class="card-text" id="des6"> {{$value2->description}}</p>
@endforeach
Below is how I pass data from the controller
public function getHalls(Request $request)
{
$data['data'] =\DB::table('advertisements')
->select(\DB::raw("*"))
->orderBy('idadd')->paginate(12);
try{
$data2['data2'] =\DB::table('hotel')
->select(\DB::raw("*"))
->where('idhotel', '=', '1')
->get();
}catch (QueryException $exception){
return $exception->getMessage();
// abort(404, 'The requested resource could not be found.');
}
if(count($data['data'])>0)
{
return view('hotelpage', $data,$data2);
}
else
{
return "no data";
}
}
}
Below is how I get the output
But I want to display it like below
fdfd dsfdfdf fbfbfbf fvbhf
How can I achieve that?
Try this one
@foreach ($data2 as $value2)
<p class="card-text" id="des6">
{!! $value2->description !!}
</p>
@endforeach