Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel select selected

    @foreach ($categories as $item)
           @if (isset($produits->categorie_id) && $item->id == $produits->categorie_id || old('categorie_id') == $item->id)
                <option selected value="{{ $item->id }}">{{ $item->libelle }}</option>
           @else
                <option value="{{ $item->id }}">{{ $item->libelle }}</option>
           @endif
   @endforeach
Comment

select option in laravel

<select name="like_to" id="like_to" class="form-control">
  <option value="giveaway" {{$data->like_to=='giveaway' ? 'selected' : ''}}>Give Away</option>
  <option value="lend" {{$data->like_to=='lend' ? 'selected' : ''}}>Lend</option>
  <option value="borrow" {{$data->like_to=='borrow' ? 'selected' : ''}}>Borrow</option>
</select>
Comment

laravel select

<div class="col-12 form-group">
            {{ Form::label('name', __('choose'),['class'=>'form-label']) }}
            <select class="form-select" aria-label="Default select example"name="type"id="type">
            <option value="{{$formBuilder->type}}" hidden disabled selected>{{$formBuilder->type_name}}</option>
            <option value="1">choose1</option>
            <option value="2">choose2</option>
            <option value="3">choose3</option>
          </select>
        </div>
Comment

laravel with select

$books = Book::with('author:id,name,book_id')->get();
Comment

PREVIOUS NEXT
Code Example
Php :: php mail in localhost wamp 
Php :: generate unique order id in php 
Php :: php named parameters 
Php :: current pathinfo php 
Php :: has password argon2i 
Php :: carbon between hours 
Php :: search laravel 
Php :: get curl httcode php 
Php :: eloquent where raw 
Php :: laravel move file from local to s3 
Php :: composer create project 
Php :: get all class methods php 
Php :: php remove element from array by value 
Php :: laravel get route parameters in blade 
Php :: wordpress post autosave time 
Php :: one lin if statement php 
Php :: array to string conversion php 
Php :: laravel all fillable 
Php :: disable display error 
Php :: php all date arguments 
Php :: laravel auth 
Php :: access json with php 
Php :: get_adjacent_post wordpress 
Php :: convert png to webp in php 
Php :: php pdo setting error modes 
Php :: drupal get node id from twig 
Php :: laravel imap - Get message attachments 
Php :: PHP Example - AJAX Live Search 
Php :: yii2 gridview action change urls 
Php :: two condition in one laravel query 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =