Download the PHP package ahmedalmory/joda-resources without Composer
On this page you can find all versions of the php package ahmedalmory/joda-resources. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ahmedalmory/joda-resources
More information about ahmedalmory/joda-resources
Files in ahmedalmory/joda-resources
Package joda-resources
Short Description a trait that generates resources methods for controller
License MIT
Homepage https://github.com/ahmedalmory/joda-resources
Informations about the package joda-resources
Very short description of the package
a trait that generates resources methods for controller.
Installation
You can install the package via composer:
Usage
JodaResource
web.php
UserController.php
JodaApiResource
JodaApiResource has the same options that JodaResource has above
api.php
ExampleController.php
index => get => example.com/api/examples?filed=queryStringExample
store => post => example.com/api/examples
show => get => example.com/api/examples/1
update => put => example.com/api/examples/1
destroy => delete => example.com/api/examples/1
For customisation
There are methods for customisation like beforeStore() that be fired right before storing data to data base, afterStore() that be fired right after storing data, for instance you could change flash message or redirect to some other page, and the same for update and destroy, beforeUpdate(), afterUpdate(), beforeDestroy(), afterDestroy(),
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Ahmed Joda
- Ahmed Tofaha
- All Contributors
License
The MIT License (MIT). Please see License File for more information.