1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-06-05 22:09:38 +02:00

Aggiornamento importazione FE

This commit is contained in:
Thomas Zilio
2019-07-22 09:52:27 +02:00
parent ad21ebf9f2
commit e33eec69fc
5 changed files with 81 additions and 23 deletions

View File

@@ -22,12 +22,16 @@ class Manager
*/
public function __construct($resource, $type, $version)
{
$resource = Resource::where('version', $version)
$object = Resource::where('version', $version)
->where('type', $type)
->where('resource', $resource)
->first();
$this->resource = $resource;
if (empty($object)) {
throw new ResourceNotFound();
}
$this->resource = $object;
$this->type = $type;
}