Category

Laravel

Category

https://www.youtube.com/watch?v=5WHFlzAD2uw&t=613s Prerequisites PHP >= 7.1.3OpenSSL PHP ExtensionPDO PHP ExtensionMbstring PHP ExtensionTokenizer PHP ExtensionXML PHP ExtensionCtype PHP ExtensionJSON 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 applicationWe need to run command to…

Step 1: Install the laravel project using the command line. laravel new laravel_ajax Step 2: open project in code and use vs code terminal. Step 3: find .env file in root directory than setup database configuration. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=database_name DB_USERNAME=database_username DB_PASSWORD=database_password Step 4: run Migration command php artisan make:migration create_books_table Now go to app/datatabase/migrations and open books migration file and put code within migration file app/database/timestamp_create_books_table.php the below code here : <?php public function…

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