Skip to content

Commit

Permalink
Fix get config on models
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioribeiro committed Aug 11, 2014
1 parent 3913e86 commit a1e03cf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Vendor/Laravel/Models/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace PragmaRX\Tracker\Vendor\Laravel\Models;

use Illuminate\Database\Eloquent\Model as Eloquent;
use PragmaRX\Tracker\Support\Config;
use Symfony\Component\Console\Application;

class Base extends Eloquent {

Expand All @@ -34,6 +34,11 @@ public function __construct(array $attributes = array())

public function getConfig()
{
if ($GLOBALS["app"] instanceof Application)
{
return app()->make('tracker.config');
}

return $GLOBALS["app"]["tracker.config"];
}

Expand Down

0 comments on commit a1e03cf

Please sign in to comment.