user = $user; } /** * Execute the job. * * @return boolean|Exception */ public function handle() { $this->authorize(); $this->user->delete(); $this->user->flushCache(); return true; } /** * Determine if this action is applicable. * * @return void */ public function authorize() { // Can't delete yourself if ($this->user->id == user()->id) { $message = trans('auth.error.self_delete'); throw new \Exception($message); } } }