Skip to content

Tag: laravel

Undefined Index Array

I just learning laravel and got this error calling array on route class using foreach but i got error (undefined index) Answer You’re using the wrong variable within the foreach scope. use $post[“title”] instead of $posts[“title”]

routes/web route me to another route

My web doesn’t seem to be directing to the correct page. Here is my blade Here is my routes/web and here is my controller For some reason, when I click the a tag with the href {{ route(‘add-new-information’) }} to go to the add page ‘adminviews/addinfo’, instead the page will go …

mPDF how to leave all content on a single page

I want to export an HTML to pdf using mPDF, but I want everything to be on a single page, without any page breaks. How can I do that? Answer “mPDF has limited scope to control when automatic page-breaks occur, and does not have ‘widows’ or ‘orphans’ protection.” https://mpdf.github.io/paging/page-…

PHP How to orderby two columns when the data is equal

This return come from this query. Let`s understand my doubt, i have this data. When i have the equal points data 0 is 120 and data 1 is 120. I need to display the first data with less totalTime in this case needs to be like this : Can i manage this only with SQL or i need to order

Is the other way to use Vue component in Laravel?

I have a Laravel project and I would like to integrate Vue. I’m not getting any error bu the Vue components just not loading up. I guess I’m making somekind of logical mistake if I’m not getting an error. index.blade.php: App.js: routes.js: audit/index.vue: Answer Have you added configuratio…

Hide block in if condition

I’m a beginner I want to make a condition under which we either hide the block or leave it, I did it and everything works But I am planning to add a few more blocks and everything will look like this, there will be a lot of code copying Can I do it somehow shorter so as not to copy