Delete old webhook action, not used anymore
This commit is contained in:
@@ -28,13 +28,6 @@ class TwitchWebhook extends Model
|
|||||||
return $this->belongsTo("App\User");
|
return $this->belongsTo("App\User");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get webhook action
|
|
||||||
*/
|
|
||||||
public function webhookActions() {
|
|
||||||
return $this->hasMany("App\WebhookAction", "webhook_id");
|
|
||||||
}
|
|
||||||
|
|
||||||
// event handlers
|
// event handlers
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,25 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
class WebhookAction extends Model
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The attributes that are mass assignable.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $fillable = [
|
|
||||||
"discord_hook_url"
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the twitch webhook that executes this action.
|
|
||||||
*/
|
|
||||||
public function twitchWebhook() {
|
|
||||||
return $this->belongsTo("App\TwitchWebhook", "webhook_id");
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class CreateWebhookActionsTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('webhook_actions', function (Blueprint $table) {
|
|
||||||
$table->id();
|
|
||||||
$table->foreignId("webhook_id")->references("id")->on("twitch_webhooks")->onUpdate("cascade")->onDelete("cascade");
|
|
||||||
$table->string("discord_hook_url");
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('webhook_actions');
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user