Answers for "laravel blade not isset"

1

isset laravel

//In Controller
public function returnView() {
    return View::make('view')->with('param',$param);
}

//In View
@isset($param)
Posted by: Guest on June-22-2020
0

laravel blade variable isset, empty or optional

// laravel optional parameter
{{ $variable ?? 'empty or write some message' }}
{{ $data ?? ' ' }}

// laravel variable is set or not
@isset($variable)
  // do some stuff when varaibale have value
@endisset
  
  // laravel varaible empty or not
  @empty ($variable)
  // do some stuff when varaibale have empty value
  @endempty
Posted by: Guest on May-26-2021

Browse Popular Code Answers by Language