Working on Gallery

This commit is contained in:
Torsten 2023-10-14 12:03:43 +02:00
parent 036fdc4d61
commit 6d67a5876b
2 changed files with 10 additions and 11 deletions

View file

@ -10,6 +10,7 @@ use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
use Intervention\Image\Facades\Image;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\DB;
class GalleryController extends Controller
{
@ -56,7 +57,10 @@ class GalleryController extends Controller
}
//dd($imagelist);
return view('tour/gallery/show')->with("tour_id",$tour_id)->with("imagelist",$imagelist);
$tour_name = DB::select("select name from tours where id=".$tour_id)[0]->name;
return view('tour/gallery/show')->with("tour_id",$tour_id)
->with("imagelist",$imagelist)
->with("tour_name",$tour_name);
}
/*

View file

@ -2,10 +2,8 @@
@section('content')
<div class="container text-center text-light mt-5">
<h1 class="text-center">Galerie</h1>
<h1>(Galerie Elemente)</h1>
<h1>{{$tour_name}}</h1>
<div class="container text-primary" style="display:flex">
<ul class="list-group offset-2 col-8" style="display:inline">
@ -14,9 +12,6 @@
<img class="mt-3 ml-3" src="/img_storage/tour-{{$tour_id}}/{{$image}}.jpg">
</a>
@endforeach
</ul>
</div>
@ -25,7 +20,7 @@
<form style="background-color: #fff;" class="text-dark" method="post" action="/tour/gallery/{{$tour_id}}" enctype="multipart/form-data">
@csrf
<input type="file" id="myFile" name="files[]" multiple>
<input type="submit">
<input type="submit" value="Hochladen">
</form>
</div>