PHP code example of alysontrizotto / laravel-ddl-crud

1. Go to this page and download the library: Download alysontrizotto/laravel-ddl-crud 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/ */

    

alysontrizotto / laravel-ddl-crud example snippets


use Illuminate\Support\Facades\Route;

// BEGIN: DDL-CRUD routes [Checklist]
    Route::apiResource('photo-annotations', \App\Http\Controllers\API\Checklist\PhotoAnnotationController::class);
// END: DDL-CRUD routes [Checklist]

// BEGIN: DDL-CRUD routes [Checklist]
    Route::prefix('v1')->group(function () {
        Route::apiResource('photo-annotations', \App\Http\Controllers\API\Checklist\PhotoAnnotationController::class);
    });
// END: DDL-CRUD routes [Checklist]
bash
php artisan vendor:publish --tag=stubs
bash
php artisan make:crud-from-ddl Orders ddl.sql --nested=orders/{order}/items
bash
php artisan ddl-crud:routes:remove Checklist