• Developer New

    Saturday, March 25, 2017

    how to create migration table in laravel

    First you need to run comment as bellow: 
     
    php artisan make:migration create_users_table --create=users
     
     
    Then you will get your file in migration folder 
     
    ex: of table in migration 
    
    
    public function up()
    {
        Schema::create('users', function(Blueprint $table)
        {
            $table->increments('id');
            $table->string('username');
            $table->string('fullname');
            $table->int('number');
            $table->string('email')->unique();
            $table->string('password', 60);
            $table->rememberToken();
            $table->timestamps();
        });
    }
     
     

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel