Skip to content

Commit ae8d3ff

Browse files
committed
Readme
1 parent d9d361e commit ae8d3ff

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,23 @@ class Project extends Model
143143
return $this->belongsTo(Category::class, 'parent_id');
144144
}
145145

146+
// ...
147+
148+
public static function configureOzuCollectionList(OzuCollectionListConfig $config): OzuCollectionListConfig
149+
{
150+
return $config
151+
// Optionally add a filter for the Project list in the CMS
152+
->declareBelongsToFilter(ozuModelClass: Category::class, label: 'Saison', required: true)
153+
->addColumn(/* ... */);
154+
// ...
155+
}
156+
146157
// ...
147158

148159
public static function configureOzuCollectionForm(OzuCollectionFormConfig $config): OzuCollectionFormConfig
149160
{
150161
return $config
162+
// Add a BelongsTo select field in the Project form in the CMS
151163
->declareBelongsToField(ozuModelClass: Category::class, label: 'Project Category')
152164
->addCustomField(/* ... */);
153165
// ...

0 commit comments

Comments
 (0)