SHARE
TWEET

Administrator Seeder File

SySafarila Oct 23rd, 2019 209 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. use Illuminate\Database\Seeder;
  4.  
  5. class admin extends Seeder
  6. {
  7.     /**
  8.      * Run the database seeds.
  9.      *
  10.      * @return void
  11.      */
  12.     public function run()
  13.     {
  14.         $administrator = new \App\User;
  15.         $administrator->username = "administrator";
  16.         $administrator->name = "Site Administrator";
  17.         $administrator->email = "administrator@larashop.test";
  18.         $administrator->roles = json_encode(["ADMIN"]);
  19.         $administrator->password = \Hash::make("larashop");
  20.         $administrator->avatar = "saat-ini-tidak-ada-file.png";
  21.         $administrator->address = "Sarmili, Bintaro, Tangerang Selatan";
  22.         $administrator->phone = "082117694444";
  23.         $administrator->save();
  24.         $this->command->info("User Admin berhasil diinsert");
  25.     }
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top