Fix segment implementation
This commit is contained in:
@@ -4,7 +4,6 @@ namespace CachetHQ\Cachet\Models;
|
|||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Watson\Validating\ValidatingTrait;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property int $id
|
* @property int $id
|
||||||
@@ -15,8 +14,6 @@ use Watson\Validating\ValidatingTrait;
|
|||||||
*/
|
*/
|
||||||
class Tag extends Model
|
class Tag extends Model
|
||||||
{
|
{
|
||||||
use ValidatingTrait;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The fillable properties.
|
* The fillable properties.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class LoadConfigServiceProvider extends ServiceProvider
|
|||||||
// Set the Segment.com settings.
|
// Set the Segment.com settings.
|
||||||
$segmentRepository = $this->app->make('CachetHQ\Cachet\Segment\RepositoryInterface');
|
$segmentRepository = $this->app->make('CachetHQ\Cachet\Segment\RepositoryInterface');
|
||||||
try {
|
try {
|
||||||
$this->app->config->set('cachethq/segment::write_key', $segmentRepository->fetch());
|
$this->app->config->set('segment.write_key', $segmentRepository->fetch());
|
||||||
} catch (\GuzzleHttp\Exception\ConnectException $e) {
|
} catch (\GuzzleHttp\Exception\ConnectException $e) {
|
||||||
// We may not have any connection. Let's not cry about it.
|
// We may not have any connection. Let's not cry about it.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ return [
|
|||||||
'CachetHQ\Cachet\Providers\SegmentApiServiceProvider',
|
'CachetHQ\Cachet\Providers\SegmentApiServiceProvider',
|
||||||
'CachetHQ\Cachet\Providers\ViewComposerServiceProvider',
|
'CachetHQ\Cachet\Providers\ViewComposerServiceProvider',
|
||||||
'CachetHQ\Cachet\Providers\LoadConfigServiceProvider',
|
'CachetHQ\Cachet\Providers\LoadConfigServiceProvider',
|
||||||
|
'CachetHQ\Segment\SegmentServiceProvider',
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
21
config/segment.php
Normal file
21
config/segment.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
/*
|
||||||
|
* Whether to enable Segment or not.
|
||||||
|
*/
|
||||||
|
'enabled' => true,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The key which enables you to write to the Segment.com API.
|
||||||
|
*/
|
||||||
|
'write_key' => '',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Other configurations. Currently unused.
|
||||||
|
*/
|
||||||
|
'consumer' => 'socket',
|
||||||
|
'debug' => false,
|
||||||
|
'ssl' => true,
|
||||||
|
'error_handler' => null,
|
||||||
|
];
|
||||||
Reference in New Issue
Block a user