$na = DB::select('select n.*,u.name from nalog2019s n,users u where n.user_id=u.id order by n.id desc');
$voo = DB::select('select * from vrsta_otvora2019s');
Well, the queries look pretty solid to me and they should be really fast. You can, for example, install the laravel-debugbar and see the performance per query. I assure you that the query is fast.
It will be slow if you have a lot of results and start looping over them. How many results do you get back?
it seems to be theres a relationship between voo/na.. so you can utilise laravels relationship to only SELECT rows which are matching - you are getting all the voo and na and then in php disregarding the ones that dont have a matching comparison.
the other thing is ofcourse pagination - you should only get 15 or so results at a time..
third solution would be caching.
you can do all three in combination with each other