32 lines
681 B
PHP
32 lines
681 B
PHP
<?php
|
|
|
|
namespace itguild\forms\form\migrations;
|
|
use Illuminate;
|
|
use itguild\forms\migrations\DB;
|
|
|
|
class FormsMigration
|
|
{
|
|
|
|
public static function up(): void
|
|
{
|
|
|
|
Illuminate\Database\Capsule\Manager::schema()->create("form", function ($table) {
|
|
$table->id('id');
|
|
$table->string('title');
|
|
$table->integer('status');
|
|
$table->text('params')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
|
|
}
|
|
public static function get()
|
|
{
|
|
return DB::forms('form_input')-> get();
|
|
}
|
|
|
|
public static function down(): void
|
|
{
|
|
Illuminate\Database\Capsule\Manager::schema()->drop("form");
|
|
}
|
|
|
|
} |