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
array attributesToArray() Convert the model's attributes to an array. Return Value array
$this append(array|string $attributes) Append attributes to query when building a query. Parameters array|string $attributes Return Value $this
static Collection|Model[] all(array|mixed $columns = array('*')) Get all of the models from the database. Parameters array|mixed $columns Return Value Collection|Model[]
void addVisible(array|string|null $attributes = null) Add visible attributes for the model. Parameters array|string|null $attributes Return Value void
void addObservableEvents(array|mixed $observables) Add an observable event name. Parameters array|mixed $observables Return Value void
void addHidden(array|string|null $attributes = null) Add hidden attributes for the model. Parameters array|string|null $attributes Return Value void
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 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.
$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
Page 464 of 996