Posts

Showing posts with the label backend development

Sending Email in Laravel using SMTP server of Google Gmail

Image
Sending email with Gmail via a third-party application has undergone several changes for security reasons. Now to send email using Google SMTP you need to activate 2 step verification, the steps we will take this time may change in the future, but Google will definitely provide us with information via email or news. This time we will make Laravel able to send emails using a Gmail account with the following steps: Step 1 : Create laravel project This step is optional, if you already have an existing Laravel project, you can skip this step and go directly into your Laravel project. Open a terminal or command prompt and type the following command. composer create-project laravel/laravel laravel-mail cd laravel-mail Step 2 : Create App Password for Gmail SMTP Account Important: To create an app password, you need 2-Step Verification on your Google Account. If you use 2-Step-Verification and get a “password incorrect” error when you sign in, you can try to use an app password. Go to your...

How to create a new Laravel project.

  Step 1: Install Laravel Open your command-line interface (e.g., Terminal on macOS, Command Prompt on Windows). Navigate to the directory where you want to create your Laravel project. Run the following command to create a new Laravel project:                       composer create-project --prefer-dist laravel/laravel your-project-name Replace  your-project-name  with the name you want for your Laravel project. Step 2: Configure Your Environment After the installation is complete, navigate into your project directory: cd your-project-name Create a copy of the  .env.example  file and name it  .env : cp .env.example . env Generate an application key: php artisan key:generate Step 3: Set Up the Database Open the  .env  file in a text editor and configure your database connection settings. You need to set the  DB_CONNECTION ,  DB_HOST ,  DB_PORT ,  DB_DATABASE...