koss-shtukert / laravel-nova-select2-auto-complete

Laravel Nova Select2 Auto-Complete
https://novapackages.com/packages/koss-shtukert/laravel-nova-select2-auto-complete
MIT License
38 stars 11 forks source link

Wrong Url in the showAsLink () method. #6

Closed DmitrySur closed 5 years ago

DmitrySur commented 5 years ago

Hi. Faced a problem when getting the URL of the resource. Nova generates references to resources in the style of the kebab-case in the plural. For myself, I took the following action in Select2.php: if ($resource) { $resource = new ReflectionClass($resource); $resource = (string)Str::kebab($resource->getShortName()) . 's'; } And on the detailed page the link refers to the page resource, and not to the one specified in the settings. I think, that problem in vue file DetailField.

koss-shtukert commented 5 years ago

Fixed on (Release v1.6)