checkbox multiple view
hello i am new user i try do develope my api
i use the steps and in the second steps want to do multiple checkbox selection from another table i want to now if there some sentext can help me do this i try with placeholder i have some sreens to better undestand my request
i want to display many column of other table to select and choose
Step::make('Disponibilites')
->schema([
Placeholder::make('')
->content(function () {
$disponibiliteRecords = Disponibilites::all();
echo '<table>';
echo '<tr>';
$count = 0;
foreach ($disponibiliteRecords as $disponibilite) {
echo '<td>';
echo '<p style="margin-right:130px;"></p>';
echo '<p style="margin-bottom:20px;"></p>';
echo '<p>'. $disponibilite->code .'</p>';
echo '<p><img src="' . asset('storage/uploads/'.$disponibilite->image) . '" alt="Image"></img></p>';
echo '<p>' . $disponibilite->commune_name . '</p>';
echo '<p>' . $disponibilite->adresse . '</p>';
echo '<input type="checkbox" data-id="' . $disponibilite->id . '">';
echo '</td>';
$count++;
if ($count % 3 === 0) {
echo '</tr><tr>'; // Nouvelle ligne après chaque 2e élément
}
}
// Fermer la dernière ligne si nécessaire
if ($count % 3 !== 0) {
echo '</tr>';
}
echo '</table>';
}),
Actions::make([
Action::make('Ajouter')
->icon('heroicon-m-x-mark')
->action(function (Set $set, $state) {
dd($state);
}),
]),
]);
1 Reply
no one have idea please