Create a chatbot.

@param  array  $data
@return \Illuminate\Support\Collection
160721
public function store(array $data)
    {
        $chatbot = $this->client->post(
            sprintf('buckets/%d/chats/%d/integrations.json', $this->bucket, $this->parent),
            [
                'json' => $data,
            ]
        );
        $chatbot = new Chatbot($this->response($chatbot));
        $chatbot->inContext($this->bucket, $this->parent);

        return $chatbot;
    }
1291302
public function create(array $data = [])
	{
		$created = $this->model->create($data);

		if( ! $created)
		{
			return new Payload(null, 'not_created');
		}

		// Cache the newly created model and tag it with table's name.
		Cache::tags($this->model->getTable())->forever($created->getKey(), $created);

		return new Payload($created, 'created');
	}
478995
public static function create(array $data = [])
    {
        if (isset($data[0]) && is_array($data[0])) {

            $collection = new Collection();

            foreach ($data as $row) {
                /** @var ORM $obj */
                $class = get_called_class();
                $obj = new $class();
                $obj->setState($row);
                $obj->save();

                $collection->add($obj);
            }

            return $collection;
        }

        /** @var ORM $obj */
        $class = get_called_class();
        $obj = new $class();
        $obj->setState($data);
        $obj->save();

        return $obj;
    }
29956
public function create(array $data)
    {
        $channelItem = new YoutubeChannelItem();

        $snippet = $data['snippet'];

        $author = new Author();
        $author->setIdentifier($snippet['channelId']);
        $author->setName($data['channelTitle']);
        $author->setUsername($data['channelTitle']);

        $channelItem
            ->setIdentifier($data['id']['videoId'])
            ->setMessage($snippet['description'])
            ->setCreatedAt(new \DateTime($snippet['publishedAt']))
            ->setAuthor($author);

        $media = $this->getBestThumbnailRes($snippet['thumbnails']);
        $media->setLink('https://www.youtube.com/watch?v=' . $data['id']['videoId']);

        $channelItem->addMedia($media);

        return $channelItem;
    }
1330376
public function create(array $data)
    {
        $user = User::create([
            'name'                  => $data['name'],
            'email'                 => $data['email'],
            'password'              => bcrypt($data['password']),
            'birthday_at'           => $data['birthday_at'],
            'locale'                => $data['locale'],
            'gender'                => $data['gender'],
            'city'                  => $data['city'],
            'about'                 => $data['about'],
            'profession'            => $data['profession'],
            'hobbies'               => $data['hobbies'],
            'homepage'              => $data['homepage'],
            'skype'                 => $data['skype'],
            'facebook'              => $data['facebook'],
            'twitter'               => $data['twitter'],
            'main_character'        => $data['main_character'],
            'main_guild'            => $data['main_guild'],
            'favorite_race'         => $data['favorite_race'],
            'favorite_spec'         => $data['favorite_spec'],
            'favorite_instance'     => $data['favorite_instance'],
            'favorite_battleground' => $data['favorite_battleground'],
        ]);

        return $user;
    }
625986
public static function create(array $data): Player
    {
        $player = new Player();
        parent::fill($data, $player);
        if (is_array($player->clan)) {
            $player->clan = Clan::create($player->clan);
        }
        if (is_array($player->league)) {
            $player->league = League::create($player->league);
        }
        return $player;
    }
574481
public static function create(array $data): League
    {
        $league = new League();
        parent::fill($data, $league);
        return $league;
    }
1214141
public function create(array $data)
    {
        //@todo implement some notification, calculation, etc.
        $transaction = $this->model->create($data);

        Event::fire(new TransactionCreated($transaction));

        return $transaction;
    }
405144
public function create(array $data = [])
    {
        $collection = new Collection();

        if (array_key_exists('parts', $data)) {
            $collection->setParts(
                $this->getMovieFactory()->createCollection($data['parts'])
            );
        }

        if (array_key_exists('backdrop_path', $data)) {
            $collection->setBackdropImage(
                $this->getImageFactory()->createFromPath($data['backdrop_path'], 'backdrop_path')
            );
        }

        if (array_key_exists('images', $data)) {
            $collection->setImages(
                $this->getImageFactory()->createCollectionFromMovie($data['images'])
            );
        }

        if (array_key_exists('poster_path', $data)) {
            $collection->setPosterImage(
                $this->getImageFactory()->createFromPath($data['poster_path'], 'poster_path')
            );
        }

        return $this->hydrate($collection, $data);
    }
1036314
function factory(array $data) {
        if(parent::has($data['id'])) {
            $emoji = parent::get($data['id']);
            $emoji->_patch($data);
            return $emoji;
        }
        
        $emoji = new \CharlotteDunois\Yasmin\Models\Emoji($this->client, $this->guild, $data);
        
        if($emoji->id !== null) {
            $this->set($emoji->id, $emoji);
            $this->client->emojis->set($emoji->id, $emoji);
        }
        
        return $emoji;
    }
353973
public function create(array $data) {
    $tweet = new Tweet();

    $media = new Media();
    $media->setUrl($data['user']['profile_image_url']);

    $author = new Author();
    $author->setProfilePicture($media);
    $author->setIdentifier($data['user']['id']);
    $author->setName($data['user']['name']);
    $author->setLink('https://twitter.com/' . $data['user']['screen_name']);
    $author->setUsername($data['user']['screen_name']);

    $tweet
        ->setFollowersCount($data['user']['followers_count'])
        ->setIdentifier($data['id'])
        ->setMessage($data['full_text'])
        ->setCreatedAt(new \DateTime($data['created_at']))
        ->setAuthor($author);

    if (isset($data['retweeted_status']['full_text'])) {
      $tweet->setMessage($data['retweeted_status']['full_text']);
    }

    $this->addTweetReferences($tweet, $data);
    $this->addTweetMedias($tweet, $data);

    return $tweet;
  }
1310274
public function createEvent(array $data)
    {
        $json = json_encode($data);

        return $this->sendRequest('POST', $this->eventUrl, $json);
    }
869588
protected function create(array $data)
  {
    //Ceate User
    $user = User::create([
      'name' => $data['name'],
      'email' => $data['email'],
      'password' => bcrypt($data['password']),
    ]);

    //create Blank profile
    $profile = Profile::create([
      'user_id' => $user->id,
      'bio'     => '',
    ]);
    $profile->save();

    //Assign User Role
    $user->assign('user');
    return $user;
  }
541707
public static function createFromData(array $data)
    {
        if (!isset($data['method'])) {
            throw new DomainException(self::REQUIRED_METHOD);
        }

        switch ($data['method']) {
            case self::AUTO:
                $scheduleInstruction = new AutoType($data);

                break;
            case self::DATE_INTERVAL:
                $scheduleInstruction = new DateIntervalType($data);

                break;
            case self::DAY_OF_MONTH:
                $scheduleInstruction = new DayOfMonthType($data);

                break;
            case self::DAY_OF_WEEK:
                $scheduleInstruction = new DayOfWeekType($data);

                break;
            case self::IMMEDIATELY:
                $scheduleInstruction = new ImmediatelyType($data);

                break;
            case self::INTELLIGENT:
                $scheduleInstruction = new IntelligentType($data);

                break;
            default:
                throw new DomainException(
                    sprintf(self::UNSUPPORTED_METHOD, implode(',', self::$availableMethods))
                );
        }

        return $scheduleInstruction;
    }
1256490
public function create(array $data)
    {
        $data = $this->client->post(Inflector::pluralize($this->getResourceName()), [$this->getResourceName() => $data]);

        return $this->fromArray(reset($data));
    }
796909
function factory(array $data) {
        if(parent::has($data['user']['id'])) {
            $member = parent::get($data['user']['id']);
            $member->_patch($data);
            return $member;
        }
        
        $member = new \CharlotteDunois\Yasmin\Models\GuildMember($this->client, $this->guild, $data);
        $this->set($member->id, $member);
        return $member;
    }
304311
protected function create(array $data)
    {
        $user = UserModel::create($data);
        return User::find($user->id);
    }