/src/Models/Model.php

https://github.com/Anankke/SSPanel-Uim · PHP · 54 lines · 8 code · 3 blank · 43 comment · 0 complexity · b5db796f714dcf5c70eb42efb665c145 MD5 · raw file

  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model as EloquentMedel;
  4. use Illuminate\Database\Eloquent;
  5. /**
  6. * Base Model
  7. *
  8. * @codingStandardsIgnoreStart
  9. * @method Eloquent\Model make(array $attributes = []) Create and return an un-saved model instance.
  10. * @method static whereKey($id) Add a where clause on the primary key to the query.
  11. * @method static whereKeyNot($id) Add a where clause on the primary key to the query.
  12. * @method static where($column, $operator = null, $value = null, $boolean = 'and') Add a basic where clause to the query.
  13. * @method static orWhere($column, $operator = null, $value = null) Add an "or where" clause to the query.
  14. * @method static latest($column = null) Add an "order by" clause for a timestamp to the query.
  15. * @method static oldest($column = null) Add an "order by" clause for a timestamp to the query.
  16. * @method Eloquent\Collection hydrate(array $items) Create a collection of models from plain arrays.
  17. * @method Eloquent\Collection fromQuery($query, $bindings = []) Create a collection of models from a raw query.
  18. * @method Eloquent\Model|Eloquent\Collection|static[]|static|null find($id, $columns = ['*']) Find a model by its primary key.
  19. * @method Eloquent\Collection findMany($ids, $columns = ['*']) Find multiple models by their primary keys.
  20. * @method Eloquent\Model|Eloquent\Collection|static|static[] findOrFail($id, $columns = ['*']) Find a model by its primary key or throw an exception.
  21. * @method Eloquent\Model|static findOrNew($id, $columns = ['*']) Find a model by its primary key or return fresh model instance.
  22. * @method Eloquent\Model|object|static|null first($columns = ['*']) Execute the query and get the first result.
  23. * @method Eloquent\Model|static firstOrNew(array $attributes, array $values = []) Get the first record matching the attributes or instantiate it.
  24. * @method Eloquent\Model|static firstOrCreate(array $attributes, array $values = []) Get the first record matching the attributes or create it.
  25. * @method Eloquent\Model|static updateOrCreate(array $attributes, array $values = []) Create or update a record matching the attributes, and fill it with values.
  26. * @method Eloquent\Model|static firstOrFail($columns = ['*']) Execute the query and get the first result or throw an exception.
  27. * @method Eloquent\Model|static|mixed firstOr($columns = ['*'], Closure $callback = null) Execute the query and get the first result or call a callback.
  28. * @method mixed value($column) Get a single column's value from the first result of a query.
  29. * @method Eloquent\Collection|static get($columns = ['*']) Execute the query as a "select" statement.
  30. * @method Eloquent\Model[]|static getModels($columns = ['*']) Get the hydrated models without eager loading.
  31. * @method \Illuminate\Support\LazyCollection cursor() Get a lazy collection for the given query.
  32. * @method \Illuminate\Support\Collection pluck($column, $key = null) Get an array with the values of a given column.
  33. * @method \Illuminate\Contracts\Pagination\LengthAwarePaginator paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null) Paginate the given query.
  34. * @method \Illuminate\Contracts\Pagination\Paginator simplePaginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null) Paginate the given query into a simple paginator.
  35. * @method Eloquent\Model|static create(array $attributes = []) Save a new model and return the instance.
  36. * @method Eloquent\Model|static forceCreate(array $attributes) Save a new model and return the instance. Allow mass-assignment.
  37. * @method int update(array $values) Update a record in the database.
  38. * @method int increment($column, $amount = 1, array $extra = []) Increment a column's value by a given amount.
  39. * @method int decrement($column, $amount = 1, array $extra = []) Decrement a column's value by a given amount.
  40. * @method mixed delete() Delete a record from the database.
  41. * @method mixed forceDelete() Run the default delete function on the builder.
  42. * @method void onDelete(Closure $callback) Register a replacement for the default delete function.
  43. * @method static|mixed scopes($scopes) Call the given local model scopes.
  44. * @method static applyScopes() Apply the scopes to the Eloquent builder instance and return it.
  45. * @codingStandardsIgnoreEnd
  46. * @mixin Eloquent\Builder
  47. */
  48. class Model extends EloquentMedel
  49. {
  50. public $timestamps = false;
  51. }