I have two variables in a controller:
$data = S_core_Country::all();
$cn=\DB::table('s_user_addresses')
->join('s_users', 's_users.id', '=', 's_user_addresses.user_id')
->join('s_core_countries', 's_core_countries.id', '=', 's_user_addresses.country_id')
->value('countryname');
return view('home')->with(['data'=>$data,'cn'=>$cn]);
Is it possible to view my data in foreach loop like this
@foreach($data as $data && $cn as $cn)
If not what should I to show those two variable in one foreach loop?