Prepare a Laravel application for production
Comment the line in .gitignore file !/public/build Enter the command if you have any node module npm run build Enter if you have any file in storage php artisan storage:link
Comment the line in .gitignore file !/public/build Enter the command if you have any node module npm run build Enter if you have any file in storage php artisan storage:link
If your laravel application is running behind the Proxy Server or the Load-Balancer then you should follow these settings. Even, if the proxy server or Load-balancer receives https:// requests from global users and your app server receives http:// requests from the proxy or LB then you should follow these steps too. 2. You need to…
Let’s create a class file for Queue Job by entering the following command php artisan make:job SendOtpEmail To get the email data, just replace the construct method like below in SendOtpEmail job class file Write the email sending code in handle() method of SendOtpEmail job class file The class file is ready to receive the…
Follow these easy steps to create an Event Listener after user registration in Laravel 11. Create an Event class file php artisan make:event UserCreated Create a Listener class file php artisan make:listener SendWelcomeEmail –event=UserCreated Add following codes in User model file use App\Events\UserCreated; Add the following codes in User class of User model file Add…
The php artisan serve makes our life easy but what if you are running its app on the Apache web server? Laravel 11 is new, and it brings us many new features. You may face some errors so, please keep these solutions in mind. To write all logs sudo chown www-data:www-data storage/logs/ To store views…
• Enter following commands to create the necessary files. • Edit the app/Http/Kernel.php file and add the following line as a value in protected $middlewareAliases • Edit the config/auth.php file and add the following lines as a value in guards and providers respectively Please watch the following playlist for better understanding.
sudo nano +488 /opt/lampp/etc/httpd.conf Uncomment: Include etc/extra/httpd-vhosts.conf sudo nano /opt/lampp/etc/extra/httpd-vhosts.confInsert the following lines: <VirtualHost *:80> DocumentRoot “/home/user/Documents/myweb” ServerName myweb ErrorLog “logs/myweb-error.log” CustomLog “logs/myweb-access.log” combined <Directory “/home/user/Documents/myweb”> Require all granted AllowOverride All </Directory> </VirtualHost> sudo nano /etc/hostsInsert: 127.0.0.1 …
First of all you need to enable SSH service for your hosting. You can contact bluehost customer service for that. Now let’s go to the main point. Suppose you’ve a website project on your PC named coderoffice and you use git to manage the project. Now you can take the advantage. You can easily update your website…
1. Open terminal and enter the following command:sudo nano /etc/my-resolution.sh2. Write all the following lines and save the file: #!/bin/bash# My Resolution Settings – 1920×1080 60Hz for Dell monitorxrandr –newmode “Dell” 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsyncxrandr –addmode VGA1 Dellxrandr –output VGA1 –primary –mode Dellexit 03. Make the file executable:…