LaravelRUS / SleepingOwlAdmin

🦉 Administrative interface builder for Laravel (Laravel admin)
http://sleepingowladmin.ru/
MIT License
805 stars 217 forks source link

Getting errors with select & radio fields #636

Closed tekhoi closed 7 years ago

tekhoi commented 7 years ago

Trying to use either select or radio but get error with both.

AdminFormElement::radio('media_type_id', 'Type')->setOptions(['0' => 'Test 1', '1' => 'Test 2']),

With this I get error Method Illuminate\View\View::__toString() must not throw an exception, caught ErrorException: htmlspecialchars() expects parameter 1 to be string, array given (View: \vendor\laravelrus\sleepingowl\resources\views\default\form\element\radio.blade.php)

I have also tried select as an alternative AdminFormElement::select('media_type_id', 'Type')->setOptions(['0' => 'Test 1', '1' => 'Test 2']),

With this the select is not rendered - I also notice in the browser console there are 404 errors for multiselect.css, maybe thats related? (can't find any files with this name)

ghost commented 7 years ago

"post-update-cmd": [ "Illuminate\Foundation\ComposerScripts::postUpdate", "php artisan ide-helper:generate", "php artisan ide-helper:meta", "php artisan optimize", "php artisan vendor:publish --tag=assets --force" ]

@tekhoi look at that command - that need to execute after every update of sleeping_owl

tekhoi commented 7 years ago

Thanks.

Don't get 404 any more but other issues still same :(

ghost commented 7 years ago

Can find me in telegram (@aioslike)?

ghost commented 7 years ago

Try to update and command php artisan vendor:publish --tag=assets --force and when you are on admin page try to CTRL+F5 or same keyboard combination for your OS and clean browser cache

ghost commented 7 years ago

I have added your same select on my own admin - and it works image

P.S. After fix radio

image