Download the PHP package orchestra/resources without Composer
On this page you can find all versions of the php package orchestra/resources. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download orchestra/resources
More information about orchestra/resources
Files in orchestra/resources
Package resources
Short Description [DEPRECATED] Resources Component for Orchestra Platform
License MIT
Homepage http://orchestraplatform.com/docs/latest/components/resources/
Informations about the package resources
Resources Component for Orchestra Platform
Resources Component is an optional adhoc routing manager that allow extension developer to add CRUD interface without touching Orchestra Platform 2. The idea is to allow controllers to be map to specific URL in Orchestra Platform Administrator Interface.
Table of Content
- Version Compatibility
- Installation
- Configuration
- Usage
- Adding a Resource
- Adding a Child Resource
- Returning Response from a Resource
- Change Log
Version Compatibility
Laravel | Resources |
---|---|
4.0.x | 2.0.x |
4.1.x | 2.1.x |
4.2.x | 2.2.x |
5.0.x | 3.0.x |
5.1.x | 3.1.x |
~5.2 | 3.2.x |
Installation
To install through composer, simply put the following in your composer.json
file:
And then run composer install
from the terminal.
Quick Installation
Above installation can also be simplify by using the following command:
composer require "orchestra/resources=~3.0"
Configuration
Add Orchestra\Resources\ResourcesServiceProvider
service provider in config/app.php
.
Aliases
You might want to add Orchestra\Support\Facades\Resources
to class aliases in config/app.php
:
Usage
Adding a Resource
Normally we would identify an extension to a resource for ease of use, however Orchestra Platform still allow a single extension to register multiple resources if such requirement is needed.
Name | Usage |
---|---|
name | A name or title to refer to the resource. |
uses | a path to controller, you can prefix with either restful: (default) or resource: to indicate how Orchestra Platform should handle the controller. |
visible | Choose whether to include the resource to Orchestra Platform Administrator Interface menu. |
Orchestra Platform Administrator Interface now would display a new tab next to Extension, and you can now navigate to available resources.
Adding a Child Resource
A single resource might require multiple actions (or controllers), we allow such feature to be used by assigning child resources.
Nested resource controller is also supported:
Returning Response from a Resource
Controllers mapped as Orchestra Platform Resources is no different from any other controller except the layout is using Orchestra Platform Administrator Interface. You can use View
, Response
and Redirect
normally as you would without Orchestra Platform integration.