First Commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateContactsTable
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
if (!Capsule::schema()->hasTable('contacts')) {
|
||||
Capsule::schema()->create('contacts', function (Blueprint $table) {
|
||||
$table->increments('contacts_id');
|
||||
$table->string('contacts_name');
|
||||
$table->string('contacts_email');
|
||||
$table->string('contacts_phone')->nullable();
|
||||
$table->string('contacts_subject')->nullable();
|
||||
$table->text('contacts_message');
|
||||
$table->text('contacts_response')->nullable();
|
||||
$table->string('contacts_status')->default('new'); // new, read, replied
|
||||
$table->string('contacts_ip_address')->nullable();
|
||||
$table->string('contacts_user_agent')->nullable();
|
||||
$table->timestamp('contacts_read_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Capsule::schema()->dropIfExists('contacts');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user