first commit
This commit is contained in:
32
migrations/FormsMigration.php
Normal file
32
migrations/FormsMigration.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?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");
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user