Skip to content

Commit 8f0ceb5

Browse files
committed
Readme Cleanup
1 parent 9171d5b commit 8f0ceb5

1 file changed

Lines changed: 23 additions & 30 deletions

File tree

README.md

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Nova Inline Relationship
22

33
## Introduction
4-
Nova Inline Relationship is meant to present a relationship based property as an inline property for a Laravel Nova Resource. This project is under active development, and currently only supports singular relationships. You are welcome to request or contribute by opening an issue.
4+
Nova Inline Relationship is meant to present a relationship based property as an inline property for a Laravel Nova Resource. You are welcome to request or contribute by opening an issue.
55

66
![Nova Inline Relationship](screenshots/NovaInlineRelationship.png "Nova Inline Relationship")
77

@@ -22,7 +22,7 @@ composer require kirschbaum-development/nova-inline-relationship
2222
After installation, your model should include the `KirschbaumDevelopment\NovaInlineRelationship\Traits\HasRelatedAttributes` trait and you must implement the `KirschbaumDevelopment\NovaInlineRelationship\Contracts\MappableRelationships` Contract.
2323

2424
You must also define a static `getPropertyMap` function in the model which should return the required list of properties from your related models you want to show inline.
25-
In this example `Employee` model has two related models `EmployeProfile` and `EmployeeBill`
25+
In this example `Employee` model has two related models `EmployeeProfile` and `EmployeeBill`
2626

2727
```php
2828
use KirschbaumDevelopment\NovaInlineRelationship\Traits\HasRelatedAttributes;
@@ -236,29 +236,6 @@ You can pass on following items for your related model's attributes:-
236236
5. `placeholder`: A placeholder for your field.
237237
6. `options`: Additional options for your components
238238

239-
### Select Component
240-
To pass dropdown options to your select component, pass an array of key values to options
241-
```php
242-
'component => Select::class,
243-
'options' => [
244-
'options' => [
245-
['label' => 'Yes', 'value' => true],
246-
['label' => 'No', 'value' => false],
247-
],
248-
]
249-
```
250-
251-
### Number/Currency Component
252-
You can pass `min`, `max` and `step` to number and currency field
253-
```php
254-
'component' => Currency::class,
255-
'options' => [
256-
'min' => 0,
257-
'max' => 100,
258-
'step' => 10,
259-
],
260-
```
261-
262239
## Supported fields
263240

264241
You can use any field you can add to your Nova resource with `Field::make` syntax. The following native Nova 2.0 fields are confirmed to work.
@@ -282,12 +259,28 @@ You can use any field you can add to your Nova resource with `Field::make` synta
282259
- Image Field
283260
- File Field
284261

285-
**_NOTE:_** You can pass any additional arguments (like options for your select field) with your settings map using `options`.
286-
287-
## Things to Fix
262+
### Select Component
263+
To pass dropdown options to your select component, pass an array of key values to options
264+
```php
265+
'component => Select::class,
266+
'options' => [
267+
'options' => [
268+
['label' => 'Yes', 'value' => true],
269+
['label' => 'No', 'value' => false],
270+
],
271+
]
272+
```
288273

289-
1. ~~Currently for all three file field (File, Image and Avatar) File deletion is not working.~~
290-
2. ~~relationship names with underscore might cause some issues returning values correctly.~~
274+
### Number/Currency Component
275+
You can pass `min`, `max` and `step` to number and currency field
276+
```php
277+
'component' => Currency::class,
278+
'options' => [
279+
'min' => 0,
280+
'max' => 100,
281+
'step' => 10,
282+
],
283+
```
291284

292285
## Changelog
293286

0 commit comments

Comments
 (0)