'client', 'vendor_id' => 'vendor', 'description' => 'description', 'transaction_reference' => 'transaction_reference', 'amount' => 'amount', ]; /* Amount */ protected array $number_operators = [ '=', '>', '>=', '<', '<=' ]; /* Description, Client, Vendor, Reference Number */ protected array $string_operators = [ 'is', 'contains', 'starts_with', 'is_empty', ]; // rule object looks like this: //[ // { // 'search_key': 'client_id', // 'operator' : 'is', // 'value' : 'Sparky' // } //] public function getEntityType() { return self::class; } public function company() { return $this->belongsTo(Company::class); } public function vendor() { return $this->belongsTo(Vendor::class); } public function client() { return $this->belongsTo(Client::class); } public function user() { return $this->belongsTo(User::class)->withTrashed(); } public function expense_cateogry() { return $this->belongsTo(ExpenseCategory::class)->withTrashed(); } }