1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-16 19:40:44 +01:00
Dasc3er 06439a275f Introduzione simulazione dei widget
Nuove strutture per gestire i widget del gestionale, base per la gestione deile stampe e miglioramento del sistema di simulazione delle richieste al gestionale legacy.
2021-03-15 10:43:14 +01:00

41 lines
743 B
PHP

<?php
namespace App\View\Components;
use App\OSM\Widgets\Manager;
use App\OSM\Widgets\Widget as Model;
use Illuminate\View\Component;
class Widget extends Component
{
protected $widget;
/**
* @var Manager
*/
protected $manager;
/**
* Create a new component instance.
*
* @param $id
*/
public function __construct(
$id
) {
$this->widget = Model::find($id);
$this->manager = $this->widget->getManager();
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
$manager = $this->manager;
return $manager->render();
}
}