Download the PHP package nodus-it/livewire-core without Composer
On this page you can find all versions of the php package nodus-it/livewire-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package livewire-core
Livewire Core
The core package for all Laravel Livewire packages from Nodus-IT.
This package is currently being developed and is still in testing
Installation
You can install the package via composer: `
You can publish the config file with: `
You can publish the blade views with: `
Usage
Controller integration
All our Livewire components can be used as standalone in your blade views as you are used to it. But we are offering an optional way to integrate a Livewire component so to say as full page component into your controllers.
In order to use this, you need to use the SupportsLivewire
trait in your controller.
This trait provides a single function named livewire()
where you can pass your component class and an array with parameters:
``
By default, this would be extending a layout called layouts.app
and adding the component to a section called content
.
Customize layout or section
In order to customize the used layout and/or section you have two possible ways.
First you could use the fluent interface of the LivewireComponent
class, which is returned when calling the livewire()
method.
With that you can just pass your desired settings via the following methods:
In case you don't want to define this on every
livewire()call, you can also add some properties and methods to your controller, with which you can define the default layout, the layout parameters and the default section for all
livewire()calls of this controller:
CSP nonce handling
This package provides the support for the Content Security Policy (CSP) nonce for all assets in the Laravel Livewire packages from Nodus-IT. To use it you need to add your CSP nonce provider callback to the config: `` The generated nonce is then automatically added to all assets provided by our packages.
For ease of use we added also a Blade Directive for adding the nonce HTML attribute to your custom assets: `
Testing
`
License
The MIT License (MIT). Please see License File for more information.