12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace App\Livewire;
- use Livewire\Component;
- use Livewire\Attributes\On;
- use App\Http\Controllers\EmailController;
- class PlayMessage extends Component
- {
- #[On('msg-gen')]
- public function refresh()
- {
- $refresh;
- }
- public function render()
- {
- return view('livewire.play-message');
- }
- public function send(){
- // $file = session()->pull('audio');
- $text = session()->pull('text');
- $name = session()->pull('name');
- $mail = session()->pull('mail');
- $dates = session()->pull('dates');
- $audio = session()->pull('audio');
- $body = "Nom de l'entreprise : " .$name."<br>Mail : " .$mail."<br>Texte du message : " .$text."<br>Dates : ".$dates."<br>Audio : ".asset('storage/'.urlencode($audio));
- EmailController::index("Annonce - ".$name,$body);
- }
- public function cancel(){
- // $file = session()->pull('audio');
- $text = session()->pull('text');
- $name = session()->pull('name');
- $mail = session()->pull('mail');
- $dates = session()->pull('dates');
- $audio = session()->pull('audio');
- $refresh;
- }
- }
|