Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
colinhall17 committed Apr 7, 2020
2 parents 8eca66d + 62feac6 commit 3d4c5a6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `laravel-setting` will be documented in this file

## 1.0.1 - 2020-03-23

- update to use config model names instead of Facades

## 1.0.0 - 2019-12-06

- initial release
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
],
"require": {
"php": "^7.3",
"illuminate/support": "^6.0"
"illuminate/support": "^6.0|^7.0"
},
"require-dev": {
"orchestra/testbench": "^4.0",
"phpunit/phpunit": "^8.0"
"orchestra/testbench": "^5.0",
"phpunit/phpunit": "^9.0"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 1 addition & 2 deletions src/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Setting;

use Setting\Contracts\Group as Contract;
use Setting\Item;
use Illuminate\Database\Eloquent\Model;

class Group extends Model implements Contract
Expand All @@ -16,7 +15,7 @@ class Group extends Model implements Contract

public function items()
{
return $this->hasMany(Item::class, 'setting_group_id');
return $this->hasMany(config('setting.models.item'), 'setting_group_id');
}

}
2 changes: 1 addition & 1 deletion src/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Item extends Model implements Contract

public function group()
{
return $this->belongsTo(Group::class, 'setting_group_id');
return $this->belongsTo(config('setting.models.group'), 'setting_group_id');
}

}
2 changes: 1 addition & 1 deletion src/Providers/SettingServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function boot()

$this->publishes([
__DIR__.'/../../config/setting.php' => config_path('setting.php'),
], 'config');
], 'setting-config');

$this->publishes($this->getMigrationStubs(), 'setting-migrations');
}
Expand Down

0 comments on commit 3d4c5a6

Please sign in to comment.