How To Create Table Migration In Laravel 8?




Hi Guys,

In this example,I will learn you how to create table migration in laravel can easy and simplay create table migration in laravel 8. you will learn laravel create table using migration. you will do the following things for create table in laravel using migration.

I will also let you know how to run migration and rollback migration and how to create migration using command in laravel 8. let's see bellow instruction.

Create Migration:

Using bellow command you can simply create migration for database table.

php artisan make:migration create_posts_table

After run above command, you can see created new file as bellow and you have to add new column for string, integer, timestamp and text data type as like bellow:



use Illuminate\Database\Migrations\Migration;

use Illuminate\Database\Schema\Blueprint;

use Illuminate\Support\Facades\Schema;

class CreatePostTable extends Migration



* Run the migrations.


* @return void


public function up()


Schema::create('posts', function (Blueprint $table) {












* Reverse the migrations.


* @return void


public function down()





Run Migration:

Using bellow command we can run our migration and create database table.

php artisan migrate

Create Migration with Table:

php artisan make:migration create_posts_table --table=posts

Migration Rollback:

php artisan migrate:rollback

It will help you...

#Laravel 8

#Laravel 7


#Laravel 6