/** * Creates a new model. * @param [String => Mixed] $data Properties of the new model. * @param [String => Mixed] $opts * @return Model */ public function store(array $data, array $opts) { $client = parent::store($data, $opts); \DB::getMongoDB()->oauth_clients->insert(['client_id' => $client->api['basic_key'], 'client_secret' => $client->api['basic_secret'], 'redirect_uri' => 'http://www.example.com/']); return $client; }