Nova dashboards provide a convenient way to build information overview pages that contain a variety of metrics and cards.
App\Nova\Dashboards\Main
dashboard class containing a cards
method. You can customize which cards are present on the default dashboard via this method:
nova:dashboard
Artisan command. By default, all new dashboards will be placed in the app/Nova/Dashboards
directory:
cards
method. This method should return an array of card or metric classes:
name
method within your dashboard class:
uriKey
method. Of course, the URI represents the browser location that Nova will navigate to in when you click on the dashboard link in the left-side navigation bar:
dashboards
method of your application’s App/Providers/NovaServiceProvider
class. Once you have added the dashboard to this method, it will become available for navigation in Nova’s left-side navigation bar:
menu
method on your dashboard class:
showRefreshButton
method on the dashboard instance:
canSee
method when registering your dashboard. The canSee
method accepts a closure which should return true
or false
. The closure will receive the incoming HTTP request:
Authorizable
trait’s can method on our User
model to determine if the authorized user is authorized for the viewUserInsights
action. However, since proxying to authorization policy methods is a common use-case for canSee
, you may use the canSeeWhen
method to achieve the same behavior. The canSeeWhen
method has the same method signature as the Illuminate\Foundation\Auth\Access\Authorizable
trait’s can
method: