I've preloaded the data from my DB using my templates, but I can't manage to display them in the view
this is my function in my controller
async index({view, response}): Promise<HttpContextContract>{
const data = await Structure.query().preload('liste_carte')
return view.render('pages/list-lot', {data})
}
when I do a console.log('data',data) in the 'list-lot' view I'm told that data is not defined