Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Melcus/parking-system

10 stars
1 code files
View Melcus/parking-system on GitHub

app/Http/Requests/ReservationUpdateRequest.php

Open in GitHub
use Illuminate\Foundation\Http\FormRequest;
 
class ReservationUpdateRequest extends FormRequest
{
public function authorize(): bool
{
return $this->user()->can('update', $this->route()->reservation);
}
 
public function rules(): array
{
return [
'start' => ['required', 'date', 'after_or_equal:now'],
'end' => ['required', 'date', 'after:start'],
];
}
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.