Transaction
class Transaction extends BaseModel (View source)
Traits
Properties
protected | $guarded | {@inheritDoc} | |
protected | $casts | {@inheritDoc} | |
int | $id | ||
?int | $parent_transaction_id | ||
int | $order_id | ||
bool | $success | ||
string | $type | ||
string | $driver | ||
int | $amount | ||
string | $reference | ||
string | $status | ||
?string | $notes | ||
string | $card_type | ||
?string | $last_four | ||
?array | $meta | ||
Carbon | $created_at | ||
Carbon | $updated_at | ||
Carbon | $deleted_at |
Methods
Get new instance of the registered model.
Handle dynamic and static method calls into the model.
Forward a method call to the model only when calling a method on the model.
Register a model event with the dispatcher.
Fire the given event for the model.
Remove all the event listeners for the model.
Handle dynamic static method calls into the model.
Return a new factory instance for the model.
Return the order relationship.
Return the currency relationship.
No description
No description
No description
Details
Model
newInstance(array $attributes = [], bool $exists = false)
Get new instance of the registered model.
mixed
__call(string $method, array $parameters)
Handle dynamic and static method calls into the model.
Model
swap(string $newModelClass)
Swap the model implementation.
string
getMorphClass()
Get the class name of the base model.
protected bool
forwardCallsWhen(string $method, Model $model)
Forward a method call to the model only when calling a method on the model.
static protected void
registerModelEvent(string $event, QueuedClosure|Closure|string $callback)
Register a model event with the dispatcher.
protected mixed
fireModelEvent(string $event, bool $halt = true)
Fire the given event for the model.
static void
flushEventListeners()
Remove all the event listeners for the model.
__construct(array $attributes = [])
Create a new instance of the Model.
LogOptions
getActivitylogOptions()
Get the log options for the activity log.
static mixed
__callStatic(string $method, array $parameters)
Handle dynamic static method calls into the model.
static protected TransactionFactory
newFactory()
Return a new factory instance for the model.
BelongsTo
order()
Return the order relationship.
HasOneThrough
currency()
Return the currency relationship.
driver()
No description
refund(int $amount, $notes = null)
No description
capture(int $amount = 0)
No description