PHP code example of sawmainek / apitoolz
1. Go to this page and download the library: Download sawmainek/apitoolz library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sawmainek / apitoolz example snippets shell
php artisan apitoolz:activate --client-dns=http://127.0.0.1:8000 --purchase-key="demo"
shell
php artisan apitoolz:model Product --table=products --soft-delete
shell
php artisan apitoolz:datatable customers --soft-delete
shell
php artisan apitoolz:datatable customers --remove
shell
php artisan apitoolz:datatable customers --add-field=gender --type=string --field-after=email --not-null --default=other
shell
php artisan apitoolz:request Sale --field=sale_date --validator="
shell
php artisan apitoolz:request {model} {--field=} {--label=} {--input-type=} {--validator=} {--cast=} {--searchable=true/false} {--fillable=true/false} {--position=} {--upload-path=} {--upload-max-size=} {--upload-type=image/file} {--upload-multiple=false/false} {--reset}
shell
php artisan apitoolz:request Sale --field=sale_date --reset
shell
// For belongsTo
php artisan apitoolz:relation Sale --title=customer --relation-model=Customer --relation-type=belongsTo --foreign-key=customer_id
// For hasOne
php artisan apitoolz:relation Customer --title=phone --relation-model=Phone --relation-type=hasOne
shell
php artisan apitoolz:model Customer --rebuild
shell
php artisan apitoolz:export --
shell
php artisan apitoolz:export --model=Customer --