Exposing useActions composable to custom components #5906
-
|
It would be very useful to have the useActions composable exposed on 'laravel-nova' so that it can be used on custom nova-components. As an example, i'd like to have a custom detail field with a small inline form that ends up triggering a nova Action. To do this i need to replicate much of the logic of the useActions file, as I cannot do |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
There is an alternative way, you can first alias the nova resource js directory on your nova.mix.js like this: webpackConfig.resolve.alias = {
//...
'@': path.resolve(__dirname, '../../vendor/laravel/nova/resources/js/'),
}then on your vue components you can import it like this: import { useActions } from '@/composables/useActions' |
Beta Was this translation helpful? Give feedback.
There is an alternative way, you can first alias the nova resource js directory on your nova.mix.js like this:
then on your vue components you can import it like this: