Operator Null Coalesce di PHP (Laravel)
public function show($name){
$data = [
'twitter' => 'codewithchinekwe',
'age' => '23',
];
return view('products.index', [
'products' => $data[$name] ?? 'product ' .$name. 'doesn\'t exist'
]);
}
Lovely Louse