mercredi 29 mars 2017

laravel 5 migration error for creating table

Hi i am using folliwing command to cerate migration and the file generating successfullly.

But i am getting following error :-
[ErrorException]
Creating default object from empty value
My command and code is as below.

Command :- php artisan make:migration create_admin_notavailabel_table

Generated File Code :-

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdminNotavailabelTable extends Migration
{
/**
 * Run the migrations.
 *
 * @return void
 */
public function up()
{
   Schema::create('admin_notavailabel', function (Blueprint $table) {
        $table->increments('id');
        $table->integer('id_location');
        $table->enum('not_avaiblity_type', ['days', 'hours']);
        $table->text('message');
        $table->string('repeat_on',50);
        $table->date('start_date');
        $table->date('end_date');
        $table->time('start_time');
        $table->time('end_time');
        $table->timestamps();

    });
}

/**
 * Reverse the migrations.
 *
 * @return void
 */
public function down()
{
     Schema::dropIfExists("admin_notavailabel"); 
}

}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire