PHP Classes
elePHPant
Icontem

File: src/views/generators/migration.blade.php

Recommend this page to a friend!
  Classes of Wedmak  >  Laravel Mail Logger  >  src/views/generators/migration.blade.php  >  Download  
File: src/views/generators/migration.blade.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Laravel Mail Logger
Track messages sent by Laravel mail to act on them
Author: By
Last change:
Date: 9 months ago
Size: 927 bytes
 

Contents

Class file image Download
<?php echo '<?php' ?>

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class MailLogSetupTables extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        // Create table for mail logs
        Schema::create('{{ $logTable }}', function (Blueprint $table) {
            $table->increments('id')->unique()->index();
            $table->string('to', 255)->index();
            $table->text('subject');
            $table->longText('body');
            $table->boolean('read')->default(false);
            $table->integer('attempt');
            $table->dateTime('sended_at');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('{{ $logTable }}');
    }
}