Download the PHP package dilneiss/laravel-repository without Composer
On this page you can find all versions of the php package dilneiss/laravel-repository. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download dilneiss/laravel-repository
More information about dilneiss/laravel-repository
Files in dilneiss/laravel-repository
Download dilneiss/laravel-repository
More information about dilneiss/laravel-repository
Files in dilneiss/laravel-repository
Vendor dilneiss
Package laravel-repository
Short Description Laravel Repository Package
License MIT
Package laravel-repository
Short Description Laravel Repository Package
License MIT
Keywords repositorylaravel
Please rate this library. Is it a good library?
Informations about the package laravel-repository
Laravel Repository
Laravel Version Support
-
^5.5
^6.0
^7.0
^8.0
Php Version Support
-
^7.0
^8.0
Table of Contents
- Installation
- Composer
- Command
- Methods
- Usage
- Create a Repository
- Use methods
Installation
Composer
Execute the following command to get the latest version of the package:
Repository Install
Create Repository
Create a new Eloquent model repository class
Methods
JetBox\Repositories\Contracts\RepositoryInterface
- get($columns = ['*'], $take = false, $pagination = false, $where = false);
- all($columns = ['*']);
- take($take, $columns = ['*']);
- paginate($perPage = false, $columns = ['*']);
- withPaginate($relations, $columns = ['*'], $paginate = 15);
- simplePaginate($perPage = false, $columns = ['*']);
- limit($take, $columns = ['*']);
- find($id, $columns = ['*']);
- findMany($ids, $columns = ['*']);
- findOrFail($id, $columns = ['*']);
- first($columns = ['*']);
- firstOrFail($columns = ['*']);
- where($column, $value = null, $columns = ['*']);
- whereOrFail($column, $value = null, $columns = ['*']);
- whereAll($column, $value = null, $columns = ['*']);
- whereWithAll($column, $value = null, $relations, $columns = ['*']);
- whereBetween($column, $value = [], $columns = ['*']);
- with($relations, $columns = ['*']);
- withCount($relations, $columns = ['*']);
- pluck($column, $key = null);
- create(array $attributes);
- forceCreate(array $attributes);
- update(array $attributes, $model, bool $tap = false, bool $forceFill = false);
- updateForce(array $attributes, $model, bool $tap = false);
- delete($model, bool $tap = false, bool $forceDelete = false);
- forceDelete($model, bool $tap = false);
- querySortable(string $orderByColumn, string $orderByDirection)
Helpers
- lLog(string $message, string $log = 'info', array $context = [], string $disk = null)
- is_json(string $str, bool $returnData = false)
- currentUser(): ?Authenticatable
- numberFormatShort($n, int $precision = 2)
EnvironmentTrait
- changeEnvironmentVariable(string $key, $value): void
- environmentVariableAllUpdate(array $data): void
File Facade
- JetBoxFile::save(string $path, object $file, string $fileName = null, array $options = [])
- JetBoxFile::delete(Model $model, string $field, string $path)
- JetBoxFile::numberFormatSizeUnits(int $sizeInBytes)
Constants
- AppConstants::permissions(): array
- AppConstants::roles(): array
- AppConstants::status(): array
Usage
Create a Repository
Recommended This Shorter
Laravel
^5.7
^6.0
^7.0
^8.0
if your model is not linked to the repository auto, you can override the$model
property of your repository
Or
Laravel
^5.2
<=5.6
override the$model
property
Use methods
Find all results in Repository
Find by result by id
All versions of laravel-repository with dependencies
PHP Build Version
Package Version
The package dilneiss/laravel-repository contains the following files
Loading the files please wait ....