Skip to content

Commit

Permalink
fix fields method incompatible params issue (#14)
Browse files Browse the repository at this point in the history
* fix fields method incompatible params issue.

* linting

* linting
  • Loading branch information
tooshay authored Aug 12, 2022
1 parent 314eaca commit cc3edc5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/Actions/Ban.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Laravel\Nova\Fields\ActionFields;
use Laravel\Nova\Fields\DateTime;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Http\Requests\NovaRequest;

class Ban extends Action
{
Expand All @@ -31,8 +32,8 @@ class Ban extends Action
/**
* Perform the action on the given models.
*
* @param \Laravel\Nova\Fields\ActionFields $fields
* @param \Illuminate\Support\Collection $models
* @param ActionFields $fields
* @param Collection $models
* @return mixed
*/
public function handle(ActionFields $fields, Collection $models)
Expand All @@ -52,7 +53,7 @@ public function handle(ActionFields $fields, Collection $models)
*
* @return array
*/
public function fields()
public function fields(NovaRequest $request)
{
return [
Text::make('Comment', 'comment'),
Expand Down
7 changes: 4 additions & 3 deletions src/Actions/Unban.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Illuminate\Support\Collection;
use Laravel\Nova\Actions\Action;
use Laravel\Nova\Fields\ActionFields;
use Laravel\Nova\Http\Requests\NovaRequest;

class Unban extends Action
{
Expand All @@ -29,8 +30,8 @@ class Unban extends Action
/**
* Perform the action on the given models.
*
* @param \Laravel\Nova\Fields\ActionFields $fields
* @param \Illuminate\Support\Collection $models
* @param ActionFields $fields
* @param Collection $models
* @return mixed
*/
public function handle(ActionFields $fields, Collection $models)
Expand All @@ -47,7 +48,7 @@ public function handle(ActionFields $fields, Collection $models)
*
* @return array
*/
public function fields()
public function fields(NovaRequest $request)
{
return [];
}
Expand Down

0 comments on commit cc3edc5

Please sign in to comment.