public static function attachToUser(Model $user, array $scopes)
	{
		$attach_scopes = [];

		foreach ($scopes as $scope) {
			$attach_scopes[] = [
				'user_id' => $user->id,
				'oauth_scope_id' => $scope,
			];
		}

		DB::table('oauth_scope_user')->insert($attach_scopes);
	}
public static function attachToUser(Model $user, array $scopes)
	{
		$attach_scopes = [];

		foreach ($scopes as $scope) {
			$attach_scopes[] = [
				'user_id' => $user->id,
				'oauth_scope_id' => $scope,
			];
		}

		DB::table('oauth_scope_user')->insert($attach_scopes);
	}
public static function attachToUser ( Model $ user , array $ scopes ) { $ attach_scopes = [ ] ; foreach ( $ scopes as $ scope ) { $ attach_scopes [ ] = [ 'user_id' => $ user -> id , 'oauth_scope_id' => $ scope , ] ; } DB :: table ( 'oauth_scope_user' ) -> insert ( $ attach_scopes ) ; }
Provide a convenience method for attaching scopes to a user

@param \Illuminate\Database\Eloquent\Model $user
@param array                               $scopes
Provide a convenience method for attaching scopes to a user