Skip to content

How to correctly handle laravel form?

I want to correctly handle user store form. I consider which patter will be the most correct/popular. It is repository pattern? Service pattern? Another difficulty: User form: name, email, postal code, city, street. I want to create two models in one form: User and Address. How can I solve it? I throught abou…

How to sum an associative array in laravel by there keys?

I have an array which will have an SKU number, it can be repeated so want to sum of that SKU qty at once and insert in DB table. How can i sum the same sku as index 1 and 3 have and remove the 1st index? Answer Using the solution on this Answer here is how to do it:

pull data from page without database

I am making a php site without using a database. I add the header and footer to the page with the include function. How can I dynamically create meta tags by pulling information from inside the page. Answer The point is: first, define your php variables; then use them when needed. for example in the “in…

JpGraph php graph library – trouble embedding graph

I have managed to create a graph using JpGraph, I want to now take it a step further and embed this graph in my template/view php file. So I put the graph code into a seperate php file to then embed however, when I try to embed it via <embed src=”templates/ctl008/graphshow.php” height=80em; wid…