@php $model = (object)$options['model']; $options['prefix'] = SlugHelper::getPrefix($model::class); @endphp @if (empty($model))
{!! Form::permalink($name, old($name), 0, $options['prefix'], [], true, $model) !!} {!! Form::error($name, $errors) !!}
@else
{!! Form::permalink( $name, $model->slug, $model->slug_id, $options['prefix'], SlugHelper::canPreview($model) && in_array($model->status, [Botble\Base\Enums\BaseStatusEnum::DRAFT, Botble\Base\Enums\BaseStatusEnum::PENDING]), [], true, $model, ) !!} {!! Form::error($name, $errors) !!}
@endif