white-frame / http
Prebuilt http components for white frame
Installs: 413
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/white-frame/http
Requires
- illuminate/support: 5.2.*
- laracasts/flash: ~1.3
- white-frame/white-frame: 5.2.*
README
Simple http Controller layout for WhiteFrame\Helloquent
REST models and response helpers for browser and api response.
REST Model Controller
This controller will require a model with valid Presenter
, Renderer
, Transformer
(for API), Repository
, and a valid endpoint.
Simply extends your controller with WhiteFrame\Http\Controller\Resource\Controller
.
use WhiteFrame\Http\Controller\Resource\Controller; class UserController extends Controller { protected $entity = 'Path\To\User'; }
Response Helpers
Add the WhiteFrame\Http\Controller\Helpers
trait into your controller and you will have the following helpers :
$this->response()
: return a multi formatResponse
.