2

I'm using laravel nova for creating an admin panel. This is my code.

Laravel nova resource,

use Nova\Multiselect\Multiselect;

public function fields(Request $request)
    {
        return [
            ID::make()->sortable(),            
            Multiselect::make(__('Day'),'day')
                ->options($this->getweedkDay()),
        ];
    }

private function getweedkDay(){
        $weekDay = [];

        $weekDay[1] = __('Sunday');
        $weekDay[2] = __('Monday');
        $weekDay[3] = __('Tuesday');
        $weekDay[4] = __('Wednesday');
        $weekDay[5] = __('Thursday');
        $weekDay[6] = __('Friday');
        $weekDay[7] = __('Saturday');


        return $weekDay;
    }

I'm using this plugin for multi select and date field is a varchar field in database. The issue is even I can select items and save them in db they will not be able to see in edit view or index view for nova resource. it would be great if someone can help

1 Answer 1

3

Use this package instead it's more mature and maintained as well:

https://github.com/optimistdigital/nova-multiselect-field

Sign up to request clarification or add additional context in comments.

2 Comments

thnks for help bro
@vlmuth Please mark my answer as the correct answer if you feel it was.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.