/** * Run the database seeds. * * @return void */ public function run() { User::create(['first_name' => "Admin", 'last_name' => 'Admin', 'email' => "*****@*****.**", 'password' => bcrypt("admin123")]); Entity::create(['name' => 'Product', 'unique_key' => 'product']); Entity::create(['name' => 'Category', 'unique_key' => 'category']); //Think again... do we need root category??? //Category::create(['name' => 'Root', 'slug' => 'root', 'status' => 1, 'parent_category_id' => 0]); }
/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ protected function create(array $data) { User::create(['first_name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]); return Customer::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]); }
/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ protected function create(array $data) { return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]); }