-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mehran Naseri #21
base: master
Are you sure you want to change the base?
Mehran Naseri #21
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Mehran
Thank you for participating in the challenge.
HR'll call you soon.
|
||
public function update(DriverUpdateRequest $request) | ||
{ | ||
$driver = $this->user->driver; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if user is not driver.
'longitude' => $request->longitude | ||
]); | ||
|
||
$travels = Travel::with('spots')->searchingForDriver()->get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You know the driver is working?
if($travel->driverHasArrivedToOrigin()) | ||
throw new SpotAlreadyPassedException(); | ||
|
||
$origin = $travel->getOriginSpot(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why origin spot?
if(Driver::isDriver($user)) | ||
return response()->json([], 403); | ||
|
||
if($travel->allSpotsPassed()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So at end of travel, the passenger wants to go to another location, it's wrong logically?
No description provided.