Mise en place du système Play

This commit is contained in:
2024-11-27 16:46:45 +01:00
parent cda2104b11
commit 58253385e8
3 changed files with 5 additions and 2 deletions

View File

@@ -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

View File

@@ -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'),

View File

@@ -21,6 +21,7 @@
<thead>
<tr>
<th class="text-center" style="width: 80px;">ID</th>
<th>Play</th>
<th>Nom</th>
<th>Accès</th>
<th>Webmail</th>
@@ -30,6 +31,7 @@
<tbody>
@foreach($accounts as $account)
<tr>
<td class="text-center">@if($account->play) <span class="badge text-bg-success">Oui</span>@endif</td>
<td class="text-center">{{$account->id}}</td>
<td class="text-center">{{$account->name}}</td>
<td class="text-center">