- Composer update
- Composer dump-autoload
- Config database.php
- Run php artisan migrate
- Run php artisan db:seed
- Running php artisan serv
- Open localhost:8000
- It is an example; usage of command in controller (see App/Http/Controllers/Organisation/OrganisationController.php)
- Formatting of using command, see below :
$this->dispatch(new Getting(new (Modelname), (array of search), (array of sort) , (current page), (take how much perpage)))
NOTES : how much per page has rule : 1 as first, 2 - 99 as get, 100 as all, if you leave it blank, it will initiate as 12
$this->dispatch(new Saving(new {{Modelname}}, {{attributes in array}}, {{id of model, leave it null for new records}}, new {{RelationshipModel, do not initiate this if there is no relationship, only works for belongsto reltionship}}, {{Relationship model array, depend if you had relationship model or not}}, {{array of pivot data if only the relationship is belongstomany (using sync)}}))
$this->dispatch(new Deleting(new {{Modelname}}, {{itemid}}))