Last active
March 26, 2019 12:19
-
-
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"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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