Skip to content

Commit

Permalink
Minor fix in the Node model for retrieving the NodeType model with co…
Browse files Browse the repository at this point in the history
…rrect type
  • Loading branch information
Hyleeh committed May 3, 2016
1 parent a6349ee commit a2984ca
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"laravel",
"laravel5"
],
"version": "1.4.1",
"version": "1.4.2",
"authors": [
{
"name": "Hyleeh",
Expand Down
4 changes: 3 additions & 1 deletion src/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ public function fireNodeEvent($event)
*/
public function nodeType()
{
return $this->belongsTo(NodeType::class);
return $this->belongsTo(
config('hierarchy.nodetype_model', 'Nuclear\Hierarchy\NodeType')
);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Providers/HierarchyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class HierarchyServiceProvider extends ServiceProvider {

const version = '1.4.1';
const version = '1.4.2';

/**
* Indicates if loading of the provider is deferred.
Expand Down
3 changes: 2 additions & 1 deletion src/Support/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
| Model Class Paths
|--------------------------------------------------------------------------
|
| Used by type and field repositories.
| Used by type and field repositories,
| and the node_type model is used by the Node model.
|
*/
'nodetype_model' => 'Nuclear\Hierarchy\NodeType',
Expand Down

0 comments on commit a2984ca

Please sign in to comment.