From 58253385e841a38a9bf97f152fb32a864c35c5ff Mon Sep 17 00:00:00 2001 From: hugol Date: Wed, 27 Nov 2024 16:46:45 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20en=20place=20du=20syst=C3=A8me=20Play?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Livewire/Contests.php | 4 ++-- app/Nova/Account.php | 1 + resources/views/accounts/index.blade.php | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Contests.php b/app/Livewire/Contests.php index 8231165..4d5077d 100644 --- a/app/Livewire/Contests.php +++ b/app/Livewire/Contests.php @@ -32,7 +32,7 @@ class Contests extends Component flash()->success('Concours '.$contest->name.' en cours de participation'); // Récupération des comptes activés - $accounts = Account::where('enable', true)->get(); + $accounts = Account::where('play', true)->get(); foreach ($accounts as $account) { ProcessTweet::dispatch($contest->id, $account->id); // Envoi du tweet pour participer @@ -76,4 +76,4 @@ class Contests extends Component 'contests' => $contests ]); } -} \ No newline at end of file +} diff --git a/app/Nova/Account.php b/app/Nova/Account.php index 4dbae8e..f884057 100644 --- a/app/Nova/Account.php +++ b/app/Nova/Account.php @@ -51,6 +51,7 @@ class Account extends Resource return [ ID::make()->sortable(), Boolean::make('Enable'), + Boolean::make('Play'), Text::make('Name'), Text::make('Password'), Text::make('Rambler Email'), diff --git a/resources/views/accounts/index.blade.php b/resources/views/accounts/index.blade.php index 7a89d97..7e946b3 100644 --- a/resources/views/accounts/index.blade.php +++ b/resources/views/accounts/index.blade.php @@ -21,6 +21,7 @@ ID + Play Nom Accès Webmail @@ -30,6 +31,7 @@ @foreach($accounts as $account) + @if($account->play) Oui@endif {{$account->id}} {{$account->name}}