· 7 years ago · Feb 14, 2019, 10:44 AM
1<?php
2/**
3 * A helper file for Laravel 5, to provide autocomplete information to your IDE
4 * Generated for Laravel 5.5.13 on 2017-09-28.
5 *
6 * @author Barry vd. Heuvel <barryvdh@gmail.com>
7 * @see https://github.com/barryvdh/laravel-ide-helper
8 */
9namespace {
10 exit("This file should not be included, only analyzed by your IDE");
11}
12
13namespace {
14
15 class Eloquent extends \Illuminate\Database\Eloquent\Model {
16 /**
17 * Create and return an un-saved model instance.
18 *
19 * @param array $attributes
20 * @return \Illuminate\Database\Eloquent\Model
21 * @static
22 */
23 public static function make($attributes = array())
24 {
25 return \Illuminate\Database\Eloquent\Builder::make($attributes);
26 }
27
28 /**
29 * Register a new global scope.
30 *
31 * @param string $identifier
32 * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope
33 * @return $this
34 * @static
35 */
36 public static function withGlobalScope($identifier, $scope)
37 {
38 return \Illuminate\Database\Eloquent\Builder::withGlobalScope($identifier, $scope);
39 }
40
41 /**
42 * Remove a registered global scope.
43 *
44 * @param \Illuminate\Database\Eloquent\Scope|string $scope
45 * @return $this
46 * @static
47 */
48 public static function withoutGlobalScope($scope)
49 {
50 return \Illuminate\Database\Eloquent\Builder::withoutGlobalScope($scope);
51 }
52
53 /**
54 * Remove all or passed registered global scopes.
55 *
56 * @param array|null $scopes
57 * @return $this
58 * @static
59 */
60 public static function withoutGlobalScopes($scopes = null)
61 {
62 return \Illuminate\Database\Eloquent\Builder::withoutGlobalScopes($scopes);
63 }
64
65 /**
66 * Get an array of global scopes that were removed from the query.
67 *
68 * @return array
69 * @static
70 */
71 public static function removedScopes()
72 {
73 return \Illuminate\Database\Eloquent\Builder::removedScopes();
74 }
75
76 /**
77 * Add a where clause on the primary key to the query.
78 *
79 * @param mixed $id
80 * @return $this
81 * @static
82 */
83 public static function whereKey($id)
84 {
85 return \Illuminate\Database\Eloquent\Builder::whereKey($id);
86 }
87
88 /**
89 * Add a where clause on the primary key to the query.
90 *
91 * @param mixed $id
92 * @return $this
93 * @static
94 */
95 public static function whereKeyNot($id)
96 {
97 return \Illuminate\Database\Eloquent\Builder::whereKeyNot($id);
98 }
99
100 /**
101 * Add a basic where clause to the query.
102 *
103 * @param string|array|\Closure $column
104 * @param string $operator
105 * @param mixed $value
106 * @param string $boolean
107 * @return $this
108 * @static
109 */
110 public static function where($column, $operator = null, $value = null, $boolean = 'and')
111 {
112 return \Illuminate\Database\Eloquent\Builder::where($column, $operator, $value, $boolean);
113 }
114
115 /**
116 * Add an "or where" clause to the query.
117 *
118 * @param \Closure|array|string $column
119 * @param string $operator
120 * @param mixed $value
121 * @return \Illuminate\Database\Eloquent\Builder|static
122 * @static
123 */
124 public static function orWhere($column, $operator = null, $value = null)
125 {
126 return \Illuminate\Database\Eloquent\Builder::orWhere($column, $operator, $value);
127 }
128
129 /**
130 * Create a collection of models from plain arrays.
131 *
132 * @param array $items
133 * @return \Illuminate\Database\Eloquent\Collection
134 * @static
135 */
136 public static function hydrate($items)
137 {
138 return \Illuminate\Database\Eloquent\Builder::hydrate($items);
139 }
140
141 /**
142 * Create a collection of models from a raw query.
143 *
144 * @param string $query
145 * @param array $bindings
146 * @return \Illuminate\Database\Eloquent\Collection
147 * @static
148 */
149 public static function fromQuery($query, $bindings = array())
150 {
151 return \Illuminate\Database\Eloquent\Builder::fromQuery($query, $bindings);
152 }
153
154 /**
155 * Find a model by its primary key.
156 *
157 * @param mixed $id
158 * @param array $columns
159 * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static[]|static|null
160 * @static
161 */
162 public static function find($id, $columns = array())
163 {
164 return \Illuminate\Database\Eloquent\Builder::find($id, $columns);
165 }
166
167 /**
168 * Find multiple models by their primary keys.
169 *
170 * @param \Illuminate\Contracts\Support\Arrayable|array $ids
171 * @param array $columns
172 * @return \Illuminate\Database\Eloquent\Collection
173 * @static
174 */
175 public static function findMany($ids, $columns = array())
176 {
177 return \Illuminate\Database\Eloquent\Builder::findMany($ids, $columns);
178 }
179
180 /**
181 * Find a model by its primary key or throw an exception.
182 *
183 * @param mixed $id
184 * @param array $columns
185 * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection
186 * @throws \Illuminate\Database\Eloquent\ModelNotFoundException
187 * @static
188 */
189 public static function findOrFail($id, $columns = array())
190 {
191 return \Illuminate\Database\Eloquent\Builder::findOrFail($id, $columns);
192 }
193
194 /**
195 * Find a model by its primary key or return fresh model instance.
196 *
197 * @param mixed $id
198 * @param array $columns
199 * @return \Illuminate\Database\Eloquent\Model
200 * @static
201 */
202 public static function findOrNew($id, $columns = array())
203 {
204 return \Illuminate\Database\Eloquent\Builder::findOrNew($id, $columns);
205 }
206
207 /**
208 * Get the first record matching the attributes or instantiate it.
209 *
210 * @param array $attributes
211 * @param array $values
212 * @return \Illuminate\Database\Eloquent\Model
213 * @static
214 */
215 public static function firstOrNew($attributes, $values = array())
216 {
217 return \Illuminate\Database\Eloquent\Builder::firstOrNew($attributes, $values);
218 }
219
220 /**
221 * Get the first record matching the attributes or create it.
222 *
223 * @param array $attributes
224 * @param array $values
225 * @return \Illuminate\Database\Eloquent\Model
226 * @static
227 */
228 public static function firstOrCreate($attributes, $values = array())
229 {
230 return \Illuminate\Database\Eloquent\Builder::firstOrCreate($attributes, $values);
231 }
232
233 /**
234 * Create or update a record matching the attributes, and fill it with values.
235 *
236 * @param array $attributes
237 * @param array $values
238 * @return \Illuminate\Database\Eloquent\Model
239 * @static
240 */
241 public static function updateOrCreate($attributes, $values = array())
242 {
243 return \Illuminate\Database\Eloquent\Builder::updateOrCreate($attributes, $values);
244 }
245
246 /**
247 * Execute the query and get the first result or throw an exception.
248 *
249 * @param array $columns
250 * @return \Illuminate\Database\Eloquent\Model|static
251 * @throws \Illuminate\Database\Eloquent\ModelNotFoundException
252 * @static
253 */
254 public static function firstOrFail($columns = array())
255 {
256 return \Illuminate\Database\Eloquent\Builder::firstOrFail($columns);
257 }
258
259 /**
260 * Execute the query and get the first result or call a callback.
261 *
262 * @param \Closure|array $columns
263 * @param \Closure|null $callback
264 * @return \Illuminate\Database\Eloquent\Model|static|mixed
265 * @static
266 */
267 public static function firstOr($columns = array(), $callback = null)
268 {
269 return \Illuminate\Database\Eloquent\Builder::firstOr($columns, $callback);
270 }
271
272 /**
273 * Get a single column's value from the first result of a query.
274 *
275 * @param string $column
276 * @return mixed
277 * @static
278 */
279 public static function value($column)
280 {
281 return \Illuminate\Database\Eloquent\Builder::value($column);
282 }
283
284 /**
285 * Execute the query as a "select" statement.
286 *
287 * @param array $columns
288 * @return \Illuminate\Database\Eloquent\Collection|static[]
289 * @static
290 */
291 public static function get($columns = array())
292 {
293 return \Illuminate\Database\Eloquent\Builder::get($columns);
294 }
295
296 /**
297 * Get the hydrated models without eager loading.
298 *
299 * @param array $columns
300 * @return \Illuminate\Database\Eloquent\Model[]
301 * @static
302 */
303 public static function getModels($columns = array())
304 {
305 return \Illuminate\Database\Eloquent\Builder::getModels($columns);
306 }
307
308 /**
309 * Eager load the relationships for the models.
310 *
311 * @param array $models
312 * @return array
313 * @static
314 */
315 public static function eagerLoadRelations($models)
316 {
317 return \Illuminate\Database\Eloquent\Builder::eagerLoadRelations($models);
318 }
319
320 /**
321 * Get a generator for the given query.
322 *
323 * @return \Generator
324 * @static
325 */
326 public static function cursor()
327 {
328 return \Illuminate\Database\Eloquent\Builder::cursor();
329 }
330
331 /**
332 * Chunk the results of a query by comparing numeric IDs.
333 *
334 * @param int $count
335 * @param callable $callback
336 * @param string $column
337 * @param string|null $alias
338 * @return bool
339 * @static
340 */
341 public static function chunkById($count, $callback, $column = null, $alias = null)
342 {
343 return \Illuminate\Database\Eloquent\Builder::chunkById($count, $callback, $column, $alias);
344 }
345
346 /**
347 * Get an array with the values of a given column.
348 *
349 * @param string $column
350 * @param string|null $key
351 * @return \Illuminate\Support\Collection
352 * @static
353 */
354 public static function pluck($column, $key = null)
355 {
356 return \Illuminate\Database\Eloquent\Builder::pluck($column, $key);
357 }
358
359 /**
360 * Paginate the given query.
361 *
362 * @param int $perPage
363 * @param array $columns
364 * @param string $pageName
365 * @param int|null $page
366 * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
367 * @throws \InvalidArgumentException
368 * @static
369 */
370 public static function paginate($perPage = null, $columns = array(), $pageName = 'page', $page = null)
371 {
372 return \Illuminate\Database\Eloquent\Builder::paginate($perPage, $columns, $pageName, $page);
373 }
374
375 /**
376 * Paginate the given query into a simple paginator.
377 *
378 * @param int $perPage
379 * @param array $columns
380 * @param string $pageName
381 * @param int|null $page
382 * @return \Illuminate\Contracts\Pagination\Paginator
383 * @static
384 */
385 public static function simplePaginate($perPage = null, $columns = array(), $pageName = 'page', $page = null)
386 {
387 return \Illuminate\Database\Eloquent\Builder::simplePaginate($perPage, $columns, $pageName, $page);
388 }
389
390 /**
391 * Save a new model and return the instance.
392 *
393 * @param array $attributes
394 * @return \Illuminate\Database\Eloquent\Model|$this
395 * @static
396 */
397 public static function create($attributes = array())
398 {
399 return \Illuminate\Database\Eloquent\Builder::create($attributes);
400 }
401
402 /**
403 * Save a new model and return the instance. Allow mass-assignment.
404 *
405 * @param array $attributes
406 * @return \Illuminate\Database\Eloquent\Model|$this
407 * @static
408 */
409 public static function forceCreate($attributes)
410 {
411 return \Illuminate\Database\Eloquent\Builder::forceCreate($attributes);
412 }
413
414 /**
415 * Register a replacement for the default delete function.
416 *
417 * @param \Closure $callback
418 * @return void
419 * @static
420 */
421 public static function onDelete($callback)
422 {
423 \Illuminate\Database\Eloquent\Builder::onDelete($callback);
424 }
425
426 /**
427 * Call the given local model scopes.
428 *
429 * @param array $scopes
430 * @return mixed
431 * @static
432 */
433 public static function scopes($scopes)
434 {
435 return \Illuminate\Database\Eloquent\Builder::scopes($scopes);
436 }
437
438 /**
439 * Apply the scopes to the Eloquent builder instance and return it.
440 *
441 * @return \Illuminate\Database\Eloquent\Builder|static
442 * @static
443 */
444 public static function applyScopes()
445 {
446 return \Illuminate\Database\Eloquent\Builder::applyScopes();
447 }
448
449 /**
450 * Prevent the specified relations from being eager loaded.
451 *
452 * @param mixed $relations
453 * @return $this
454 * @static
455 */
456 public static function without($relations)
457 {
458 return \Illuminate\Database\Eloquent\Builder::without($relations);
459 }
460
461 /**
462 * Create a new instance of the model being queried.
463 *
464 * @param array $attributes
465 * @return \Illuminate\Database\Eloquent\Model
466 * @static
467 */
468 public static function newModelInstance($attributes = array())
469 {
470 return \Illuminate\Database\Eloquent\Builder::newModelInstance($attributes);
471 }
472
473 /**
474 * Get the underlying query builder instance.
475 *
476 * @return \Illuminate\Database\Query\Builder
477 * @static
478 */
479 public static function getQuery()
480 {
481 return \Illuminate\Database\Eloquent\Builder::getQuery();
482 }
483
484 /**
485 * Set the underlying query builder instance.
486 *
487 * @param \Illuminate\Database\Query\Builder $query
488 * @return $this
489 * @static
490 */
491 public static function setQuery($query)
492 {
493 return \Illuminate\Database\Eloquent\Builder::setQuery($query);
494 }
495
496 /**
497 * Get a base query builder instance.
498 *
499 * @return \Illuminate\Database\Query\Builder
500 * @static
501 */
502 public static function toBase()
503 {
504 return \Illuminate\Database\Eloquent\Builder::toBase();
505 }
506
507 /**
508 * Get the relationships being eagerly loaded.
509 *
510 * @return array
511 * @static
512 */
513 public static function getEagerLoads()
514 {
515 return \Illuminate\Database\Eloquent\Builder::getEagerLoads();
516 }
517
518 /**
519 * Set the relationships being eagerly loaded.
520 *
521 * @param array $eagerLoad
522 * @return $this
523 * @static
524 */
525 public static function setEagerLoads($eagerLoad)
526 {
527 return \Illuminate\Database\Eloquent\Builder::setEagerLoads($eagerLoad);
528 }
529
530 /**
531 * Get the model instance being queried.
532 *
533 * @return \Illuminate\Database\Eloquent\Model
534 * @static
535 */
536 public static function getModel()
537 {
538 return \Illuminate\Database\Eloquent\Builder::getModel();
539 }
540
541 /**
542 * Set a model instance for the model being queried.
543 *
544 * @param \Illuminate\Database\Eloquent\Model $model
545 * @return $this
546 * @static
547 */
548 public static function setModel($model)
549 {
550 return \Illuminate\Database\Eloquent\Builder::setModel($model);
551 }
552
553 /**
554 * Get the given macro by name.
555 *
556 * @param string $name
557 * @return \Closure
558 * @static
559 */
560 public static function getMacro($name)
561 {
562 return \Illuminate\Database\Eloquent\Builder::getMacro($name);
563 }
564
565 /**
566 * Chunk the results of the query.
567 *
568 * @param int $count
569 * @param callable $callback
570 * @return bool
571 * @static
572 */
573 public static function chunk($count, $callback)
574 {
575 return \Illuminate\Database\Eloquent\Builder::chunk($count, $callback);
576 }
577
578 /**
579 * Execute a callback over each item while chunking.
580 *
581 * @param callable $callback
582 * @param int $count
583 * @return bool
584 * @static
585 */
586 public static function each($callback, $count = 1000)
587 {
588 return \Illuminate\Database\Eloquent\Builder::each($callback, $count);
589 }
590
591 /**
592 * Execute the query and get the first result.
593 *
594 * @param array $columns
595 * @return \Illuminate\Database\Eloquent\Model|static|null
596 * @static
597 */
598 public static function first($columns = array())
599 {
600 return \Illuminate\Database\Eloquent\Builder::first($columns);
601 }
602
603 /**
604 * Apply the callback's query changes if the given "value" is true.
605 *
606 * @param mixed $value
607 * @param callable $callback
608 * @param callable $default
609 * @return mixed
610 * @static
611 */
612 public static function when($value, $callback, $default = null)
613 {
614 return \Illuminate\Database\Eloquent\Builder::when($value, $callback, $default);
615 }
616
617 /**
618 * Pass the query to a given callback.
619 *
620 * @param \Closure $callback
621 * @return \Illuminate\Database\Query\Builder
622 * @static
623 */
624 public static function tap($callback)
625 {
626 return \Illuminate\Database\Eloquent\Builder::tap($callback);
627 }
628
629 /**
630 * Apply the callback's query changes if the given "value" is false.
631 *
632 * @param mixed $value
633 * @param callable $callback
634 * @param callable $default
635 * @return mixed
636 * @static
637 */
638 public static function unless($value, $callback, $default = null)
639 {
640 return \Illuminate\Database\Eloquent\Builder::unless($value, $callback, $default);
641 }
642
643 /**
644 * Add a relationship count / exists condition to the query.
645 *
646 * @param string $relation
647 * @param string $operator
648 * @param int $count
649 * @param string $boolean
650 * @param \Closure|null $callback
651 * @return \Illuminate\Database\Eloquent\Builder|static
652 * @static
653 */
654 public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
655 {
656 return \Illuminate\Database\Eloquent\Builder::has($relation, $operator, $count, $boolean, $callback);
657 }
658
659 /**
660 * Add a relationship count / exists condition to the query with an "or".
661 *
662 * @param string $relation
663 * @param string $operator
664 * @param int $count
665 * @return \Illuminate\Database\Eloquent\Builder|static
666 * @static
667 */
668 public static function orHas($relation, $operator = '>=', $count = 1)
669 {
670 return \Illuminate\Database\Eloquent\Builder::orHas($relation, $operator, $count);
671 }
672
673 /**
674 * Add a relationship count / exists condition to the query.
675 *
676 * @param string $relation
677 * @param string $boolean
678 * @param \Closure|null $callback
679 * @return \Illuminate\Database\Eloquent\Builder|static
680 * @static
681 */
682 public static function doesntHave($relation, $boolean = 'and', $callback = null)
683 {
684 return \Illuminate\Database\Eloquent\Builder::doesntHave($relation, $boolean, $callback);
685 }
686
687 /**
688 * Add a relationship count / exists condition to the query with an "or".
689 *
690 * @param string $relation
691 * @return \Illuminate\Database\Eloquent\Builder|static
692 * @static
693 */
694 public static function orDoesntHave($relation)
695 {
696 return \Illuminate\Database\Eloquent\Builder::orDoesntHave($relation);
697 }
698
699 /**
700 * Add a relationship count / exists condition to the query with where clauses.
701 *
702 * @param string $relation
703 * @param \Closure|null $callback
704 * @param string $operator
705 * @param int $count
706 * @return \Illuminate\Database\Eloquent\Builder|static
707 * @static
708 */
709 public static function whereHas($relation, $callback = null, $operator = '>=', $count = 1)
710 {
711 return \Illuminate\Database\Eloquent\Builder::whereHas($relation, $callback, $operator, $count);
712 }
713
714 /**
715 * Add a relationship count / exists condition to the query with where clauses and an "or".
716 *
717 * @param string $relation
718 * @param \Closure $callback
719 * @param string $operator
720 * @param int $count
721 * @return \Illuminate\Database\Eloquent\Builder|static
722 * @static
723 */
724 public static function orWhereHas($relation, $callback = null, $operator = '>=', $count = 1)
725 {
726 return \Illuminate\Database\Eloquent\Builder::orWhereHas($relation, $callback, $operator, $count);
727 }
728
729 /**
730 * Add a relationship count / exists condition to the query with where clauses.
731 *
732 * @param string $relation
733 * @param \Closure|null $callback
734 * @return \Illuminate\Database\Eloquent\Builder|static
735 * @static
736 */
737 public static function whereDoesntHave($relation, $callback = null)
738 {
739 return \Illuminate\Database\Eloquent\Builder::whereDoesntHave($relation, $callback);
740 }
741
742 /**
743 * Add a relationship count / exists condition to the query with where clauses and an "or".
744 *
745 * @param string $relation
746 * @param \Closure $callback
747 * @return \Illuminate\Database\Eloquent\Builder|static
748 * @static
749 */
750 public static function orWhereDoesntHave($relation, $callback = null)
751 {
752 return \Illuminate\Database\Eloquent\Builder::orWhereDoesntHave($relation, $callback);
753 }
754
755 /**
756 * Add subselect queries to count the relations.
757 *
758 * @param mixed $relations
759 * @return $this
760 * @static
761 */
762 public static function withCount($relations)
763 {
764 return \Illuminate\Database\Eloquent\Builder::withCount($relations);
765 }
766
767 /**
768 * Merge the where constraints from another query to the current query.
769 *
770 * @param \Illuminate\Database\Eloquent\Builder $from
771 * @return \Illuminate\Database\Eloquent\Builder|static
772 * @static
773 */
774 public static function mergeConstraintsFrom($from)
775 {
776 return \Illuminate\Database\Eloquent\Builder::mergeConstraintsFrom($from);
777 }
778
779 /**
780 * Set the columns to be selected.
781 *
782 * @param array|mixed $columns
783 * @return $this
784 * @static
785 */
786 public static function select($columns = array())
787 {
788 return \Illuminate\Database\Query\Builder::select($columns);
789 }
790
791 /**
792 * Add a new "raw" select expression to the query.
793 *
794 * @param string $expression
795 * @param array $bindings
796 * @return \Illuminate\Database\Query\Builder|static
797 * @static
798 */
799 public static function selectRaw($expression, $bindings = array())
800 {
801 return \Illuminate\Database\Query\Builder::selectRaw($expression, $bindings);
802 }
803
804 /**
805 * Add a subselect expression to the query.
806 *
807 * @param \Closure|\Illuminate\Database\Query\Builder|string $query
808 * @param string $as
809 * @return \Illuminate\Database\Query\Builder|static
810 * @throws \InvalidArgumentException
811 * @static
812 */
813 public static function selectSub($query, $as)
814 {
815 return \Illuminate\Database\Query\Builder::selectSub($query, $as);
816 }
817
818 /**
819 * Add a new select column to the query.
820 *
821 * @param array|mixed $column
822 * @return $this
823 * @static
824 */
825 public static function addSelect($column)
826 {
827 return \Illuminate\Database\Query\Builder::addSelect($column);
828 }
829
830 /**
831 * Force the query to only return distinct results.
832 *
833 * @return $this
834 * @static
835 */
836 public static function distinct()
837 {
838 return \Illuminate\Database\Query\Builder::distinct();
839 }
840
841 /**
842 * Set the table which the query is targeting.
843 *
844 * @param string $table
845 * @return $this
846 * @static
847 */
848 public static function from($table)
849 {
850 return \Illuminate\Database\Query\Builder::from($table);
851 }
852
853 /**
854 * Add a join clause to the query.
855 *
856 * @param string $table
857 * @param string $first
858 * @param string|null $operator
859 * @param string|null $second
860 * @param string $type
861 * @param bool $where
862 * @return $this
863 * @static
864 */
865 public static function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false)
866 {
867 return \Illuminate\Database\Query\Builder::join($table, $first, $operator, $second, $type, $where);
868 }
869
870 /**
871 * Add a "join where" clause to the query.
872 *
873 * @param string $table
874 * @param string $first
875 * @param string $operator
876 * @param string $second
877 * @param string $type
878 * @return \Illuminate\Database\Query\Builder|static
879 * @static
880 */
881 public static function joinWhere($table, $first, $operator, $second, $type = 'inner')
882 {
883 return \Illuminate\Database\Query\Builder::joinWhere($table, $first, $operator, $second, $type);
884 }
885
886 /**
887 * Add a left join to the query.
888 *
889 * @param string $table
890 * @param string $first
891 * @param string|null $operator
892 * @param string|null $second
893 * @return \Illuminate\Database\Query\Builder|static
894 * @static
895 */
896 public static function leftJoin($table, $first, $operator = null, $second = null)
897 {
898 return \Illuminate\Database\Query\Builder::leftJoin($table, $first, $operator, $second);
899 }
900
901 /**
902 * Add a "join where" clause to the query.
903 *
904 * @param string $table
905 * @param string $first
906 * @param string $operator
907 * @param string $second
908 * @return \Illuminate\Database\Query\Builder|static
909 * @static
910 */
911 public static function leftJoinWhere($table, $first, $operator, $second)
912 {
913 return \Illuminate\Database\Query\Builder::leftJoinWhere($table, $first, $operator, $second);
914 }
915
916 /**
917 * Add a right join to the query.
918 *
919 * @param string $table
920 * @param string $first
921 * @param string|null $operator
922 * @param string|null $second
923 * @return \Illuminate\Database\Query\Builder|static
924 * @static
925 */
926 public static function rightJoin($table, $first, $operator = null, $second = null)
927 {
928 return \Illuminate\Database\Query\Builder::rightJoin($table, $first, $operator, $second);
929 }
930
931 /**
932 * Add a "right join where" clause to the query.
933 *
934 * @param string $table
935 * @param string $first
936 * @param string $operator
937 * @param string $second
938 * @return \Illuminate\Database\Query\Builder|static
939 * @static
940 */
941 public static function rightJoinWhere($table, $first, $operator, $second)
942 {
943 return \Illuminate\Database\Query\Builder::rightJoinWhere($table, $first, $operator, $second);
944 }
945
946 /**
947 * Add a "cross join" clause to the query.
948 *
949 * @param string $table
950 * @param string|null $first
951 * @param string|null $operator
952 * @param string|null $second
953 * @return \Illuminate\Database\Query\Builder|static
954 * @static
955 */
956 public static function crossJoin($table, $first = null, $operator = null, $second = null)
957 {
958 return \Illuminate\Database\Query\Builder::crossJoin($table, $first, $operator, $second);
959 }
960
961 /**
962 * Merge an array of where clauses and bindings.
963 *
964 * @param array $wheres
965 * @param array $bindings
966 * @return void
967 * @static
968 */
969 public static function mergeWheres($wheres, $bindings)
970 {
971 \Illuminate\Database\Query\Builder::mergeWheres($wheres, $bindings);
972 }
973
974 /**
975 * Add a "where" clause comparing two columns to the query.
976 *
977 * @param string|array $first
978 * @param string|null $operator
979 * @param string|null $second
980 * @param string|null $boolean
981 * @return \Illuminate\Database\Query\Builder|static
982 * @static
983 */
984 public static function whereColumn($first, $operator = null, $second = null, $boolean = 'and')
985 {
986 return \Illuminate\Database\Query\Builder::whereColumn($first, $operator, $second, $boolean);
987 }
988
989 /**
990 * Add an "or where" clause comparing two columns to the query.
991 *
992 * @param string|array $first
993 * @param string|null $operator
994 * @param string|null $second
995 * @return \Illuminate\Database\Query\Builder|static
996 * @static
997 */
998 public static function orWhereColumn($first, $operator = null, $second = null)
999 {
1000 return \Illuminate\Database\Query\Builder::orWhereColumn($first, $operator, $second);
1001 }
1002
1003 /**
1004 * Add a raw where clause to the query.
1005 *
1006 * @param string $sql
1007 * @param mixed $bindings
1008 * @param string $boolean
1009 * @return $this
1010 * @static
1011 */
1012 public static function whereRaw($sql, $bindings = array(), $boolean = 'and')
1013 {
1014 return \Illuminate\Database\Query\Builder::whereRaw($sql, $bindings, $boolean);
1015 }
1016
1017 /**
1018 * Add a raw or where clause to the query.
1019 *
1020 * @param string $sql
1021 * @param mixed $bindings
1022 * @return \Illuminate\Database\Query\Builder|static
1023 * @static
1024 */
1025 public static function orWhereRaw($sql, $bindings = array())
1026 {
1027 return \Illuminate\Database\Query\Builder::orWhereRaw($sql, $bindings);
1028 }
1029
1030 /**
1031 * Add a "where in" clause to the query.
1032 *
1033 * @param string $column
1034 * @param mixed $values
1035 * @param string $boolean
1036 * @param bool $not
1037 * @return $this
1038 * @static
1039 */
1040 public static function whereIn($column, $values, $boolean = 'and', $not = false)
1041 {
1042 return \Illuminate\Database\Query\Builder::whereIn($column, $values, $boolean, $not);
1043 }
1044
1045 /**
1046 * Add an "or where in" clause to the query.
1047 *
1048 * @param string $column
1049 * @param mixed $values
1050 * @return \Illuminate\Database\Query\Builder|static
1051 * @static
1052 */
1053 public static function orWhereIn($column, $values)
1054 {
1055 return \Illuminate\Database\Query\Builder::orWhereIn($column, $values);
1056 }
1057
1058 /**
1059 * Add a "where not in" clause to the query.
1060 *
1061 * @param string $column
1062 * @param mixed $values
1063 * @param string $boolean
1064 * @return \Illuminate\Database\Query\Builder|static
1065 * @static
1066 */
1067 public static function whereNotIn($column, $values, $boolean = 'and')
1068 {
1069 return \Illuminate\Database\Query\Builder::whereNotIn($column, $values, $boolean);
1070 }
1071
1072 /**
1073 * Add an "or where not in" clause to the query.
1074 *
1075 * @param string $column
1076 * @param mixed $values
1077 * @return \Illuminate\Database\Query\Builder|static
1078 * @static
1079 */
1080 public static function orWhereNotIn($column, $values)
1081 {
1082 return \Illuminate\Database\Query\Builder::orWhereNotIn($column, $values);
1083 }
1084
1085 /**
1086 * Add a "where null" clause to the query.
1087 *
1088 * @param string $column
1089 * @param string $boolean
1090 * @param bool $not
1091 * @return $this
1092 * @static
1093 */
1094 public static function whereNull($column, $boolean = 'and', $not = false)
1095 {
1096 return \Illuminate\Database\Query\Builder::whereNull($column, $boolean, $not);
1097 }
1098
1099 /**
1100 * Add an "or where null" clause to the query.
1101 *
1102 * @param string $column
1103 * @return \Illuminate\Database\Query\Builder|static
1104 * @static
1105 */
1106 public static function orWhereNull($column)
1107 {
1108 return \Illuminate\Database\Query\Builder::orWhereNull($column);
1109 }
1110
1111 /**
1112 * Add a "where not null" clause to the query.
1113 *
1114 * @param string $column
1115 * @param string $boolean
1116 * @return \Illuminate\Database\Query\Builder|static
1117 * @static
1118 */
1119 public static function whereNotNull($column, $boolean = 'and')
1120 {
1121 return \Illuminate\Database\Query\Builder::whereNotNull($column, $boolean);
1122 }
1123
1124 /**
1125 * Add a where between statement to the query.
1126 *
1127 * @param string $column
1128 * @param array $values
1129 * @param string $boolean
1130 * @param bool $not
1131 * @return $this
1132 * @static
1133 */
1134 public static function whereBetween($column, $values, $boolean = 'and', $not = false)
1135 {
1136 return \Illuminate\Database\Query\Builder::whereBetween($column, $values, $boolean, $not);
1137 }
1138
1139 /**
1140 * Add an or where between statement to the query.
1141 *
1142 * @param string $column
1143 * @param array $values
1144 * @return \Illuminate\Database\Query\Builder|static
1145 * @static
1146 */
1147 public static function orWhereBetween($column, $values)
1148 {
1149 return \Illuminate\Database\Query\Builder::orWhereBetween($column, $values);
1150 }
1151
1152 /**
1153 * Add a where not between statement to the query.
1154 *
1155 * @param string $column
1156 * @param array $values
1157 * @param string $boolean
1158 * @return \Illuminate\Database\Query\Builder|static
1159 * @static
1160 */
1161 public static function whereNotBetween($column, $values, $boolean = 'and')
1162 {
1163 return \Illuminate\Database\Query\Builder::whereNotBetween($column, $values, $boolean);
1164 }
1165
1166 /**
1167 * Add an or where not between statement to the query.
1168 *
1169 * @param string $column
1170 * @param array $values
1171 * @return \Illuminate\Database\Query\Builder|static
1172 * @static
1173 */
1174 public static function orWhereNotBetween($column, $values)
1175 {
1176 return \Illuminate\Database\Query\Builder::orWhereNotBetween($column, $values);
1177 }
1178
1179 /**
1180 * Add an "or where not null" clause to the query.
1181 *
1182 * @param string $column
1183 * @return \Illuminate\Database\Query\Builder|static
1184 * @static
1185 */
1186 public static function orWhereNotNull($column)
1187 {
1188 return \Illuminate\Database\Query\Builder::orWhereNotNull($column);
1189 }
1190
1191 /**
1192 * Add a "where date" statement to the query.
1193 *
1194 * @param string $column
1195 * @param string $operator
1196 * @param mixed $value
1197 * @param string $boolean
1198 * @return \Illuminate\Database\Query\Builder|static
1199 * @static
1200 */
1201 public static function whereDate($column, $operator, $value = null, $boolean = 'and')
1202 {
1203 return \Illuminate\Database\Query\Builder::whereDate($column, $operator, $value, $boolean);
1204 }
1205
1206 /**
1207 * Add an "or where date" statement to the query.
1208 *
1209 * @param string $column
1210 * @param string $operator
1211 * @param string $value
1212 * @return \Illuminate\Database\Query\Builder|static
1213 * @static
1214 */
1215 public static function orWhereDate($column, $operator, $value)
1216 {
1217 return \Illuminate\Database\Query\Builder::orWhereDate($column, $operator, $value);
1218 }
1219
1220 /**
1221 * Add a "where time" statement to the query.
1222 *
1223 * @param string $column
1224 * @param string $operator
1225 * @param int $value
1226 * @param string $boolean
1227 * @return \Illuminate\Database\Query\Builder|static
1228 * @static
1229 */
1230 public static function whereTime($column, $operator, $value, $boolean = 'and')
1231 {
1232 return \Illuminate\Database\Query\Builder::whereTime($column, $operator, $value, $boolean);
1233 }
1234
1235 /**
1236 * Add an "or where time" statement to the query.
1237 *
1238 * @param string $column
1239 * @param string $operator
1240 * @param int $value
1241 * @return \Illuminate\Database\Query\Builder|static
1242 * @static
1243 */
1244 public static function orWhereTime($column, $operator, $value)
1245 {
1246 return \Illuminate\Database\Query\Builder::orWhereTime($column, $operator, $value);
1247 }
1248
1249 /**
1250 * Add a "where day" statement to the query.
1251 *
1252 * @param string $column
1253 * @param string $operator
1254 * @param mixed $value
1255 * @param string $boolean
1256 * @return \Illuminate\Database\Query\Builder|static
1257 * @static
1258 */
1259 public static function whereDay($column, $operator, $value = null, $boolean = 'and')
1260 {
1261 return \Illuminate\Database\Query\Builder::whereDay($column, $operator, $value, $boolean);
1262 }
1263
1264 /**
1265 * Add a "where month" statement to the query.
1266 *
1267 * @param string $column
1268 * @param string $operator
1269 * @param mixed $value
1270 * @param string $boolean
1271 * @return \Illuminate\Database\Query\Builder|static
1272 * @static
1273 */
1274 public static function whereMonth($column, $operator, $value = null, $boolean = 'and')
1275 {
1276 return \Illuminate\Database\Query\Builder::whereMonth($column, $operator, $value, $boolean);
1277 }
1278
1279 /**
1280 * Add a "where year" statement to the query.
1281 *
1282 * @param string $column
1283 * @param string $operator
1284 * @param mixed $value
1285 * @param string $boolean
1286 * @return \Illuminate\Database\Query\Builder|static
1287 * @static
1288 */
1289 public static function whereYear($column, $operator, $value = null, $boolean = 'and')
1290 {
1291 return \Illuminate\Database\Query\Builder::whereYear($column, $operator, $value, $boolean);
1292 }
1293
1294 /**
1295 * Add a nested where statement to the query.
1296 *
1297 * @param \Closure $callback
1298 * @param string $boolean
1299 * @return \Illuminate\Database\Query\Builder|static
1300 * @static
1301 */
1302 public static function whereNested($callback, $boolean = 'and')
1303 {
1304 return \Illuminate\Database\Query\Builder::whereNested($callback, $boolean);
1305 }
1306
1307 /**
1308 * Create a new query instance for nested where condition.
1309 *
1310 * @return \Illuminate\Database\Query\Builder
1311 * @static
1312 */
1313 public static function forNestedWhere()
1314 {
1315 return \Illuminate\Database\Query\Builder::forNestedWhere();
1316 }
1317
1318 /**
1319 * Add another query builder as a nested where to the query builder.
1320 *
1321 * @param \Illuminate\Database\Query\Builder|static $query
1322 * @param string $boolean
1323 * @return $this
1324 * @static
1325 */
1326 public static function addNestedWhereQuery($query, $boolean = 'and')
1327 {
1328 return \Illuminate\Database\Query\Builder::addNestedWhereQuery($query, $boolean);
1329 }
1330
1331 /**
1332 * Add an exists clause to the query.
1333 *
1334 * @param \Closure $callback
1335 * @param string $boolean
1336 * @param bool $not
1337 * @return $this
1338 * @static
1339 */
1340 public static function whereExists($callback, $boolean = 'and', $not = false)
1341 {
1342 return \Illuminate\Database\Query\Builder::whereExists($callback, $boolean, $not);
1343 }
1344
1345 /**
1346 * Add an or exists clause to the query.
1347 *
1348 * @param \Closure $callback
1349 * @param bool $not
1350 * @return \Illuminate\Database\Query\Builder|static
1351 * @static
1352 */
1353 public static function orWhereExists($callback, $not = false)
1354 {
1355 return \Illuminate\Database\Query\Builder::orWhereExists($callback, $not);
1356 }
1357
1358 /**
1359 * Add a where not exists clause to the query.
1360 *
1361 * @param \Closure $callback
1362 * @param string $boolean
1363 * @return \Illuminate\Database\Query\Builder|static
1364 * @static
1365 */
1366 public static function whereNotExists($callback, $boolean = 'and')
1367 {
1368 return \Illuminate\Database\Query\Builder::whereNotExists($callback, $boolean);
1369 }
1370
1371 /**
1372 * Add a where not exists clause to the query.
1373 *
1374 * @param \Closure $callback
1375 * @return \Illuminate\Database\Query\Builder|static
1376 * @static
1377 */
1378 public static function orWhereNotExists($callback)
1379 {
1380 return \Illuminate\Database\Query\Builder::orWhereNotExists($callback);
1381 }
1382
1383 /**
1384 * Add an exists clause to the query.
1385 *
1386 * @param \Illuminate\Database\Query\Builder $query
1387 * @param string $boolean
1388 * @param bool $not
1389 * @return $this
1390 * @static
1391 */
1392 public static function addWhereExistsQuery($query, $boolean = 'and', $not = false)
1393 {
1394 return \Illuminate\Database\Query\Builder::addWhereExistsQuery($query, $boolean, $not);
1395 }
1396
1397 /**
1398 * Handles dynamic "where" clauses to the query.
1399 *
1400 * @param string $method
1401 * @param string $parameters
1402 * @return $this
1403 * @static
1404 */
1405 public static function dynamicWhere($method, $parameters)
1406 {
1407 return \Illuminate\Database\Query\Builder::dynamicWhere($method, $parameters);
1408 }
1409
1410 /**
1411 * Add a "group by" clause to the query.
1412 *
1413 * @param array $groups
1414 * @return $this
1415 * @static
1416 */
1417 public static function groupBy($groups = null)
1418 {
1419 return \Illuminate\Database\Query\Builder::groupBy($groups);
1420 }
1421
1422 /**
1423 * Add a "having" clause to the query.
1424 *
1425 * @param string $column
1426 * @param string|null $operator
1427 * @param string|null $value
1428 * @param string $boolean
1429 * @return $this
1430 * @static
1431 */
1432 public static function having($column, $operator = null, $value = null, $boolean = 'and')
1433 {
1434 return \Illuminate\Database\Query\Builder::having($column, $operator, $value, $boolean);
1435 }
1436
1437 /**
1438 * Add a "or having" clause to the query.
1439 *
1440 * @param string $column
1441 * @param string|null $operator
1442 * @param string|null $value
1443 * @return \Illuminate\Database\Query\Builder|static
1444 * @static
1445 */
1446 public static function orHaving($column, $operator = null, $value = null)
1447 {
1448 return \Illuminate\Database\Query\Builder::orHaving($column, $operator, $value);
1449 }
1450
1451 /**
1452 * Add a raw having clause to the query.
1453 *
1454 * @param string $sql
1455 * @param array $bindings
1456 * @param string $boolean
1457 * @return $this
1458 * @static
1459 */
1460 public static function havingRaw($sql, $bindings = array(), $boolean = 'and')
1461 {
1462 return \Illuminate\Database\Query\Builder::havingRaw($sql, $bindings, $boolean);
1463 }
1464
1465 /**
1466 * Add a raw or having clause to the query.
1467 *
1468 * @param string $sql
1469 * @param array $bindings
1470 * @return \Illuminate\Database\Query\Builder|static
1471 * @static
1472 */
1473 public static function orHavingRaw($sql, $bindings = array())
1474 {
1475 return \Illuminate\Database\Query\Builder::orHavingRaw($sql, $bindings);
1476 }
1477
1478 /**
1479 * Add an "order by" clause to the query.
1480 *
1481 * @param string $column
1482 * @param string $direction
1483 * @return $this
1484 * @static
1485 */
1486 public static function orderBy($column, $direction = 'asc')
1487 {
1488 return \Illuminate\Database\Query\Builder::orderBy($column, $direction);
1489 }
1490
1491 /**
1492 * Add a descending "order by" clause to the query.
1493 *
1494 * @param string $column
1495 * @return $this
1496 * @static
1497 */
1498 public static function orderByDesc($column)
1499 {
1500 return \Illuminate\Database\Query\Builder::orderByDesc($column);
1501 }
1502
1503 /**
1504 * Add an "order by" clause for a timestamp to the query.
1505 *
1506 * @param string $column
1507 * @return \Illuminate\Database\Query\Builder|static
1508 * @static
1509 */
1510 public static function latest($column = 'created_at')
1511 {
1512 return \Illuminate\Database\Query\Builder::latest($column);
1513 }
1514
1515 /**
1516 * Add an "order by" clause for a timestamp to the query.
1517 *
1518 * @param string $column
1519 * @return \Illuminate\Database\Query\Builder|static
1520 * @static
1521 */
1522 public static function oldest($column = 'created_at')
1523 {
1524 return \Illuminate\Database\Query\Builder::oldest($column);
1525 }
1526
1527 /**
1528 * Put the query's results in random order.
1529 *
1530 * @param string $seed
1531 * @return $this
1532 * @static
1533 */
1534 public static function inRandomOrder($seed = '')
1535 {
1536 return \Illuminate\Database\Query\Builder::inRandomOrder($seed);
1537 }
1538
1539 /**
1540 * Add a raw "order by" clause to the query.
1541 *
1542 * @param string $sql
1543 * @param array $bindings
1544 * @return $this
1545 * @static
1546 */
1547 public static function orderByRaw($sql, $bindings = array())
1548 {
1549 return \Illuminate\Database\Query\Builder::orderByRaw($sql, $bindings);
1550 }
1551
1552 /**
1553 * Alias to set the "offset" value of the query.
1554 *
1555 * @param int $value
1556 * @return \Illuminate\Database\Query\Builder|static
1557 * @static
1558 */
1559 public static function skip($value)
1560 {
1561 return \Illuminate\Database\Query\Builder::skip($value);
1562 }
1563
1564 /**
1565 * Set the "offset" value of the query.
1566 *
1567 * @param int $value
1568 * @return $this
1569 * @static
1570 */
1571 public static function offset($value)
1572 {
1573 return \Illuminate\Database\Query\Builder::offset($value);
1574 }
1575
1576 /**
1577 * Alias to set the "limit" value of the query.
1578 *
1579 * @param int $value
1580 * @return \Illuminate\Database\Query\Builder|static
1581 * @static
1582 */
1583 public static function take($value)
1584 {
1585 return \Illuminate\Database\Query\Builder::take($value);
1586 }
1587
1588 /**
1589 * Set the "limit" value of the query.
1590 *
1591 * @param int $value
1592 * @return $this
1593 * @static
1594 */
1595 public static function limit($value)
1596 {
1597 return \Illuminate\Database\Query\Builder::limit($value);
1598 }
1599
1600 /**
1601 * Set the limit and offset for a given page.
1602 *
1603 * @param int $page
1604 * @param int $perPage
1605 * @return \Illuminate\Database\Query\Builder|static
1606 * @static
1607 */
1608 public static function forPage($page, $perPage = 15)
1609 {
1610 return \Illuminate\Database\Query\Builder::forPage($page, $perPage);
1611 }
1612
1613 /**
1614 * Constrain the query to the next "page" of results after a given ID.
1615 *
1616 * @param int $perPage
1617 * @param int $lastId
1618 * @param string $column
1619 * @return \Illuminate\Database\Query\Builder|static
1620 * @static
1621 */
1622 public static function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id')
1623 {
1624 return \Illuminate\Database\Query\Builder::forPageAfterId($perPage, $lastId, $column);
1625 }
1626
1627 /**
1628 * Add a union statement to the query.
1629 *
1630 * @param \Illuminate\Database\Query\Builder|\Closure $query
1631 * @param bool $all
1632 * @return \Illuminate\Database\Query\Builder|static
1633 * @static
1634 */
1635 public static function union($query, $all = false)
1636 {
1637 return \Illuminate\Database\Query\Builder::union($query, $all);
1638 }
1639
1640 /**
1641 * Add a union all statement to the query.
1642 *
1643 * @param \Illuminate\Database\Query\Builder|\Closure $query
1644 * @return \Illuminate\Database\Query\Builder|static
1645 * @static
1646 */
1647 public static function unionAll($query)
1648 {
1649 return \Illuminate\Database\Query\Builder::unionAll($query);
1650 }
1651
1652 /**
1653 * Lock the selected rows in the table.
1654 *
1655 * @param string|bool $value
1656 * @return $this
1657 * @static
1658 */
1659 public static function lock($value = true)
1660 {
1661 return \Illuminate\Database\Query\Builder::lock($value);
1662 }
1663
1664 /**
1665 * Lock the selected rows in the table for updating.
1666 *
1667 * @return \Illuminate\Database\Query\Builder
1668 * @static
1669 */
1670 public static function lockForUpdate()
1671 {
1672 return \Illuminate\Database\Query\Builder::lockForUpdate();
1673 }
1674
1675 /**
1676 * Share lock the selected rows in the table.
1677 *
1678 * @return \Illuminate\Database\Query\Builder
1679 * @static
1680 */
1681 public static function sharedLock()
1682 {
1683 return \Illuminate\Database\Query\Builder::sharedLock();
1684 }
1685
1686 /**
1687 * Get the SQL representation of the query.
1688 *
1689 * @return string
1690 * @static
1691 */
1692 public static function toSql()
1693 {
1694 return \Illuminate\Database\Query\Builder::toSql();
1695 }
1696
1697 /**
1698 * Get the count of the total records for the paginator.
1699 *
1700 * @param array $columns
1701 * @return int
1702 * @static
1703 */
1704 public static function getCountForPagination($columns = array())
1705 {
1706 return \Illuminate\Database\Query\Builder::getCountForPagination($columns);
1707 }
1708
1709 /**
1710 * Concatenate values of a given column as a string.
1711 *
1712 * @param string $column
1713 * @param string $glue
1714 * @return string
1715 * @static
1716 */
1717 public static function implode($column, $glue = '')
1718 {
1719 return \Illuminate\Database\Query\Builder::implode($column, $glue);
1720 }
1721
1722 /**
1723 * Determine if any rows exist for the current query.
1724 *
1725 * @return bool
1726 * @static
1727 */
1728 public static function exists()
1729 {
1730 return \Illuminate\Database\Query\Builder::exists();
1731 }
1732
1733 /**
1734 * Retrieve the "count" result of the query.
1735 *
1736 * @param string $columns
1737 * @return int
1738 * @static
1739 */
1740 public static function count($columns = '*')
1741 {
1742 return \Illuminate\Database\Query\Builder::count($columns);
1743 }
1744
1745 /**
1746 * Retrieve the minimum value of a given column.
1747 *
1748 * @param string $column
1749 * @return mixed
1750 * @static
1751 */
1752 public static function min($column)
1753 {
1754 return \Illuminate\Database\Query\Builder::min($column);
1755 }
1756
1757 /**
1758 * Retrieve the maximum value of a given column.
1759 *
1760 * @param string $column
1761 * @return mixed
1762 * @static
1763 */
1764 public static function max($column)
1765 {
1766 return \Illuminate\Database\Query\Builder::max($column);
1767 }
1768
1769 /**
1770 * Retrieve the sum of the values of a given column.
1771 *
1772 * @param string $column
1773 * @return mixed
1774 * @static
1775 */
1776 public static function sum($column)
1777 {
1778 return \Illuminate\Database\Query\Builder::sum($column);
1779 }
1780
1781 /**
1782 * Retrieve the average of the values of a given column.
1783 *
1784 * @param string $column
1785 * @return mixed
1786 * @static
1787 */
1788 public static function avg($column)
1789 {
1790 return \Illuminate\Database\Query\Builder::avg($column);
1791 }
1792
1793 /**
1794 * Alias for the "avg" method.
1795 *
1796 * @param string $column
1797 * @return mixed
1798 * @static
1799 */
1800 public static function average($column)
1801 {
1802 return \Illuminate\Database\Query\Builder::average($column);
1803 }
1804
1805 /**
1806 * Execute an aggregate function on the database.
1807 *
1808 * @param string $function
1809 * @param array $columns
1810 * @return mixed
1811 * @static
1812 */
1813 public static function aggregate($function, $columns = array())
1814 {
1815 return \Illuminate\Database\Query\Builder::aggregate($function, $columns);
1816 }
1817
1818 /**
1819 * Execute a numeric aggregate function on the database.
1820 *
1821 * @param string $function
1822 * @param array $columns
1823 * @return float|int
1824 * @static
1825 */
1826 public static function numericAggregate($function, $columns = array())
1827 {
1828 return \Illuminate\Database\Query\Builder::numericAggregate($function, $columns);
1829 }
1830
1831 /**
1832 * Insert a new record into the database.
1833 *
1834 * @param array $values
1835 * @return bool
1836 * @static
1837 */
1838 public static function insert($values)
1839 {
1840 return \Illuminate\Database\Query\Builder::insert($values);
1841 }
1842
1843 /**
1844 * Insert a new record and get the value of the primary key.
1845 *
1846 * @param array $values
1847 * @param string|null $sequence
1848 * @return int
1849 * @static
1850 */
1851 public static function insertGetId($values, $sequence = null)
1852 {
1853 return \Illuminate\Database\Query\Builder::insertGetId($values, $sequence);
1854 }
1855
1856 /**
1857 * Insert or update a record matching the attributes, and fill it with values.
1858 *
1859 * @param array $attributes
1860 * @param array $values
1861 * @return bool
1862 * @static
1863 */
1864 public static function updateOrInsert($attributes, $values = array())
1865 {
1866 return \Illuminate\Database\Query\Builder::updateOrInsert($attributes, $values);
1867 }
1868
1869 /**
1870 * Run a truncate statement on the table.
1871 *
1872 * @return void
1873 * @static
1874 */
1875 public static function truncate()
1876 {
1877 \Illuminate\Database\Query\Builder::truncate();
1878 }
1879
1880 /**
1881 * Create a raw database expression.
1882 *
1883 * @param mixed $value
1884 * @return \Illuminate\Database\Query\Expression
1885 * @static
1886 */
1887 public static function raw($value)
1888 {
1889 return \Illuminate\Database\Query\Builder::raw($value);
1890 }
1891
1892 /**
1893 * Get the current query value bindings in a flattened array.
1894 *
1895 * @return array
1896 * @static
1897 */
1898 public static function getBindings()
1899 {
1900 return \Illuminate\Database\Query\Builder::getBindings();
1901 }
1902
1903 /**
1904 * Get the raw array of bindings.
1905 *
1906 * @return array
1907 * @static
1908 */
1909 public static function getRawBindings()
1910 {
1911 return \Illuminate\Database\Query\Builder::getRawBindings();
1912 }
1913
1914 /**
1915 * Set the bindings on the query builder.
1916 *
1917 * @param array $bindings
1918 * @param string $type
1919 * @return $this
1920 * @throws \InvalidArgumentException
1921 * @static
1922 */
1923 public static function setBindings($bindings, $type = 'where')
1924 {
1925 return \Illuminate\Database\Query\Builder::setBindings($bindings, $type);
1926 }
1927
1928 /**
1929 * Add a binding to the query.
1930 *
1931 * @param mixed $value
1932 * @param string $type
1933 * @return $this
1934 * @throws \InvalidArgumentException
1935 * @static
1936 */
1937 public static function addBinding($value, $type = 'where')
1938 {
1939 return \Illuminate\Database\Query\Builder::addBinding($value, $type);
1940 }
1941
1942 /**
1943 * Merge an array of bindings into our bindings.
1944 *
1945 * @param \Illuminate\Database\Query\Builder $query
1946 * @return $this
1947 * @static
1948 */
1949 public static function mergeBindings($query)
1950 {
1951 return \Illuminate\Database\Query\Builder::mergeBindings($query);
1952 }
1953
1954 /**
1955 * Get the database query processor instance.
1956 *
1957 * @return \Illuminate\Database\Query\Processors\Processor
1958 * @static
1959 */
1960 public static function getProcessor()
1961 {
1962 return \Illuminate\Database\Query\Builder::getProcessor();
1963 }
1964
1965 /**
1966 * Get the query grammar instance.
1967 *
1968 * @return \Illuminate\Database\Query\Grammars\Grammar
1969 * @static
1970 */
1971 public static function getGrammar()
1972 {
1973 return \Illuminate\Database\Query\Builder::getGrammar();
1974 }
1975
1976 /**
1977 * Use the write pdo for query.
1978 *
1979 * @return $this
1980 * @static
1981 */
1982 public static function useWritePdo()
1983 {
1984 return \Illuminate\Database\Query\Builder::useWritePdo();
1985 }
1986
1987 /**
1988 * Clone the query without the given properties.
1989 *
1990 * @param array $properties
1991 * @return static
1992 * @static
1993 */
1994 public static function cloneWithout($properties)
1995 {
1996 return \Illuminate\Database\Query\Builder::cloneWithout($properties);
1997 }
1998
1999 /**
2000 * Clone the query without the given bindings.
2001 *
2002 * @param array $except
2003 * @return static
2004 * @static
2005 */
2006 public static function cloneWithoutBindings($except)
2007 {
2008 return \Illuminate\Database\Query\Builder::cloneWithoutBindings($except);
2009 }
2010
2011 /**
2012 * Register a custom macro.
2013 *
2014 * @param string $name
2015 * @param object|callable $macro
2016 * @return void
2017 * @static
2018 */
2019 public static function macro($name, $macro)
2020 {
2021 \Illuminate\Database\Query\Builder::macro($name, $macro);
2022 }
2023
2024 /**
2025 * Mix another object into the class.
2026 *
2027 * @param object $mixin
2028 * @return void
2029 * @static
2030 */
2031 public static function mixin($mixin)
2032 {
2033 \Illuminate\Database\Query\Builder::mixin($mixin);
2034 }
2035
2036 /**
2037 * Checks if macro is registered.
2038 *
2039 * @param string $name
2040 * @return bool
2041 * @static
2042 */
2043 public static function hasMacro($name)
2044 {
2045 return \Illuminate\Database\Query\Builder::hasMacro($name);
2046 }
2047
2048 /**
2049 * Dynamically handle calls to the class.
2050 *
2051 * @param string $method
2052 * @param array $parameters
2053 * @return mixed
2054 * @throws \BadMethodCallException
2055 * @static
2056 */
2057 public static function macroCall($method, $parameters)
2058 {
2059 return \Illuminate\Database\Query\Builder::macroCall($method, $parameters);
2060 }
2061 }
2062
2063}