@@ -26,9 +26,9 @@ composer require alexwenzel/nova-dependency-container
2626
2727### Usage
2828
29- 1 . Add the ` Alexwenzel\NovaDependencyContainer \HasDependencies ` trait to your Nova Resource.
30- 2 . Add the ` Alexwenzel\NovaDependencyContainer\NovaDependencyContainer ` to your Nova Resource ` fields ` method.
31- 3 . Add the ` Alexwenzel\NovaDependencyContainer \ActionHasDependencies ` trait to your Nova Actions that you wish to use
29+ 1 . Add the ` Alexwenzel\DependencyContainer \HasDependencies ` trait to your Nova Resource.
30+ 2 . Add the ` Alexwenzel\DependencyContainer\DependencyContainer ` to your Nova Resource ` fields ` method.
31+ 3 . Add the ` Alexwenzel\DependencyContainer \ActionHasDependencies ` trait to your Nova Actions that you wish to use
3232 dependencies on.
3333
3434``` php
@@ -46,7 +46,7 @@ class Page extends Resource
4646 2 => 'Full Name'
4747 ])->displayUsingLabels(),
4848
49- NovaDependencyContainer ::make([
49+ DependencyContainer ::make([
5050 Text::make('First Name', 'first_name')
5151 ])->dependsOn('name_format', 0),
5252
@@ -65,10 +65,10 @@ The package supports four kinds of dependencies:
65654 . ` ->dependsOnNotEmpty('field') `
66665 . ` ->dependsOnNullOrZero('field') `
6767
68- These dependencies can be combined by chaining the methods on the ` NovaDependencyContainer ` :
68+ These dependencies can be combined by chaining the methods on the ` DependencyContainer ` :
6969
7070``` php
71- NovaDependencyContainer ::make([
71+ DependencyContainer ::make([
7272 // dependency fields
7373])
7474->dependsOn('field1', 'value1')
@@ -96,7 +96,7 @@ property, as in `post.id`.
9696``` php
9797BelongsTo::make('Post'),
9898
99- NovaDependencyContainer ::make([
99+ DependencyContainer ::make([
100100 Boolean::make('Visible')
101101])
102102->dependsOn('post.id', 2)
@@ -116,7 +116,7 @@ should be
116116BelongsToMany::make('Roles')
117117 ->fields(function() {
118118 return [
119- NovaDependencyContainer ::make([
119+ DependencyContainer ::make([
120120 // pivot field rules_all
121121 Boolean::make('Rules All', 'rules_all')
122122 ])
@@ -178,7 +178,7 @@ And now for the dependency container.
178178``` php
179179->fields(function() {
180180 return [
181- NovaDependencyContainer ::make([
181+ DependencyContainer ::make([
182182 // pivot field rules_all
183183 Select::make('Type', 'type_1')
184184 ->options([
@@ -189,7 +189,7 @@ And now for the dependency container.
189189 ->dependsOn('role_user', 1)
190190 ,
191191
192- NovaDependencyContainer ::make([
192+ DependencyContainer ::make([
193193 // pivot field rules_all
194194 Select::make('Type', 'type_2')
195195 ->options([
@@ -223,7 +223,7 @@ MorphTo::make('Commentable')->types([
223223 Video::class,
224224]),
225225
226- NovaDependencyContainer ::make([
226+ DependencyContainer ::make([
227227 Text::make('Additional Text', 'additional'),
228228 Boolean::make('Visible', 'visible')
229229])
0 commit comments