Skip to content

Laravel select records with pivot table

I have a little problem with eloquent. I have 3 tables. Users, phrases, and phrase_user. phrase user contains columns: id, phrase_id, user_id I need to select phrases with pivot table for example. This action with SQL will be like this… This is my index function in controller I also have written these f…

Why I cannot update the data?

original data echo data upated data does not updated into databse Controller Update I got the id from the form and pass the value to show the data on the next page. It will show certain data based on the user click which row button. Model Update I have passed the id when updating the data, and It will not

Laravel Repeating Task

I need a task: which can be turned on or off (only for admins/authorized users) which runs in a constant loop which should display a timer to every user each loop, 60 seconds for example (with pusher)…

Class ‘AppHttpControllersProducts’ not found in laravel

I am new to Laravel, so I am trying to store some information coming from a form and I am getting this error: Class ‘AppHttpControllersProducts’ not found I have tried adding use products; but it still doesn’t work… Here is my code: Products Controller Products model Any help is greatl…

Php Loop TD if rows didn’t exist or match

i want to loop some DTR values and their absent in PHP As you can see the date should be 1,2,3,4,5 but since the only record they have is 3,4,5 there’s some skipped rows, is it possible to loop empty TD and put missing date if there’s no row exist? like i want to loop 1-31 then match the date

What is the Array format of pg_copy_from()’s input?

I am attempting to load many CSV files of historical data to a PGSQL server with PHP. I noticed PHP provides a pg_copy_from() function for loading local data into a remote server, but the exact format of the input is vague. The documentation says it expects an array of rows, each row being a delimited string …