$valiable1 = 'Best';
$valiable2 = 'Interview';
$valiable3 = 'Question';
return view('frontend.index', compact('valiable1', valiable2', valiable3'));

In you View File use can display by {{ $valiable1 }} or {{ $valiable2 }} or {{ $valiable3 }}

BY Best Interview Question ON 02 Mar 2023