3f 3f 27 27 operator in php laravel

Solutions on MaxInterview for 3f 3f 27 27 operator in php laravel by the best coders in the world

showing results for - " 3f 3f 27 27 operator in php laravel"
Abdallah
27 Jul 2019
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}