Model::belongsTo()

BelongsTo belongsTo(string $related, string $foreignKey = null, string $otherKey = null, string $relation = null) Define an inverse one-to-one or many relationship. Parameters string $related string $foreignKey string $otherKey string $relation Return Value BelongsTo

Model::attributesToArray()

array attributesToArray() Convert the model's attributes to an array. Return Value array

Model::append()

$this append(array|string $attributes) Append attributes to query when building a query. Parameters array|string $attributes Return Value $this

Model::all()

static Collection|Model[] all(array|mixed $columns = array('*')) Get all of the models from the database. Parameters array|mixed $columns Return Value Collection|Model[]

Model::addVisible()

void addVisible(array|string|null $attributes = null) Add visible attributes for the model. Parameters array|string|null $attributes Return Value void

Model::addObservableEvents()

void addObservableEvents(array|mixed $observables) Add an observable event name. Parameters array|mixed $observables Return Value void

Model::addHidden()

void addHidden(array|string|null $attributes = null) Add hidden attributes for the model. Parameters array|string|null $attributes Return Value void

Model::addGlobalScope()

static mixed addGlobalScope(Scope|Closure|string $scope, Closure $implementation = null) Register a new global scope on the model. Parameters Scope|Closure|string $scope Closure $implementation Return Value mixed Exceptions InvalidArgumentException

Model

Model class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializable, QueueableEntity, UrlRoutable (View source) Constants CREATED_AT The name of the "created at" column. UPDATED_AT The name of the "updated at" column.

MocksApplicationServices::withoutObservers()

$this withoutObservers(array|string $observers) Specify a list of observers that will not run for the given operation. Parameters array|string $observers Return Value $this