src/Helpers/UI/Label.php
public static function lockedStatus($locked, array $options = [], $withIcon = true)
    {
        // TODO: Refactor the options to a dedicated config file.
        $classes      = Arr::get($options, 'classes', [
            'locked'   => 'label label-danger',
            'unlocked' => 'label label-success',
        ]);
        $translations = Arr::get($options, 'trans', [
            'locked'   => 'core::statuses.locked',
            'unlocked' => 'core::statuses.unlocked',
        ]);
        $icons = Arr::get($options, 'icons', [
            'locked'   => 'fa fa-fw fa-lock',
            'unlocked' => 'fa fa-fw fa-unlock',
        ]);

        $key        = $locked ? 'locked' : 'unlocked';
        $value      = ucfirst(trans($translations[$key]));
        $attributes = ['class' => $classes[$key]];

        return $withIcon
            ? static::generateWithIcon($value, $icons[$key], $attributes)
            : static::generate($value, $attributes);
    }
public static function lockedStatus($locked, array $options = [], $withIcon = true)
    {
        // TODO: Refactor the options to a dedicated config file.
        $classes      = Arr::get($options, 'classes', [
            'locked'   => 'label label-danger',
            'unlocked' => 'label label-success',
        ]);
        $translations = Arr::get($options, 'trans', [
            'locked'   => 'core::statuses.locked',
            'unlocked' => 'core::statuses.unlocked',
        ]);
        $icons = Arr::get($options, 'icons', [
            'locked'   => 'fa fa-fw fa-lock',
            'unlocked' => 'fa fa-fw fa-unlock',
        ]);

        $key        = $locked ? 'locked' : 'unlocked';
        $value      = ucfirst(trans($translations[$key]));
        $attributes = ['class' => $classes[$key]];

        return $withIcon
            ? static::generateWithIcon($value, $icons[$key], $attributes)
            : static::generate($value, $attributes);
    }
public static function lockedStatus ( $ locked , array $ options = [ ] , $ withIcon = true ) { // TODO: Refactor the options to a dedicated config file. $ classes = Arr :: get ( $ options , 'classes' , [ 'locked' => 'label label-danger' , 'unlocked' => 'label label-success' , ] ) ; $ translations = Arr :: get ( $ options , 'trans' , [ 'locked' => 'core::statuses.locked' , 'unlocked' => 'core::statuses.unlocked' , ] ) ; $ icons = Arr :: get ( $ options , 'icons' , [ 'locked' => 'fa fa-fw fa-lock' , 'unlocked' => 'fa fa-fw fa-unlock' , ] ) ; $ key = $ locked ? 'locked' : 'unlocked' ; $ value = ucfirst ( trans ( $ translations [ $ key ] ) ) ; $ attributes = [ 'class' => $ classes [ $ key ] ] ; return $ withIcon ? static :: generateWithIcon ( $ value , $ icons [ $ key ] , $ attributes ) : static :: generate ( $ value , $ attributes ) ; }
Generate locked status label.

@param  bool   $locked
@param  array  $options
@param  bool   $withIcon

@return \Illuminate\Support\HtmlString
Generate locked status label .