guest()) { return true; } // Allow admin to see signed invoice if (user()->can('read-sales-invoices')) { return true; } return $this->invoice->contact_id == user()->contact->id; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ // ]; } }