Search
 
SCRIPT & CODE EXAMPLE
 

PHP

blade 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 :: remove empty array elements php 
Php :: update php version in laravel 
Php :: encrypt/decrypt data php 
Php :: install php extensions for magento 2 
Php :: Adding data to a laravel collection 
Php :: php interface vs abstract class 
Php :: multiple routes same controller laravel 
Php :: laravel eloquent get all 
Php :: laravel validation get failed rules 
Php :: how to get correct file or content mime type using/in php 
Php :: Laravel adding Foreign Key Constraints 
Php :: php -S localhost:8000 
Php :: json to php array 
Php :: html special characters php 
Php :: get type of object in php 
Php :: php timestamp to seconds 
Php :: laravel 7 eloquent on delete set null schema 
Php :: check if array contains only unique values php 
Php :: wordpress post types supports thumbnail 
Php :: laravel throttle 
Php :: php preg match space or start of string 
Php :: php new object 
Php :: if session is empty laravel 
Php :: array helper array_push laravel 
Php :: add options page advanced custom fields 
Php :: prevent SQL injection in PHP? 
Php :: concatener 2 variables php 
Php :: how to add custom field in comment form in wordpress 
Php :: double where condition in laravel 
Php :: adeleye ayodeji 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =