Skip to content
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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Mehran Naseri #21

wants to merge 18 commits into from

Conversation

mehrannaseri
Copy link

No description provided.

@mehrannaseri mehrannaseri changed the title Passed all tests Mehran Naseri Jan 6, 2023
Copy link
Member

@yeganemehr yeganemehr left a 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;
Copy link
Member

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();
Copy link
Member

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();
Copy link
Member

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())
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants