blade short if multiple conditions code example
Example: write if and else in one line laravel
//in blade:
{{ ($data->position == 1) ? 'active' : 'disable'}}
//in Controller
$result = ($data->status == 1) ? 'active' : 'disable'
//in blade:
{{ ($data->position == 1) ? 'active' : 'disable'}}
//in Controller
$result = ($data->status == 1) ? 'active' : 'disable'