Backend changes separating id from pilot_id

This commit is contained in:
Nabeel Shahzad
2019-07-16 13:54:14 -04:00
parent 454776ecd4
commit 3e1d9080df
21 changed files with 454 additions and 34 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Models\Observers;
use App\Models\User;
use App\Services\UserService;
class UserObserver
{
private $userSvc;
public function __construct(UserService $userSvc)
{
$this->userSvc = $userSvc;
}
/**
* After a user has been created, do some stuff
*
* @param User $user
*/
public function created(User $user): void
{
$this->userSvc->findAndSetPilotId($user);
}
}