Skip to content

Tag: laravel

how to enter data into an array with a loop. laravel

I want to insert data from the database into an array that can be increased in number. So maybe you can use a loop but the data is stacked, not added and returns the last data i am trying to use for with $i++ to generate $variable.$i. that’s what I was expecting but I don’t understand how to run i…

How can I use 3 group by in one query statement sql? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 days ago. Improve this question This is my query.Group by query in one table and I wanna get three sum column in select state…

Laravel – query part of a integer and boolean value

In my database I have id column which can contain integer, string, integer + string value. like, check this image: https://ibb.co/2KNJzVW As you can see on the id column I have something like this value: product id PPAETRABN018283 So, On the input box (my search form) – If I enter product I can get the …

Pass variable to view via controller in Laravel

I need help with passing the variable I have initialized using __construct() to view in Laravel. Here is my controller code I get an error undefined variable profileInfo Answer When using compact() the parameters used must be defined as variables: In this case compact() will create an array like this:

Adding subfolders to zip file in php (laravel)

I have a function which is working fine to create zip file from folder files. But recently I’ve had need to add sub-folders into my main folder and now I see my function does not add those sub-folders and files in them into generated zip file. here is what I have currently: By using code above, let say …