Skip to content

Commit 3fabee1

Browse files
committed
add readme
1 parent b388c58 commit 3fabee1

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Nova Settings
2+
Add Settings via code and edit with Nova.
3+
## Requirements
4+
* Laravel Nova
5+
## Installation
6+
@Todo
7+
## Usage
8+
After installing the tool you need to add it to your nova tools.
9+
```php
10+
public function tools()
11+
{
12+
return [
13+
//...
14+
new \Bambamboole\NovaSettings\NovaSettings(),
15+
//...
16+
];
17+
}
18+
```
19+
Now you can add Sections and Fields in your Service Providers `boot` method.
20+
```php
21+
public function boot()
22+
{
23+
$settingsManager = $this->app->get(NovaSettingsManager::class);
24+
25+
$settingsManager->addSection('Company', 'Details about the company');
26+
$settingsManager->addField('Company Name', 'text', 'company', 'the full company name');
27+
}
28+
```
29+
Current possible types are `text` and `time`.
30+
31+
## Roadmap
32+
* Native Nova Fields
33+
* Validation
34+
* Scopes

0 commit comments

Comments
 (0)