This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Improve Query Result - Make it faster. | |
| ******** Results ******** | |
| //All Rows | |
| $users = DB::table('users')->get(); | |
| //Single record | |
| $user = DB::table('users')->where('name', 'John')->first(); | |
| echo $user->name; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. first login to your gmail account. | |
| 2. under Manage account > Sign In And Security > Sign In to google. | |
| 3. enable two step verification. | |
| 4. then you can generate app password. | |
| 5. you can use that app password in .env file. | |
| ---------------------------------------------- | |
| MAIL_DRIVER=smtp | |
| MAIL_HOST=smtp.gmail.com | |
| MAIL_PORT=587 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try { | |
| $result = ''; | |
| $curl = curl_init(); | |
| curl_setopt_array($curl, array( | |
| CURLOPT_URL => 'http://54.185.108.244:5000/doAIImageProcessing?img_URL=' . $image_url, | |
| CURLOPT_RETURNTRANSFER => true, | |
| CURLOPT_ENCODING => '', | |
| CURLOPT_MAXREDIRS => 10, | |
| CURLOPT_TIMEOUT => 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| **************** To export db from RDS *********** | |
| mysqldump -h rds.host.name -u remote_user_name -p remote_db --set-gtid-purged=OFF > remote_db.sql | |
| //add *****set gtid purged off**** - AWS RDS create problem if not added. | |
| When prompted for password, provide the password | |
| ***************** To import db on RDS ******************* | |
| mysql -h rds.host.name -u remote_user_name -p remote_db < remote_db.sql | |
| When prompted for password, provide the password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ---------------------- Start For CSS ------------------------- | |
| CSS Menu - https://freefrontend.com/css-menu/ | |
| ---------------------- End For CSS ------------------------- | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. install git. | |
| 2. Create repository | |
| 3. Copy Clone Url | |
| *********** Clone Project ************** | |
| Commadn: git clone clone_url here_folder_name_ifspecify | |
| e.g git clone https://github.com/...../test.git example_repo | |
| ********** ******* Git Status ********* ************ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script type='text/javascript'> | |
| function init() { | |
| var canvas = document.getElementById("canvas"); | |
| context = canvas.getContext("2d"); | |
| images = new Array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Clone project | |
| git clone https://[email protected]/username/project_name | |
| 2. run command | |
| composer install | |
| 3. create .htaacess file and pase below code. | |
| 4. create .env file and paste below code. | |
| ================= .env file example ================================ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Clone project to /var/www/html and respective folder. | |
| 2. Put.htaccess file to that folder - Link - https://drive.google.com/file/d/1fT-rkw9ZMJp_Hr4kKOBJ1m37rpz6XA3R/view?usp=sharing | |
| 3. If still its not working - then Server - rewrite rule is not working. needs to be updated it. | |
| 4. Go to /etc/apache2/apache2.conf file. | |
| Make it like this | |
| <Directory /var/www/> | |
| Options Indexes FollowSymLinks | |
| AllowOverride All <----------- by default its None - make it to All | |
| Require all granted <------------ denied by default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Create a cors file | |
| Run this artisan command: | |
| php artisan make:middleware Cors | |
| 2. Now open Cors.php from *App\Http\Middleware* folder and replace handle() function with this code: | |
| public function handle($request, Closure $next) | |
| { | |
| //return $next($request); | |
| header("Access-Control-Allow-Origin: *"); |