All we need is an easy explanation of the problem, so here it is.
Is it possible to move the card below the block with detail?
How to solve :
I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.
This is all in the
Card.vue that the
artisan nova:card yourname/customcard command creates.
Give the card an
id so we can find it later:
<card class="flex flex-col justify-center" id="custom-card">
Then find it again:
let customCard = document.querySelector('#custom-card');
The listing of the details of that resource has a div with a custom
dusk element and the value is set to
resourcename is e.g.
user. You need to find that element and then append the card snippet to it:
let anotherComponent = document.querySelector('div[dusk=resourcename-detail-component]'); anotherComponent.appendChild(customCard);
I’ve written this up here: Laravel Nova: Move cards in Resource Detail View
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂