Download the PHP package xslain/laravel-modules-livewire without Composer
On this page you can find all versions of the php package xslain/laravel-modules-livewire. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xslain/laravel-modules-livewire
More information about xslain/laravel-modules-livewire
Files in xslain/laravel-modules-livewire
Package laravel-modules-livewire
Short Description Using Laravel Livewire in Laravel Modules package with automatically registered livewire components for every modules.
License MIT
Informations about the package laravel-modules-livewire
Laravel Modules With Livewire
Using Laravel Livewire in Laravel Modules package with automatically registered livewire components for every modules.
Example Source Code: https://github.com/xslain/laravel-modules-livewire-example
Example Live Demo: https://dev.xslain.com/laravel-modules-livewire-example
Installation:
Install through composer:
Publish the package's configuration file:
Making Components:
Command Signature:
php artisan pagemodule:make-livewire <Component> <Module> --view= --force --inline --stub= --custom
Example:
Force create component if the class already exists:
Output:
Inline Component:
Output:
Modifying Stubs:
Publish the package's stubs:
After publishing the stubs, will create these files. And when running the make command, will use these stub files by default.
You're able to set a custom stub directory for component with (--stub) option.
Extra Option (--view):
You're able to set a custom view path for component with (--view) option.
Example:
Output:
Rendering Components:
<livewire:{module-lower-name}::component-class-kebab-case />
Example:
Custom Module:
To create components for the custom module, should be add custom modules in the config file.
The config file is located at config/modules-livewire.php
after publishing the config file.
Remove comment for these lines & add your custom modules.
Custom module config details
path: Add module full path (required).
module_namespace: Add module namespace (required).
namespace: By default using
config('modules-livewire.namespace')
value. You can set a different value for the specific module.view: By default using
config('modules-livewire.view')
value. You can set a different value for the specific module.name_lower: By default using module name to lowercase. If you set a custom name, module components will be register by custom name.
License
Copyright (c) 2021 Mehediul Hassan Miton [email protected]
The MIT License (MIT). Please see License File for more information.