Laravel throws FatalError when trying to use the field in a screen
Closed this issue · 2 comments
nabileisa commented
Expected Behavior
Screen renders Repeater field
Actual Behavior
It throws out an error
Symfony\Component\ErrorHandler\Error\FatalError
Declaration of Nakukryskin\OrchidRepeaterField\Fields\Repeater::make(string $name): Nakukryskin\OrchidRepeaterField\Fields\Repeater must be compatible with Orchid\Screen\Field::make(?string $name = NULL): Orchid\Screen\Field
Steps to Reproduce the Problem
- Install the field with
composer require nakukryskin/orchid-repeater-field
in a fresh laravel install with orchid - Follow the steps in the read me by creating the
RepeaterFields
class and importing to my screen and using this to render it
use Nakukryskin\OrchidRepeaterField\Fields\Repeater;
Repeater::make('repeater')
->title('Repeater')
->layout(RepeaterFields::class)
->button_label('Add new repeater field')
- the application throws the following error
Symfony\Component\ErrorHandler\Error\FatalError
Declaration of Nakukryskin\OrchidRepeaterField\Fields\Repeater::make(string $name): Nakukryskin\OrchidRepeaterField\Fields\Repeater must be compatible with Orchid\Screen\Field::make(?string $name = NULL): Orchid\Screen\Field`
Screenshots (if applicable)
Specifications
- ORCHID Platform Version:9.4.0
- Laravel Version:8.9.0
- PHP Version: 7.3.21
- Database Version:
Other Notes
I have a problem running the field , it keep throwing that error , am i doing something wrong or is this a bug?
can you please help me getting it to work?
Nks commented
Should be fixed in 4.0.0.
Please check it out.
KrenZfer commented
Hi, i have the same problem
with actual example from github
Specifications
- ORCHID Platform Version: 10.1
- Laravel Version: 8.9.0
- PHP Version: 7.3.21
- Orchid Repeater Field: 4.0.0