Archived
lol
This commit is contained in:
1 parent
94e719d5f3
commit
6baf2e8210
5 files changed
+70
-1
No files matched your search
@@ -3,6 +3,7 @@
|
||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
||||
<div class="p-6 text-nexi-black dark:text-gray-100">
|
||||
{{ __("You're logged in!") }}
|
||||
<livewire:pages.admin.send/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Livewire\Attributes\Layout;
|
||||
use Livewire\Attributes\Rule;
|
||||
use Livewire\Volt\Component;
|
||||
|
||||
new #[Layout('layouts.app')] class extends Component
|
||||
{
|
||||
#[Rule(['required', 'string'])]
|
||||
public string $quote = '';
|
||||
|
||||
public function sendQuote(): void
|
||||
{
|
||||
$validated = $this->validate();
|
||||
|
||||
$data = ["text" => $validated['quote']];
|
||||
$response = Http::post(env('SLACK_WEBHOOK_URL'), $data);
|
||||
|
||||
$this->quote = '';
|
||||
}
|
||||
}; ?>
|
||||
|
||||
|
||||
<div class="px-4 sm:px-6 lg:px-8">
|
||||
<form wire:submit="sendQuote">
|
||||
<x-text-input
|
||||
wire:model="quote"
|
||||
placeholder="{{ __('What did he say this time?') }}"
|
||||
class="block w-full border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md shadow-sm"
|
||||
></x-text-input>
|
||||
|
||||
<x-input-error :messages="$errors->get('quote')" class="mt-2"/>
|
||||
<x-primary-button wire:loading.attr="disabled" wire:loading.class="opacity-50" class="mt-4">{{ __('Request') }}</x-primary-button>
|
||||
</form>
|
||||
</div>
|
||||
Reference in new issue
Block a user