1// Null Coalesce Operator in PHP (Laravel) - $statement ?? ''
2$categoryName = $category->name ?? 'Not Available';
3
4// The above Statement is identical to this if/else statement
5if (isset($category->name)) {
6 $categoryName = $category->name;
7} else {
8 $categoryName = 'Not Available';
9}