forms/migrations/FormsMigration.php

32 lines
681 B
PHP
Raw Normal View History

2024-05-28 17:10:06 +03:00
<?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");
}
}