Skip to content

Latest commit

 

History

History
51 lines (35 loc) · 1.75 KB

getting-started.md

File metadata and controls

51 lines (35 loc) · 1.75 KB

Getting started

Install the toolkit, publish what you need, and reach any module through the unified Toolkit facade. For the full reference see the Documentation index.

1. Install + publish

composer config repositories.laranail-console vcs https://github.com/laranail/console
composer config repositories.laranail-toolkit vcs https://github.com/laranail/toolkit
composer require laranail/toolkit:^0.1
php artisan vendor:publish --tag=laranail::toolkit-config

Both packages install from GitHub until they are on Packagist; see Installation.

ToolkitServiceProvider is auto-discovered; feature modules are deferred (they boot on demand). See Installation for every publish tag.

2. Use a module (three ways)

Every module is reachable by DI (its contract), its own facade, or the unified Toolkit facade:

use Simtabi\Laranail\Toolkit\Facades\Toolkit;

$archive = Toolkit::archiver()->zip();
Toolkit::archiver()->extract($zip, $dest);

3. Generate a CRUD resource

php artisan laranail::toolkit.make-crud Post \
  --fields="title:string:required,body:text:nullable" \
  --searchable=title,body --soft-deletes --register-routes
# alias: php artisan laranail::toolkit.make-crud Post ...

See make-crud and CrudController.

Next steps


← Docs index