Exemplo n.º 1
0
 public function run()
 {
     $cate = ['Productivity', 'Finance', 'Travel', 'Business', 'Utilities'];
     $faker = Faker::create();
     foreach (range(200, 220) as $index) {
         App::create(['id' => $index, 'name' => $faker->word, 'rating' => $faker->numberBetween($min = 2, $max = 5), 'rating_users' => $faker->numberBetween($min = 5, $max = 20000), 'genre' => $cate[rand(0, 4)], 'arm' => 'armv7', 'description' => $faker->sentence, 'img_url' => $faker->imageUrl($width = 60, $height = 60)]);
     }
 }
Exemplo n.º 2
0
 public function add()
 {
     if ($this->request->id) {
         $app = App::find($this->request->id);
     } else {
         $app = App::create();
     }
     if ($this->request->data && $app->save($this->request->data)) {
         $app->bootstrap();
         $this->redirect(array('Apps::view', 'args' => array($app->_id)));
     }
     return compact('app');
 }
Exemplo n.º 3
0
 public function run()
 {
     App::create(['id' => '123', 'cl_id' => '2', 'name' => 'SosLab App', 'genre' => 'Music', 'rating' => '4.5', 'rating_users' => '45', 'r1_score' => '2', 'r2_score' => '3', 'r3_score' => '5', 'total_score' => '10', 'arm' => 'armv7', 'description' => 'Soslab', 'img_url' => 'http://is1.mzstatic.com/image/pf/us/r30/Purple5/v4/12/3d/be/123dbee0-d119-f4e5-a843-9392dcecf51f/AppIcon60x60_U00402x.png']);
     App::create(['id' => '456', 'cl_id' => '2', 'name' => 'ICTLab App', 'genre' => 'Games', 'rating' => '2', 'rating_users' => '23', 'r1_score' => '4', 'r2_score' => '3', 'r3_score' => '5', 'total_score' => '12', 'arm' => 'armv7', 'description' => 'ICTlab', 'img_url' => 'http://is3.mzstatic.com/image/pf/us/r30/Purple7/v4/19/dd/7b/19dd7bc0-ae03-d82d-f183-d66e74fb5f1c/Icon-Production.png']);
     App::create(['id' => '789', 'cl_id' => '3', 'name' => 'KMLab App', 'genre' => 'Sports', 'rating' => '4', 'rating_users' => '12', 'r1_score' => '4', 'r2_score' => '3', 'r3_score' => '6', 'total_score' => '13', 'arm' => 'armv7', 'description' => 'KMlab', 'img_url' => 'http://is4.mzstatic.com/image/pf/us/r30/Purple7/v4/16/35/5e/16355e45-6fbd-f871-5903-d6a53a53eeb2/ProductionAppIcon57x57.png']);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table("apps")->delete();
     App::create(['client_id' => 'koala', 'name' => 'Koala', 'author_id' => 1, 'homepage_url' => 'http://121.42.144.117:2111', 'logo_url' => 'https://www.prepbootstrap.com/bootstrap-theme/shield/preview/images/team/team04.jpg', 'description' => '西邮Linux兴趣小组资源管理平台', 'secret' => '$2y$10$8Gz5X7XkQtVzwFU8C9zSQ.FzIH6OZNd5D', 'redirect_uri' => 'http://121.42.144.117:2111/connect/adam/callback', 'status' => 3, 'submit_status' => 3, 'scopes' => 'all']);
 }