'required|string|max:255', ]; public function mount(): void { $this->refreshInstances(); } public function refreshInstances(): void { $this->instances = auth()->user() ->plugins() ->where('plugin_type', 'image_webhook') ->orderBy('created_at', 'desc') ->get() ->toArray(); } public function createInstance(): void { abort_unless(auth()->user() !== null, 403); $this->validate(); Plugin::create([ 'uuid' => Str::uuid(), 'user_id' => auth()->id(), 'name' => $this->name, 'plugin_type' => 'image_webhook', 'data_strategy' => 'static', // Not used for image_webhook, but required 'data_stale_minutes' => 60, // Not used for image_webhook, but required ]); $this->reset(['name']); $this->refreshInstances(); Flux::modal('create-instance')->close(); } public function deleteInstance(int $pluginId): void { abort_unless(auth()->user() !== null, 403); $plugin = Plugin::where('id', $pluginId) ->where('user_id', auth()->id()) ->where('plugin_type', 'image_webhook') ->firstOrFail(); $plugin->delete(); $this->refreshInstances(); } }; ?>
|
Name
|
Actions
|
|---|---|
| {{ $instance['name'] }} |
|
This will also remove this instance from your playlists.