I’m using carousel to display data from database and I tried to set first card active but it won’t work and cards are static. Cards works fine without php. I was trying to use boolean variable and set …
Laravel – query to select with “with” and “where” clause
I have the following: public function filterStudentsByDateOfInterview($interview_date) { //return students with the day of interview: $students = Students::with(‘interviews’) ->…
a PHPpunit test fail randomly
I have a Quiz class. This class load 10 questions from a database depending on the level and the type of the quiz Object: level 0 load the ten first, level 1 load the next ten and so on. So in my test i create in a test database 30 questions. Then i create quiz object with different level and
Undefined variable in Laravel 8 (running php 8)
I try to show variable from the controller to blade in laravel but the result is “Undefined Variable” UserController.php public function user(){ $people = [‘Edwin’,’James’,’Rock’,’Peter’…
How to call PHP function using Ajax (Javascript, PHP and Yii1.1)
I am looking to call a PHP function through an onclick event. The PHP action within the controller then should start a download for a json File containing the needed data. I already know ajax and I am using it currently but somehow the function does not fire. I am 100% certain that I am doing something wrong,…
I am trying to run a query in php its working in phpMyAdmin but not in script [closed]
Iam trying to fetch related articles for a blog based project Query : $query = mysqli_query($con, “SELECT * FROM posts WHERE cat_id like ‘%$cat_arr[i]%’ AND NOT post_id = ‘$postid’”); …
I keep getting a warning when I put an array in a foreach loop
Here is my code. It gives me a warning when I use line 3 of my code. The $object passed in the parameter is a json object and I am trying to for loop through it and display tweets. The code at first doesn’t produce warnings but then out of no where it will and it pops my page with
How to RateLimit forgot-password requests in Laravel Fortify?
I am using Fortify (Laravel 8), and it does provide RateLimiter for login and two-factor, but not for the forgot-password requests. Without a (IP Address) RateLimiter, a very simple bot can execute a …
DataTables can’t read more than one Data
I would like to ask why is the DataTable can’t read more than 1 data in my Database? I would appreciate any help since I’m relatively new with the Data Table, thank you. As you can see it’s only showing 1 to 1 of 1 entries. But as seen in the table I have 5 retrieved data. and when I
Issue when adding product description at WooCommerce checkout
I’m trying to display the product description at WooCommerce checkout. I’m using: It takes the product short description and displays it below the product. It almost works perfectly, but it displays a colon (:) at the end of the description and the colon remains even if there is no short descripti…