Helper provider to assist in general crud functions of a restful controller
Include into your config/app.php
, Sapioweb\CrudHelper\CrudHelperServiceProvider::class,
, (*2)
Use the helper in any controller you plan to use it in, use Sapioweb\CrudHelper\CrudyController as CrudHelper;
, (*3)
use Sapioweb\CrudHelper\CrudyController as CrudHelper;
, (*4)
dd(CrudHelper::index());
, (*5)
Grab all data for a given resource, (*6)
CrudHelper::index($model, $relations = null)
, (*7)
Stores you data for a resource, (*8)
CrudHelper::store($model, $createData)
, (*9)
Show a single resource, (*10)
CrudHelper::show($model, $field = 'id', $id, $relations = null)
, (*11)
Preform a where query on relationships, (*12)
CrudHelper::relationshipQuery($model, $relationships, $relationField = null, $relationshipQuery = null)
, (*13)
Create or update a resource, (*14)
CrudHelper::createOrUpdate($model, $field, $id, $inputData)
, (*15)
Destroy a resource, (*16)
CrudHelper::destroy($model, $field = 'id', $id)
, (*17)
Turn a regular string into a slug string, (*18)
CrudHelper::slugify($text)
, (*19)
This software is open-sourced software licensed under the MIT license. For questions please email andreas@sapioweb.com or info@sapioweb.com or visit Sapioweb.com to learn more and get in contact, (*20)