Warning this repository is no longer supported
Widgets embedded in the representation to form a complex, but at the same time independent of the user interface., (*1)
Installation
install wia composer, (*2)
composer require orchid/widget
publish package, (*3)
php artisan vendor:publish
Create :
To create a new widget, you need to, (*4)
php artisan orchid:widget NameClassWidget
In the folder app/Http/Widgets
create a class widget template
Like a controller, a widget can also have its own view.
Recommended siting widget files in a subdirectory views., (*5)
To register your new widget, you must bring it to the config/widget.php
, (*6)
//
'widgets' => [
'test' => App\Widgets\NameClassWidget::class
],
Usage
"Run" method is executed when the call widget defaul.
you must perform in the code to connect the widget using Blade syntax:, (*7)
@widget('test')
License
The MIT License (MIT). Please see License File for more information., (*8)