Пример #1
0
 /**
  * Add admin user
  */
 public function addAdmin()
 {
     $person = new Person();
     $data = ["id" => $person->counter('person_counter', ['initial' => 100, 'value' => 1]), "first_name" => "admin", "last_name" => "admin", "gender" => "m", "username" => "admin", "email" => "*****@*****.**", "password" => bcrypt('admin'), "userimage" => "", "country" => "", "created" => "", "occupation" => "", "role" => "A", "type" => "person"];
     $person->insert('person_' . $data['id'], $data);
     return response(['Admin added.']);
 }