Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyyb authored Jan 6, 2021
1 parent 45bace6 commit a59900d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,31 @@ It provides :
composer require novius/laravel-nova-contexts
```

Add `LaravelNovaContexts` tool to `NovaServiceProvider`:

```php
namespace App\Providers;

use Illuminate\Support\Facades\Gate;
use Laravel\Nova\Cards\Help;
use Laravel\Nova\Nova;
use Laravel\Nova\NovaApplicationServiceProvider;
use Novius\LaravelNovaContexts\LaravelNovaContexts;

class NovaServiceProvider extends NovaApplicationServiceProvider
{
// ...

public function tools()
{
return [
new LaravelNovaContexts(),
];
}
}

```

Override Nova Layout view to add context selector like bellow :

```blade
Expand Down

0 comments on commit a59900d

Please sign in to comment.