I’m working on a local laravel-nova project which worked fine the last couple of days. Now all of a sudden, when I try to go to the /nova route I get a 404 error saying Page could not be found. I tried with but with no luck. I even deleted the vendor-folder and ran composer install and php artisan nova:…
Tag: php
Hide COD payment based on chosen select field options in WooCommerce checkout
I am using WooCommerce and I have a custom checkout field in form of a selection list. I am trying to remove COD gateway, when customer select on a custom checkout field a specific option (“newyork” …
How to disable “always include” class in Composer autoload_static.php
Composer in autoload_static.php use class that I don’t need them in every app request. ‘d5fa61a7f6cbc1df09dd4df84549a2dc’ => __DIR__ . ‘/..’ . ‘/rospdf/pdf-php/src/Cpdf.php’, ‘…
Change admin dashboard WooCommerce widget title
I want to change the WooCommerce dashboard widget title from ‘WooCommerce Status’ to something else. I understand that I need to use a hook in my functions.php but I’m struggling to make this work. I’ve found the function and the file in WooCommerce that is generating the dashboard wid…
Change default WooCommerce order status to processing for cheque and bacs payments
In WooCommerce, I need all my orders to go immediately to “processing” status to have the order-processing email sent directly when the order is processed. By default, this behavior exist for Paypal and COD orders, but not for BACS and Cheque where the default status is on-hold. I tried several sn…
How to use required_if on file array fields with an array for first argument?
I have an with an array of image_file (image_file[1], image_file[2]). They are input of type file. This images are required only if another array of fields (proposition_type) is defined on 2. For example : if proposition_type[1] == 2, image_file[1] has to be filled ; if proposition_type[2] == 1, image_file[2]…
Clear cache in Lumen Framework
I want to clear cache in lumen framework. I thought the command line is the same with Laravel command. I tried to run this: but it giving error php artisan Could not open input file: artisan. Need help! Answer Lumen doesn’t have the artisan command. From the Lumen Cache documentation head over to the La…
Cookies not set using PHP setcookie function
I’m using the setcookie php function to set some cookies in my browser. I try to set cookies in my php code and then I check it using print_r($_COOKIE). Cookies are not displayed, however if I try to …
Counting specific records MySQL
I want to show the count of users which have the status 1 (see code) within PHP MySQL. <?php // something like this $result = mysqli_query($mysqli, "SELECT COUNT(*) FROM users WHERE status = '…
Laravel pagination problem one by one pages
I’m sorry, I have a problem with my laravel pagination Gives me one by one page for example, in my table 16 row I make paginate (10), the pagination gives me in the first page from 1 to 10 and in the …