Skip to content

Google sheets API range issue

I have a google sheet like this. Those values are just place holders at the moment for my headers When I run my PHP script with $range = ‘Sheet!F2:L2’; to insert records into the google sheet via API/service account and I only want to start inserting at ROW F for all attempts, it inserts fine on t…

Php str_replace one by one in loop

I have a string like A name Tokyo 26, B name Moscov 45, C name Newyork 26, D name Berlin 67, E name Paris 37, F name London 39 I want to replace name words as name1 name2 name3…. so the final string …

how to append `request()->input()` to GET form action

I have a filtration page to get the posts according to user choices, I want to give the user the ability to choose multiple ways to filter, such as the price, post date, category, …etc. therefore I should append the user’s previous choices. for example ex: example.com?category=1 and now the user w…

How to join relationships in Eloquent?

I’m stuck in a problem, I have these 3 models: Order, OrderItem and Product, each Order has many Order Items, and each Order Item has one Prduct but a Product can be ordered several times. Product has a supplier ID column (each supplier has many Products). So here are the relationships: Model: Order: Mo…