Stuff
This commit is contained in:
parent
535fd238e3
commit
7cde2db61a
1 changed files with 6 additions and 1 deletions
|
@ -46,7 +46,12 @@ class PublicController extends BaseController
|
|||
$tenant = Tenant::query()->where("url", "=", $tenant)->firstOrFail();
|
||||
$gallery = Gallery::getByTenantAndUrl($tenant->id, $gallery);
|
||||
if($gallery->status == "online" || (Auth::check() && $gallery->status == "preview" && Auth::user()->id == $tenant->owner)) {
|
||||
$images = Image::query()->where("gallery", "=", $gallery->id)->whereNull("deleted_at")->get();
|
||||
$images = Image::query()
|
||||
->where("gallery", "=", $gallery->id)
|
||||
->whereNull("deleted_at")
|
||||
->orderBy("rating")
|
||||
->orderBy("DateTimeOriginal")
|
||||
->get();
|
||||
} else {
|
||||
abort( 404);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue