Skip to content

Commit

Permalink
Merge pull request #37 from jasonmccuen/feature/add-ability-to-set-re…
Browse files Browse the repository at this point in the history
…source-labels-in-config

Add ability to set resource labels in config
  • Loading branch information
voidgraphics authored Jul 16, 2019
2 parents f09b58e + 9e876a4 commit 2efff6c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pages/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static function softDeletes()
*/
public static function label()
{
return 'nova-pages';
return config('novapage.resource_label') ?? 'nova-pages';
}

/**
Expand All @@ -86,7 +86,7 @@ public static function label()
*/
public static function singularLabel()
{
return 'nova-page';
return config('novapage.resource_singular_label') ?? 'nova-page';
}

/**
Expand Down
20 changes: 20 additions & 0 deletions src/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@
*/
'label' => 'Pages',

/*
|--------------------------------------------------------------------------
| Resource label
|--------------------------------------------------------------------------
|
| Set the displayable label of the resource.
|
*/
'resource_label' => 'nova-pages',

/*
|--------------------------------------------------------------------------
| Resource singular label
|--------------------------------------------------------------------------
|
| Set the displayable singular label of the resource.
|
*/
'resource_singular_label' => 'nova-page',

/*
|--------------------------------------------------------------------------
| Admin tool date formating
Expand Down

0 comments on commit 2efff6c

Please sign in to comment.