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
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2HXNbE1
via IFTTT
Aucun commentaire:
Enregistrer un commentaire