Tue Jul 2
This wasn't quite as easy to grok without attaching a debugger but this makes complete sense now.
/**
* Perform the action on the given models.
*
* @param \Laravel\Nova\Fields\ActionFields $fields
* @param \Illuminate\Support\Collection $models
* @return mixed
*/
public function handle(ActionFields $fields, Collection $models)
{
$count = 1;
foreach ($models as $model) {
$count = $this->generateCodes($model->id, $model->code_type_id, $fields->number);
}
return Action::message("$count codes were successfully created.");
}
Sat Jun 29
.gitignore
for VSCode integration and to remove /config/*.secret.exs
. It's unclear if this was present in the earlier version of Phoenix and I weirdly need to add it. It's also possible that I just followed along with the up and running guide.