Skip to content

Commit

Permalink
Make the path to the cookie-notice.yml configurable (#83)
Browse files Browse the repository at this point in the history
* make the path to the cookie-notice.yml configurable

* tweak comment

---------

Co-authored-by: Martijn Wagena <martijn@concept7.nl>
Co-authored-by: Duncan McClean <duncan@duncanmcclean.com>
  • Loading branch information
3 people authored Jul 18, 2024
1 parent fb67b95 commit 8a2edea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions config/cookie-notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,17 @@
],
],

/*
|--------------------------------------------------------------------------
| Scripts
|--------------------------------------------------------------------------
|
| When you configure scripts in the Control Panel, they get saved to a YAML file.
| By default, this file is saved to the `content` directory. However, you're free to
| change this path if you'd like.
|
*/

'path' => base_path('content/cookie-notice.yaml'),

];
2 changes: 1 addition & 1 deletion src/Scripts/Scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ public static function save(array $data): void

private static function path(): string
{
return base_path('content/cookie-notice.yaml');
return config('cookie-notice.path');
}
}

0 comments on commit 8a2edea

Please sign in to comment.