Skip to content

Commit

Permalink
Update readme with node repository usage
Browse files Browse the repository at this point in the history
  • Loading branch information
strads10 committed Nov 17, 2017
1 parent a1fc925 commit a347161
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ Page::register( App\Pages\TextPage::class )
Admin::modules()->register( App\Http\Controllers\Admin\TextController::class );
```

### Working with nodes

The node repository is used to ensure that the website only displays active nodes to the user

```php
$currentNode = app( Arbory\Base\Nodes\Node::class );
$nodes = app( Arbory\Base\Repositories\NodesRepository::class );

// returns only the active children of the current node
$nodes->findUnder( $currentNode );
```

## Validation

[Validation rules](https://laravel.com/docs/5.4/validation) can be attached to any field, like so
Expand Down

0 comments on commit a347161

Please sign in to comment.