/**
  * Creates a hashtag in the database.
  *
  * @return Response
  */
 public function create()
 {
     $request = $this->request;
     $hashtag = new HashTag();
     $hashtag->assign(['value' => $request->get('value', 'string')]);
     return $this->response($request, $hashtag, true);
 }
示例#2
0
 public function valueMustBeUnique(FunctionalTester $I)
 {
     $this->model->value = HashTag::findFirst()->value;
     $I->assertFalse($this->model->save());
 }
 public static function GenerateFake($faker)
 {
     return ['photo_id' => $faker->numberBetween($min = 1, $max = Photo::count()), 'hashTag_id' => $faker->numberBetween($min = 1, $max = HashTag::count())];
 }