Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save toonvandenbos/c85dfde489afae9b39997f6bc41a111c to your computer and use it in GitHub Desktop.
Save toonvandenbos/c85dfde489afae9b39997f6bc41a111c to your computer and use it in GitHub Desktop.
Examples used in Medium Post "Making Laravel Nova custom fields more developer-friendly"
<?php
protected function fillAttributeFromRequest(NovaRequest $request, $requestAttribute, $model, $attribute)
{
if ($request->exists($requestAttribute)) {
$model->{$attribute} = $request[$requestAttribute];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment