This commit is contained in:
Graham Campbell
2015-07-05 15:40:48 +01:00
parent 78567f865a
commit f74f44048d
5 changed files with 75 additions and 91 deletions

View File

@@ -10,7 +10,6 @@
*/
use CachetHQ\Cachet\Facades\Setting;
use CachetHQ\Segment\Facades\Segment;
use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Request;
use Jenssegers\Date\Date;
@@ -49,7 +48,7 @@ if (!function_exists('segment_identify')) {
if (Config::get('segment.write_key')) {
try {
if (Setting::get('app_track')) {
return Segment::identify([
return app('segment')->identify([
'anonymousId' => Config::get('app.key'),
'context' => [
'locale' => Config::get('app.locale'),
@@ -83,7 +82,7 @@ if (!function_exists('segment_track')) {
if (Config::get('segment.write_key')) {
try {
if (Setting::get('app_track')) {
return Segment::track([
return app('segment')->track([
'anonymousId' => Config::get('app.key'),
'event' => $event,
'properties' => $properties,
@@ -118,7 +117,7 @@ if (!function_exists('segment_page')) {
if (Config::get('segment.write_key')) {
try {
if (Setting::get('app_track')) {
return Segment::page([
return app('segment')->page([
'anonymousId' => Config::get('app.key'),
'name' => $page,
'context' => [