samedi 22 juin 2019

How to add a class laravel voyager relatioship formfield?

Hi I had this code in my blade,

@foreach($dataTypeRows as $row)
        @if ($row->type == 'relationship' && $row->display_name == 'Area')
               <div class="form-group">
                       <label class="control-label" for="name"></label>
                       @include('voyager::formfields.relationship', ['options' => $row->details])
                       <label id="area_id-error" class="error" for="area_id"></label>
               </div>
        @endif 
@endforeach

I get output like,

<select class="form-control select2-ajax select2-hidden-accessible error" name="area_id" data-get-items-route="http://dangerdetecter.local:81/admin/crimes/relation" data-get-items-field="crime_belongsto_area_relationship" tabindex="-1" aria-hidden="true">

But I need to add a new class to this select field like,

<select class="form-control select2-ajax select2-hidden-accessible error my_new_class"



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire