Tag

Laravel 7

Browsing

Do you want to send mail using SMTP in laravel 6? then I will give your real-time example how to send mail in laravel 6? In this tutorial, I will guide you on how to send mail in laravel 6. I will create blade file and dynamic information to for mail layout. let’s start from begging. Step 1: Create a laravel 6 project laravel new laravel_sendmail Step 2: Open laravel project set .env configuration MAIL_DRIVER=smtp…

Prerequisites PHP >= 7.1.3 OpenSSL PHP Extension PDO PHP Extension Mbstring PHP Extension Tokenizer PHP Extension XML PHP Extension Ctype PHP Extension JSON PHP Extension Getting started Check all Prerequisites are installed in your machine. then this tutorial is already looking for you, we will create 3 user class – admin, blogger, user and we will make guards for 3 user classes and restriction different parts of the application based on those guards. Create the…

Go to .env file Change MAIL_DRIVER=smtp MAIL_HOST=mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null to MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=465 MAIL_USERNAME=ENTER_YOUR_EMAIL_ADDRESS(gmail) MAIL_PASSWORD=ENTER_YOUR_GMAIL_PASSWORD(gmail) MAIL_ENCRYPTION=ssl

You want login and registration using auth in laravel 6. Laravel 6 provide septate composer package for creating auth scaffold in laravel 6. Then we need to Install laravel/ui package in laravel 6. You are the right place. You have to follow a few steps to make auth in your laravel 6 application. The first step we need to install laravel/ui package. composer require laravel/ui Now you run command and check UI commands info php…

Step 1: Install Laravel 6 first of all, we need to get fresh Laravel 6 version application using bellow command, So open your terminal OR command prompt and run bellow command: laravel new laravel_blog Step 2: Database Configuration Open laravel_blog and set hostname, username, password and database name in .env file DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel_blog DB_USERNAME=root DB_PASSWORD=root Step 3: Create Migration Now we are going to create a blog. so we have to create a…

Laravel Pagination Add in Controller In this example the we need to pass only digit how many records need to find on same page. In this case, let’s specify that we would like to display 5 items per page: <?php namespace App\Http\Controllers; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\DB; class BlogController extends Controller { public function index() { $blog = DB::table(‘blog’)->paginate(5); return view(‘blog’, [’data’ => $blog]); } } Now view part within blog.blade.php <div class=”container”> @foreach ($data as…

Using laravel installer Step 1) download the Laravel 6 installer using Composer: composer global require laravel/installer Step 2) laravel new command will create a fresh laravel installation in the directory. laravel new laravel_project will create a directory named laravel_project. laravel new laravel_project https://www.youtube.com/watch?v=wALXPTjmEPE&t=6s

Step 1: Install Laravel 6 Project I am going to install a laravel project using composer. composer create-project –prefer-dist laravel/laravel laravel6 Step 2: Going inside of project using the command cd laravel6 Step 3: Setup MySQL database Now, configure this database in the .env file. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel6 DB_USERNAME=root DB_PASSWORD=root@123 Step 4: Route Setup Here I am going to create routes to get and post method. now open “routes/web.php” file and put below code.…

Step 1: Install Laravel 6 Project I am going to install a laravel project using composer. composer create-project –prefer-dist laravel/laravel laravel6 Step 2: Going inside of project using the command cd laravel6 Step 3: Setup MySQL database Now, configure this database in the .env file. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel6 DB_USERNAME=root DB_PASSWORD=root@123 Step 4: Create employee_images Table and Model also. Here, I have created migration for employee_images using Laravel 6 php artisan command, you can check…