Fast Log add tenant
This commit is contained in:
parent
018ff08cec
commit
6dd1e70e03
2 changed files with 3 additions and 0 deletions
|
@ -187,6 +187,7 @@ class GalleryController extends BaseController
|
|||
]);
|
||||
$path = $validated["files"][0]->store("uploads/".session("current_tenant_id")."/".$name);
|
||||
|
||||
$tenant = Tenant::query()->where("id", "=", session("current_tenant_id"))->firstOrFail();
|
||||
|
||||
$image = new Image();
|
||||
$image->path = $path;
|
||||
|
@ -195,6 +196,7 @@ class GalleryController extends BaseController
|
|||
$image->gallery = $gallery->id;
|
||||
$image->size = $validated["files"][0]->getSize();
|
||||
$image->typ = "gallery";
|
||||
$image->tenant = $tenant->id;
|
||||
$image->saveOrFail();
|
||||
|
||||
if(is_null($gallery->main_image)) {
|
||||
|
|
|
@ -100,6 +100,7 @@ class TenantController extends BaseController
|
|||
$image->gallery = null;
|
||||
$image->size = $validated["files"][0]->getSize();
|
||||
$image->typ = "watermark";
|
||||
$image->tenant = $tenant->id;
|
||||
$image->saveOrFail();
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue