| @@ 7-30 (lines=24) @@ | ||
| 4 | ||
| 5 | use Arrilot\Widgets\AbstractWidget; |
|
| 6 | ||
| 7 | class Blade extends AbstractWidget |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * The configuration array. |
|
| 11 | * |
|
| 12 | * @var array |
|
| 13 | */ |
|
| 14 | protected $config = []; |
|
| 15 | ||
| 16 | /** |
|
| 17 | * Treat this method as a controller action. |
|
| 18 | * Return view() or other content to display. |
|
| 19 | * |
|
| 20 | * @param \Yajra\CMS\Entities\Widget $widget |
|
| 21 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
|
| 22 | */ |
|
| 23 | public function run($widget) |
|
| 24 | { |
|
| 25 | return view($widget->present()->template(), [ |
|
| 26 | 'config' => $this->config, |
|
| 27 | 'widget' => $widget, |
|
| 28 | ]); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||
| @@ 7-30 (lines=24) @@ | ||
| 4 | ||
| 5 | use Arrilot\Widgets\AbstractWidget; |
|
| 6 | ||
| 7 | class Breadcrumb extends AbstractWidget |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * The configuration array. |
|
| 11 | * |
|
| 12 | * @var array |
|
| 13 | */ |
|
| 14 | protected $config = []; |
|
| 15 | ||
| 16 | /** |
|
| 17 | * Treat this method as a controller action. |
|
| 18 | * Return view() or other content to display. |
|
| 19 | * |
|
| 20 | * @param \Yajra\CMS\Entities\Widget $widget |
|
| 21 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
|
| 22 | */ |
|
| 23 | public function run($widget) |
|
| 24 | { |
|
| 25 | return view($widget->present()->template(), [ |
|
| 26 | 'config' => $this->config, |
|
| 27 | 'widget' => $widget, |
|
| 28 | ]); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||
| @@ 7-31 (lines=25) @@ | ||
| 4 | ||
| 5 | use Arrilot\Widgets\AbstractWidget; |
|
| 6 | ||
| 7 | class Wysiwyg extends AbstractWidget |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * The configuration array. |
|
| 11 | * |
|
| 12 | * @var array |
|
| 13 | */ |
|
| 14 | protected $config = []; |
|
| 15 | ||
| 16 | /** |
|
| 17 | * Treat this method as a controller action. |
|
| 18 | * Return view() or other content to display. |
|
| 19 | * |
|
| 20 | * @param \Yajra\CMS\Entities\Widget $widget |
|
| 21 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
|
| 22 | * @throws \Laracasts\Presenter\Exceptions\PresenterException |
|
| 23 | */ |
|
| 24 | public function run($widget) |
|
| 25 | { |
|
| 26 | return view($widget->present()->template(), [ |
|
| 27 | 'config' => $this->config, |
|
| 28 | 'widget' => $widget, |
|
| 29 | ]); |
|
| 30 | } |
|
| 31 | } |
|
| 32 | ||
| @@ 7-30 (lines=24) @@ | ||
| 4 | ||
| 5 | use Arrilot\Widgets\AbstractWidget; |
|
| 6 | ||
| 7 | class Login extends AbstractWidget |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * The configuration array. |
|
| 11 | * |
|
| 12 | * @var array |
|
| 13 | */ |
|
| 14 | protected $config = []; |
|
| 15 | ||
| 16 | /** |
|
| 17 | * Treat this method as a controller action. |
|
| 18 | * Return view() or other content to display. |
|
| 19 | * |
|
| 20 | * @param \Yajra\CMS\Entities\Widget $widget |
|
| 21 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
|
| 22 | */ |
|
| 23 | public function run($widget) |
|
| 24 | { |
|
| 25 | return view($widget->present()->template(), [ |
|
| 26 | 'config' => $this->config, |
|
| 27 | 'widget' => $widget, |
|
| 28 | ]); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||