Skip to content

static::lists() doean't work on laravel 5  #4

@hengzhang-pro

Description

@hengzhang-pro

I got problem on : FormItem::select('country_id', 'Country')->list(App\models\Country::class)->required();
when generate a 'select' element, it will call getList() method in models, and the default method will return static::lists(), but in laravel 5 this method will return a object not array. So the solution is after lists() method just add ->all(). Hope it will find someone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions