<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bastinald / laravel-automatic-migrations example snippets
namespace App\Models;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Eloquent\Model;
class MyModel extends Model
{
public function migration(Blueprint $table)
{
$table->id();
$table->string('name');
$table->timestamp('created_at')->nullable();
$table->timestamp('updated_at')->nullable();
}
}
class MyModel extends Model
{
public $migrationOrder = 1;
public function migration(Blueprint $table)
{
$table->id();
$table->string('name');
$table->timestamp('created_at')->nullable();
$table->timestamp('updated_at')->nullable();
}
}