Created
January 19, 2020 16:42
-
-
Save alouini333/98d389043efc9444e1778348092d01a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\Schema; | |
class CreateNotificationsTable extends Migration | |
{ | |
public function up() | |
{ | |
Schema::create('notifications', function (Blueprint $table) { | |
$table->uuid('id')->primary(); | |
$table->string('type'); | |
$table->morphs('notifiable'); | |
$table->text('data'); | |
$table->timestamp('read_at')->nullable(); | |
$table->timestamps(); | |
}); | |
} | |
public function down() | |
{ | |
Schema::dropIfExists('notifications'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment