Skip to content

Commit

Permalink
Merge pull request #152 from dododedodonl/master
Browse files Browse the repository at this point in the history
Make method signature compatible again
  • Loading branch information
ragingdave authored Feb 17, 2021
2 parents 9e6d9d9 + a6613ac commit 1b15830
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/HasDependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
use Laravel\Nova\Fields\FieldCollection;
use Laravel\Nova\Http\Requests\NovaRequest;
use Laravel\Nova\Fields\MorphTo;
use Laravel\Nova\Http\Requests\ActionRequest;

trait HasDependencies
{
protected $childFieldsArr = [];

/**
* @param NovaRequest $request
* @return FieldCollection|\Illuminate\Support\Collection
Expand Down Expand Up @@ -139,9 +140,10 @@ protected function applyRulesForChildFields($childField)
/**
* Validate action fields
* Overridden using ActionController & ActionRequest by modifying routes
* @param \Laravel\Nova\Http\Requests\ActionRequest $request
* @return void
*/
public function validateFields() {
public function validateFields(ActionRequest $request = null) {
$availableFields = [];
if ( !empty( ($action_fields = $this->action()->fields()) ) ) {
foreach ($action_fields as $field) {
Expand Down

0 comments on commit 1b15830

Please sign in to comment.