Example #1
0
 /**
  * Create Facebook profile with the given data.
  *
  * @param  $id
  * @param  $access_token
  * @param  $user_id
  * @return bool
  */
 public function createFromFacebook($id, $access_token, $user_id)
 {
     return $this->create(['uid' => $id, 'access_token' => $access_token, 'user_id' => $user_id, 'provider_id' => Provider::findFirst("name = 'facebook'")->id]);
 }
Example #2
0
 public function nameMustBeUnique(FunctionalTester $I)
 {
     $this->model->name = Provider::findFirst()->name;
     $I->assertFalse($this->model->save());
 }