I have 10 tabs on my project, each of them will fetch some values from API using PHP. It takes 10-15 seconds to load the page every time (since it updates the values for all 10 Tabs) How do i load content only after switching a tab? Load TAB1 at start, then only after clicking TAB2 or TAB3 then load
Tag: php
Decimal are converted to String in Laravel, cast is not working
I have a problem changing data type column in my table, from double to decimal each (6,2). Olso trying to $cast the variable to float, I’ve tried to cast olso as decimal, but nothing change, nothing change: if I dd $this in my resource I got this: The data back to be a number only if I rollback the data
Call an existing php variable by concatenating two strings
I have these seven php variables: I would like to loop through the results array and pass the corresponding variables to a function. I cannot figure out how to declare the variables. Or if this is even possible. I have more than just $data and $target variables, but I simplified down to two for the question. …
Laravel route setting incorret and search function issues
This function search user from MySQL. Can anyone knows which part I did wrong ?, searchUser function is not triggered. admin view Answer You can remove type=”button” from below line or change type=”submit” If still that not works for you then you should defile action=”{{ route(&#…
How to upload file into folder after saving form
I am trying to upload files through this form but it’s only saving the name of the file into the database. I want that when the form submit then the file is uploaded to the destinated folder and the form submitted successfully, below I have provided both view and controller code Form view code: Form con…
check if select count value is null/empty query builder symfony
My query builder looks like this is there any way to check that t_total and z_total is null? I don’t want show this row only if t_total AND z_total is null/empty Answer as @mickmackusa say works the way i wanted
How to add a confirm dialog box using SweetAlert2 in CodeIgniter 3?
I’m learning CodeIgniter 3 and I want to add a confirm dialog before deleting a row in the database table. I’ve made the delete function but couldn’t figure out how to add a confirm dialog box using SweetAlert2. code in view code in controller code in model Answer Here is a simple integratio…
Form an array list in the another format using PHP
I have an associate array format like $aa. Need to form an array list in the different format. Have to form the array like the below format in PHP. Help me on this. Thanks in advance Answer array_map() takes an arbitrary number of arrays as arguments(it can do more than the “standard case” with on…
Guzzle Symfony scrape iframes inside multiple Servers
I am building a scraper to scrape content using guzzle and symfony dom crawler But I run into an issue. The page I am scraping has multiple Iframe servers They default iframe is shown when the scraper loads the page but in order to get the other servers it needs to click there buttons and so it reflects the s…
Change value of returned PDOStatement [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 11 months ago. Improve this question I have a function getMaxID, which queries a database (messages) and gets the maximum id I …