I am using Laravel 4.
in app/config/prod/app.php
I have an array of things, laid out like this,
<?php
return array(
‘debug’ => “fault”
// and more ...
)
I want to set my default
value to a different thing base on auth user type.
IF the user type is admin, I want to set the debug to true ELSE set it to false.
Can I do an if-else check within an array in PHP ?
I’ve tried using ternary operator, but no luck. I hope I didn’t do anything wrong.
isset( Auth::user()->type == “Admin” ) ? ‘debug’ => “true” : ‘debug’
=> “fault”
Thanks for your help in advance ! :)