Download the PHP package achrafbardan/simple-resources without Composer
On this page you can find all versions of the php package achrafbardan/simple-resources. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download achrafbardan/simple-resources
More information about achrafbardan/simple-resources
Files in achrafbardan/simple-resources
Package simple-resources
Short Description This is my package simple-resources-for-laravel
License MIT
Homepage https://github.com/AchrafBardan/simple-resources-for-laravel
Informations about the package simple-resources
Simple resources for Laravel
This is a small package that simplifies resource usage. It is used to auto guess and link resources to models. Paginated collections are also auto wrappable in the resource.
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Optionally, you can publish the views using
Usage
Before returning a model or collection you pass it trough the ResourceFactory. The resource factory finds the resource for your model, collection or even a paginated collection.
You can also use the helper function resource
which is the same as ResourceFactory::make
It also intended to be used inside a resource for child models and collections, see the following example.
Testing
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of simple-resources with dependencies
spatie/laravel-package-tools Version ^1.16.4
illuminate/contracts Version ^9.0|^10.0|^11.0