How do I make doctrine support timestamp columns AHK 10:38Problem: [Doctrine\DBAL\DBALException] Unknown column type "timestamp" requested. Any Doctrine type that you use has to be regi... Read More
[6.0] Where is the command app:name? AHK 12:01Problem The app:name command, no longer available in laravel 6.0, there is some way to change the namespaces, as was being done with that co... Read More
The most common HTTP Status codes AHK 13:13As we write API calls, we've also added t he status codes to our endpoint response. This lets us explicitly return JSON data and send ... Read More
How to Install Multiple PHP(7.3 and 8) Versions on Ubuntu > 20 AHK 11:50 Step 1: System Update First, log in to Ubuntu via console. Then update the Apt cache and upgrade the current packages of the system using t... Read More
Run Composer versions 1 and 2 simultaneously AHK 11:26Composer 2 is great. But it is not compatible with PHP versions lesser than 7.2. So if you're maintaining legacy projects that require o... Read More
How to send an attachment from request to mail without first saving it to storage? AHK 17:53How to send an attachment from request to mail without first saving it to storage? public function build(){ $email = $this->from(... Read More
Check Laravel JWT token is valid or not AHK 10:52Create Middleware using the below command Command: php artisan make:middleware JwtMiddleware Paste the below code: <?php namespace App\Ht... Read More
Laravel: Transform Request to custom validation request AHK 11:41Laravel: Transform Request to custom validation request we can convert any request to any other request, as long as it extends from Illumina... Read More
Double the first element and move zero to end AHK 13:05Given an array\list containing integers, zero is considered an invalid number and the rest of the other numbers are valid. If the two neares... Read More
Generating random CSS hex color code using PHP md5() function AHK 11:26 <?php $rand_color = "#".substr(md5(rand()), 0, 6); echo $rand_color; ?> In the above code, we have taken the PHP rand() fun... Read More
Cannot run Apache2.4 with xampp AHK 13:28The Apache service named reported the following error: httpd.exe: Syntax error on line 520 of C:/xampp/apache/conf/httpd.conf: Syntax error ... Read More
How do you convert between 12 hour time and 24 hour time in PHP? AHK 13:00$time = '5:36 pm'; // 24-hour time to 12-hour time $time_in_12_hour_format = date("g:i a", strtotime($time)); // 12-hour ... Read More
How to convert 1000 to 1k, 1 000 000 to 1m AHK 15:44 How to convert 1000 to 1k, 1 000 000 to 1m Here the logic is explained using php <?php // Your code here! function convert_text... Read More
How to Increase Import Size Limit in phpMyAdmin AHK 16:51 I had the same problem with my working correctly by doing the following changes into the php.ini file post_max_size = 800M upload_max_... Read More
Using Jquery Ajax to retrieve data from Mysql AHK 15:47 For retrieving data using Ajax+jQuery, you must write the following code: <html> <script type="text/javascript" src=... Read More
Converting string to Date and DateTime in PHP AHK 12:02 Converting string to Date and DateTime Use strtotime() on your first date then date('Y-m-d') to convert it back: $time = st... Read More
How To Write Your First PHP Script Anonymous 11:05 You want to learn how to write PHP scripts but don’t know where to start from? In this tutorial I’ll show you all what you’ll need to write... Read More