orchid / widget
Widget for The Laravel Framework
Installs: 10 836
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 9
Forks: 3
Open Issues: 1
Requires
- php: >=7.1
- laravel/framework: >=5.0
This package is auto-updated.
Last update: 2020-02-23 13:49:41 UTC
README
If you are looking for a good way to use widgets on laravel please see how to use directive. This provides a better experience than package.
Orchid Widget
Widgets embedded in the representation to form a complex, but at the same time independent of the user interface.
Installation
install wia composer
composer require orchid/widget
publish package
php artisan vendor:publish
Create :
To create a new widget, you need to
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.
To register your new widget, you must bring it to the config/widget.php
// '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:
@widget('test')
License
The MIT License (MIT). Please see License File for more information.