FEATURE #1552 @1h: save sent messages into database

This commit is contained in:
Michal Kváček
2017-09-14 20:18:32 +02:00
parent 6b0509a1db
commit b1b31afa3b
15 changed files with 266 additions and 36 deletions
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSentEmailsTable extends Migration
{
/**
* Run migration
*/
public function up()
{
Schema::create('sent_emails', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('subject');
$table->string('from');
$table->string('to');
$table->text('message');
$table->boolean('is_new')->default(true)->commect('Was this message read (in admin)?');
});
}
/**
* Rollback migration
*/
public function down()
{
Schema::dropIfExists('sent_emails');
}
}