Working on Gallery
This commit is contained in:
parent
0d5a612a99
commit
529b71d005
5 changed files with 315 additions and 4 deletions
|
|
@ -19,7 +19,7 @@ class ImageController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
Log::debug("User is not authorized");
|
||||
Log::debug("User $user->name is not authorized to access image $imageName in category $category");
|
||||
return response()->file(public_path()."/img/placeholder/icon_unknown.png");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@
|
|||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
error_log("Tour:store");
|
||||
|
||||
$request->validate(
|
||||
[
|
||||
|
|
@ -112,18 +111,23 @@
|
|||
*/
|
||||
public function show(Tour $tour)
|
||||
{
|
||||
|
||||
Log::info("TourController::show triggered");
|
||||
|
||||
$creator = User::find($tour->user_id);
|
||||
$bookings = Booking::where('tour_id', $tour->id)->get();
|
||||
$users = array();
|
||||
foreach ($bookings as $booking) {
|
||||
$user = User::find($booking->user_id);
|
||||
array_push($users, $user);
|
||||
Log::info("Adding user with id $booking->user_id: $user");
|
||||
}
|
||||
|
||||
// Vergangene Tour anzeigen
|
||||
if ($tour->start < Carbon::now()) {
|
||||
$tour->start = Tour::toGermanDate($tour->start);
|
||||
$tour->deadline = Tour::toGermanDate($tour->deadline);
|
||||
|
||||
return view('tour.show_old')
|
||||
->with('tour', $tour)
|
||||
->with('users', $users)
|
||||
|
|
@ -135,6 +139,7 @@
|
|||
|
||||
$tour->start = Tour::toGermanDate($tour->start);
|
||||
$tour->deadline = Tour::toGermanDate($tour->deadline);
|
||||
|
||||
return view('tour.show')
|
||||
->with('tour', $tour)
|
||||
->with('users', $users)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
|
||||
{{ $tour->start }} - {{ $tour->name }} [{{$participantCount[$tour->id]}}/{{$tour->max_participants}}]
|
||||
|
||||
<a href="#">(Bilder)</a>
|
||||
@if(App\Tour::has_participant($tour->id, Auth::user()->id)==true)
|
||||
<i class="fas fa-biking"></i>
|
||||
@endif
|
||||
|
|
|
|||
306
tools/motorradig_2023-09-30_081727.sql
Normal file
306
tools/motorradig_2023-09-30_081727.sql
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
mysql -h localhost -P 3306 --password=mig_password --protocol=tcp -u root motorradig < $1
|
||||
mysql -h localhost -P 3306 --password=mig_password --protocol=tcp -u mig_user motorradig < $1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue