Download the PHP package timeshow/laravel-repository without Composer
On this page you can find all versions of the php package timeshow/laravel-repository. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download timeshow/laravel-repository
More information about timeshow/laravel-repository
Files in timeshow/laravel-repository
Package laravel-repository
Short Description Repository for Laravel
License MIT
Informations about the package laravel-repository
Laravel Repository
Version Compatibility
Laravel | Package |
---|---|
7.0 | 0.1.0 |
8.0 | 1.0.0 |
9.0 | 2.6.0 |
10.0 | last version |
Install
Via Composer
If you want to use the repository generator through the make:repository
Artisan command, add the RepositoryServiceProvider
to your config/app.php
:
Publish the repostory configuration file.
Config
You must first configure the storage location of the repository files. you use it by extending the location repository files of your choice.
Basic Usage
Simply extend the (abstract) repository class of your choice, either TimeShow\Repository\BaseRepository
, TimeShow\Repository\ExtendedRepository
or TimeShow\Repository\ExtendedPostProcessingRepository
.
The only abstract method that must be provided is the model
method (this is just like the way Bosnadev's repositories are used).
Make Repository
The make:repository
command automatically creates a new Eloquent model repository class.
It will also attempt to link the correct Eloquent model, but make sure to confirm that it is properly set up.
Make Service
The make:service
command automatically creates a new service object class.
Make Transformer
The make:transformer
command automatically creates a new transformer array class.
Q&A
question1: Unable to locate publishable resources.
Getting results from Criteria
Methods
Use Methods: Find all results in Repository.
Search
can you use the search engine to search
Presenter
can you prompt for creating a Transformer too if you haven't already.
Or enable it in your controller with
You can use return ok/error in your services with BaseService instead of Exception
You can use TimeHelper in your code
You can use StringHelper in your code
Thanks
Thanks for the contributors (github.com)
All versions of laravel-repository with dependencies
illuminate/support Version ^9.0 | ^10.0
illuminate/database Version ^9.0 | ^10.0
myclabs/php-enum Version ^1.7