app/Http/Requests/Booking/StoreBookingRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        $today = now()->toDateString();
        return [
            'ride_id' => 'required|exists:rides,id',
            'start_terminal_id' => 'required|exists:terminals,id',
            'end_terminal_id' => 'required|exists:terminals,id',
            'travel_date' => 'required|after:'.$today,
            'pax' => 'nullable|numeric|min:1'
        ];
    }
public function rules ( ) { $ today = now ( ) -> toDateString ( ) ; return [ 'ride_id' => 'required|exists:rides,id' , 'start_terminal_id' => 'required|exists:terminals,id' , 'end_terminal_id' => 'required|exists:terminals,id' , 'travel_date' => 'required|after:' . $ today , 'pax' => 'nullable|numeric|min:1' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .