#Vue.js component for Select2
A select2 component for vue.js. Quickly create select2 components, load data via ajax and retrieve selected values and newly created tags.
#Usage
Download and register the component:
Vue.component(
<?php | |
namespace App\Console\Commands; | |
use App\Ami; | |
use Carbon\Carbon; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\Log; | |
use Symfony\Component\Process\Exception\ProcessFailedException; | |
use Symfony\Component\Process\Process; |
Smith, | |
Johnson, | |
Williams, | |
Brown, | |
Jones, | |
Garcia, | |
Miller, | |
Davis, | |
Rodriguez, | |
Martinez, |
<?php | |
use Carbon\Carbon; | |
use Illuminate\Database\Seeder; | |
class CountrySeeder extends Seeder | |
{ | |
public function addCountries(array $countries) | |
{ |
#Vue.js component for Select2
A select2 component for vue.js. Quickly create select2 components, load data via ajax and retrieve selected values and newly created tags.
#Usage
Download and register the component:
Vue.component(
In Laravel the unique
validation rule will trigger even when you are updating the original record, unless you provide some logic
in your FormRequest
to exclude the record when updating. This trait can be used to avoid that logic by detecting when a record is being created or updated.
Place the trait in app\Http\Traits
(if using a different directory simply change the namespace) and then use it inside your form request or add it to the app\Requests\Request.php
:
use App\Http\Traits\ValidationHelper
/* | |
Exemples : | |
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}"> | |
- Or, request confirmation in the process - | |
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?"> | |
*/ | |
(function() { | |
Custom binding handler for sorting table rows. It overrides the helper option of jQuery sortable to make sure that the table row
keeps it's width and attempts to set the correct background colour for the helper, however, background can be set by passing in the helperBg
parameter:
<table data-bind="sortableTable: {'helperBg': '#000000'}">