PHP code example of cedric-lekene / laravel-migration-ai

1. Go to this page and download the library: Download cedric-lekene/laravel-migration-ai 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/ */

    

cedric-lekene / laravel-migration-ai example snippets


   'providers' => [
       // Other Service Providers

       CedricLekene\\LaravelMigrationAI\\LaravelMigrationAIServiceProvider::class,
   ],
   

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('users', function (Blueprint $table) {
            $table->integer('age')->nullable()->default(0);
            $table->string('sexe')->nullable();
            $table->string('phone')->nullable();
			
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn('age');
            $table->dropColumn('sexe');
            $table->dropColumn('phone');
			
        });
    }
}