Answers for "php laravel foreach inside if condition one line"

PHP
0

write if and else in one line laravel

//in blade:
{{ ($data->position == 1) ? 'active' : 'disable'}}

//in Controller
$result = ($data->status == 1) ? 'active' : 'disable'
Posted by: Guest on November-08-2020

Code answers related to "php laravel foreach inside if condition one line"

Browse Popular Code Answers by Language