CODE (htmlphp):
скопировать код в буфер обмена
скопировать код в буфер обмена
- public static function getWithAdmin($relation = null, $relation2 = null, $pagination = false, $sort = 'desc', $sort_field = 'id') {
- if($pagination) {
- return self::with($relation, $relation2)
- ->orderBy($sort_field, $sort)
- ->paginate($pagination);
- }
- return self::with($relation, $relation2)
- ->orderBy($sort_field, $sort)
- ->get();
- }