Operations for Laravel
Custom model
Custom model
Subclass the model to add relations or accessors — the package still owns the schema:
use Cbox\Operations\Models\Operation as BaseOperation;
class Operation extends BaseOperation
{
public function tenant()
{
return $this->belongsTo(Tenant::class);
}
}
// config/operations.php
'models' => [
'operation' => App\Models\Operation::class,
],
The manager resolves this class for every read and write.