Files
HeimerdingerLoL/database/migrations/2024_03_20_233357_create_streamers_table.php
Rico van Zelst effd0203a3 feat: Add Streamer and StreamerPanel controllers, Streamer model
- Added StreamerController with index and show methods
- Added StreamerPanelController with index, create, store, edit, update, and destroy methods
- Created Streamer model with fillable attributes and platform-specific URL generation logic
- Implemented migration for creating the streamers table
2024-03-21 00:47:41 +01:00

32 lines
765 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('streamers', function (Blueprint $table) {
$table->id();
$table->foreignId('champion_id')->constrained();
$table->enum('platform', ['twitch', 'youtube', 'kick', 'douyu', 'huya']);
$table->string('username');
$table->string('displayname');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('streamers');
}
};