Download the PHP package laspi94/livewire-select2 without Composer

On this page you can find all versions of the php package laspi94/livewire-select2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package livewire-select2

LivewireSelect2

Package to integrate the select2 library with livewire, designed to reuse and encapsulate methods, and above all easy to implement in livewire components..

Requirements

Setup

Call the directive package

Configuration

Example route.

Use

Import the LivewireSelect2 trait

In the mount method of the component, we will assign the properties that are associated with the field.

After the component starts, we will have to call the $this->loadSelect2() method, as we know, select2 needs the DOM already rendered to apply the properties and listeners in the document.

Inside our controller we also import our trait to access the select2PaginateList() method This is the one that will be responsible for returning our paginated items, the method assigned in our route should look something like this.

After that we must indicate in our model the columns that will be consulted in each call to AJAX, after adding the main columns, you can add more columns for which you want it to do the corresponding search within your model.

If you need to load a select2 that depends on another field, you can do it in the following way, passing the necessary parameter for the query and establishing the default value of our main field before calling "loadSelect2" again.

Now, with this same alias and just by manipulating the query you can easily reuse the query you want to perform, obtaining the paginated, preselected results without overloading the DOM.

HTML EXAMPLE

Validation

You can call the validator without any complications, within the livewire component

The validation template will be generated within our wire:ignore, so to remove it, we can call the following method within our component.

Using by

Este proyecto es utilizado por las siguientes empresas:

License

MIT License

Authors


All versions of livewire-select2 with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laspi94/livewire-select2 contains the following files

Loading the files please wait ....