/**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('users', function (Blueprint $table) {
         $table->increments('id');
         $table->string('name');
         $table->string('email')->unique();
         $table->string('password', 60);
         $table->string('role', 60)->default('author');
         $table->rememberToken();
         $table->timestamps();
         $table->boolean('active')->default(0);
     });
     $user = new \App\Models\Users();
     $user->name = '0ez';
     $user->email = '*****@*****.**';
     $user->password = '******';
     $user->role = 'admin';
     $user->active = '1';
     $user->save();
 }
Ejemplo n.º 2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = Faker\Factory::create();
     DB::table('users')->truncate();
     App\Models\Users::create(array('ugroup' => 1, 'FirstName' => $faker->firstName, 'LastName' => $faker->lastName, 'UserName' => $faker->userName, 'email' => '*****@*****.**', 'Password' => Hash::make('admin'), 'Active' => 1, 'RegData' => time()));
 }
 /**
  * Toggle feature popup for current restaurant
  * 
  * @return $this
  */
 public function toggleCurrentPopup()
 {
     $this->restaurants->togglePopup();
     return $this;
 }