PHP code example of jdion84 / lucid

1. Go to this page and download the library: Download jdion84/lucid 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/ */

    

jdion84 / lucid example snippets


namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Jdion84\Lucid\Table;

class Post extends Model
{
    use HasFactory;

    public function schema(Table $table)
    {
        $table->id();
        $table->string('title')->index();
        $table->text('body');
        $table->timestamp('created_at');
        $table->timestamp('updated_at');
    }
}
console
php artisan make:schema Post
console
php artisan migrate:schemas