1. Go to this page and download the library: Download renoki-co/laravel-thermite 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/ */
use RenokiCo\LaravelThermite\Database\Blueprint;
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
});
class User extends Model
{
// Make sure to set key type as string.
protected $keyType = 'string';
}
use RenokiCo\LaravelThermite\Database\Blueprint;
Schema::create('users', function (Blueprint $table) {
$table->uniqueRowId();
$table->string('name');
});
class User extends Model
{
// Do not set the $keyType to string, as it is an integer.
}
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
});
Schema::create('books', function (Blueprint $table) {
$table->id();
$table->uuid('user_id')->index();
$table->string('name');
});
$book = $user->books()->create(['name' => 'The Great Gatsby']);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.