HeartlandTechie
Page rendering issue
Aha - found it . . . using PHP_EOL to split lines now. That solved it.
public static function printer_list()
{
$result = Process::run('lpstat -e');
$printer_queues = $result->output();
return explode(PHP_EOL,$printer_queues);
}
public static function job_queue($printer_queue)
{
$result = Process::run('lpstat '.$printer_queue . ' -W not-completed');
$printer_queues = $result->output();
return explode(PHP_EOL,$printer_queues);
}
7 replies
Attaching additional information to a RelationManager?
Like this?
->headerActions([
Tables\Actions\AttachAction::make()
->preloadRecordSelect()
->recordTitle(fn (Model $record): string => "{$record->student_number} - {$record->first_name} {$record->last_name} {$record->grade_level} {$record->school->name}")
->recordSelect(
fn (Select $select) => $select->placeholder('Student number or name'))
->form(fn (AttachAction $action, $data): array => [
$action->getRecordSelect(),
Select::make('school_year')->options(['2024'=>'2024','2025'=>'2025'])
])
->recordSelectOptionsQuery(fn (Builder $query): Builder => $query->where('grade_level', '>',8)->orderBy('last_name'))
->recordSelectSearchColumns(['student_number','first_name','last_name']),
])
4 replies
ExportColumn date format
Is there a specific date example for this? Also (and related) if the export fails . . . the queue never stops running on export . . . it just gives you error messages and ignores the attempts column . . . anyone else hit this?
5 replies