Skip to content

Commit

Permalink
config file publish added
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmuhittin committed Mar 25, 2019
1 parent eb85c84 commit d3a2cf3
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Nova Scroll Top
On route change scroll to the top of the page. You can install this package via:<br>
`` composer require tanmuhittin/nova-scroll-top ``
On route change scroll to the top of the page. On 422 error scroll to the first erroneous field.<br> You can install this package via:<br>
`` composer require tanmuhittin/nova-scroll-top ``

If you do not want to use scroll to erroneous field trait or scroll to the top on page load trait you can set this on config file. First publish it via:<br>
`` php artisan vendor:publish --provider=TanMuhittin\NovaScrollTop\ScrollTopServiceProvider ``

```
/**
* Scroll to the top of the page on route change
*/
'on_route_change' => true,
/**
* Scroll to the first erroneous field on 422 ajax errors
*/
'on_error' => true,
```

0 comments on commit d3a2cf3

Please sign in to comment.