Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel select multiple value in form edit

<select name="cities[]" class="city form-control" data-placeholder="Pilih Kota" style="width: 100%;" multiple="multiple">
                    @foreach($cities as $city)
                        @if(in_array($city->id, $zoneCityIds))
                        <option value="{{ $city->id }}" selected="true">{{ $city->name }}</option>
                        @else
                        <option value="{{ $city->id }}">{{ $city->name }}</option>
                        @endif 
                    @endforeach
                    </select>
Comment

PREVIOUS NEXT
Code Example
Php :: php set status code 
Php :: is_unique in codeigniter form validation 
Php :: laravel json response 
Php :: laravel throttle 
Php :: clear cache in symfony 
Php :: php faker long text 
Php :: php rotate image 
Php :: laravel get mysql column datatype 
Php :: cache an array 
Php :: wordpress theme widgets 
Php :: wp_query post id 
Php :: guzzlehttp/guzzle version with laravel-websockek 
Php :: SPA and keep some of the Laravel pages you need to have a route like this 
Php :: laravel multiple paginate 
Php :: get post in php 
Php :: get custom post type taxonomy value 
Php :: strtotime to date php 
Php :: type hidden value put laravel 
Php :: loop foreach laravel with number 
Php :: laravel validate date 
Php :: double where condition in laravel 
Php :: woocommerce checkout manager confirm password 
Php :: check if variable is set and not empty laravel 
Php :: laravel blade foreach index value 
Php :: if exists in string php 
Php :: woocommerce hook after order placed 
Php :: wp image size names 
Php :: php-fpm docker 
Php :: how to loop with while in php for array associative 
Php :: php check if checkbox isset 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =