Download the PHP package joserick/laravel-livewire-discover without Composer

On this page you can find all versions of the php package joserick/laravel-livewire-discover. 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 laravel-livewire-discover

laravel_livewire_discover.jpg

Laravel Livewire Discover

Packagist Downloads GitHub License GitHub Release

Notice: Migration to v1.0 || I need previous version (v0.3)

Automatically discover and load/register multiple/different class namespaces for Livewire components.

Installation

You can add the package via composer:

And then install the package with artisan:

Enjoying this package?

Config

Add to LivewireDiscoverServiceProvider.php

Or if you like, use "componentNamespace" function as in Blade Templates

Or use the config: 'config/livewire-discover.php'

Use

Call Livewire Components:

Or use form Routes:

"Obviously" you need to install the "layout" first for the Routes

Extra

Displays the list of loaded namespaces (prefix, aliases and paths)

If you want to check if all the namespaces are loading correctly you can run:

Which will show you a table with all the information:

Create your components quickly

You can create the files automatically using the following Artisan command. In the process it will ask you for the prefix to use.

If you prefer kebab-cased names, you can use them as well:

You may use namespace syntax or dot-notation to create your components in sub-directories. For example, the following commands will create a RegisterAdmin component in the Auth sub-directory:

Also if you don't want it to constantly ask you which prefix to select you can pass it directly with the --prefix attribute

Manually configure the 'classpath' for component creation and listing

When automatically created components through the artisan livewire-discover:make this obtains the directory path based on 'Composer Autoload File' If for some reason it is not possible to do this, you can manually configure the path, adding it as the third parameter:

Now when you create the component it will be created in the path you have specified.

Config 'view path' for component creation

Do you also want it to create the view at a specific route? Just add the view route and it will automatically create it, simple as that:

Remember that these are examples, you can specify any path within your project and it will create it.

Migration to v1

Rename Config File

The configuration file name has changed from laravel-livewire-discover.php to simply livewire-discover-php

Attributes Reversed

Replace Livewire::discover for Livewire::componentNamespace since the attributes in v1 are reversed but the componentNamespace function maintains the structure of previous versions.

to

or in any case to maintain the use of the discover() function you can invert the parameters.

Dot-Notation

Change in concatenation of prefixes with class name, previously it was concatenated using the "-" notation, now the dot-notation is used, so it must be changed in all calls to Livewire-Discover components

to

I need for v0.3.2

License

The GNU Public License (GPLv3). Please see License File for more information.


All versions of laravel-livewire-discover with dependencies

PHP Build Version
Package Version
Requires spatie/laravel-package-tools Version ^1.16
livewire/livewire Version ^3.0
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 joserick/laravel-livewire-discover contains the following files

Loading the files please wait ....