transaction = $transaction; } /** * Execute the job. * * @return boolean|Exception */ public function handle() { $this->authorize(); $this->transaction->recurring()->delete(); $this->transaction->delete(); return true; } /** * Determine if this action is applicable. * * @return void */ public function authorize() { if ($this->transaction->category->id == Category::transfer()) { throw new \Exception('Unauthorized'); } } }