PHP code example of daycode / sketch
1. Go to this page and download the library: Download daycode/sketch 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/ */
daycode / sketch example snippets
return [
'schemas' => [
'path' => base_path('schemas'),
],
'paths' => [
'models' => app_path('Models'),
'migrations' => database_path('migrations'),
'actions' => app_path('Actions'),
'requests' => app_path('Http/Requests'),
],
'stubs' => [
'model' => __DIR__.'/../stubs/model.stub',
'migration' => __DIR__.'/../stubs/migration.stub',
'action' => __DIR__.'/../stubs/action.stub',
'request' => __DIR__.'/../stubs/request.stub',
],
'model_namespace' => 'App\\Models',
];
bash
php artisan vendor:publish --provider="Daycode\Sketch\SketchServiceProvider"
bash
php artisan sketch:make-blueprint models/blog/post
bash
php artisan sketch:generate --file=schemas/models/blog/post.yaml
bash
# Simple blueprint
php artisan sketch:make-blueprint post
# Nested directory blueprint
php artisan sketch:make-blueprint models/blog/post
# With soft delete
php artisan sketch:make-blueprint models/blog/post --soft-delete