Skip to content

Commit 6e1a86b

Browse files
rivanuffdtakken
andcommitted
feat: push laravel logger to wp plugins
Co-authored-by: Dik Takken <dik.takken@yard.nl>
1 parent b7369b0 commit 6e1a86b

3 files changed

Lines changed: 859 additions & 932 deletions

File tree

README.md

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
## Requirements
2323

24-
- PHP >= 8.1
25-
- [Acorn](https://github.com/roots/acorn) ^4.3
24+
- PHP >= 8.2
25+
- [Acorn](https://github.com/roots/acorn) ^5.0
2626
- Composer
2727

2828
## Installation
@@ -55,65 +55,65 @@
5555
1. **Child Theme Setup**
5656
- Create a child theme with Sage as the parent theme. See [WordPress Child Themes](https://developer.wordpress.org/themes/advanced-topics/child-themes/#how-to-create-a-child-theme).
5757

58-
Example `style.css`:
59-
60-
```css
61-
/**
62-
* Theme Name: Sage Child Theme
63-
* Template: sage
64-
* Theme URI: https://www.example.com/sage-child/
65-
* Description: Sage child theme
66-
* Version: 1.0.0
67-
* Author: Example Inc.
68-
* Author URI: http://www.example.com/
69-
* Text Domain: sage
70-
* License: MIT License
71-
* License URI: https://opensource.org/licenses/MIT
72-
* Requires PHP: 8.2
73-
* Requires at least: 5.9
74-
*/
75-
```
58+
Example `style.css`:
59+
60+
````css
61+
/**
62+
* Theme Name: Sage Child Theme
63+
* Template: sage
64+
* Theme URI: https://www.example.com/sage-child/
65+
* Description: Sage child theme
66+
* Version: 1.0.0
67+
* Author: Example Inc.
68+
* Author URI: http://www.example.com/
69+
* Text Domain: sage
70+
* License: MIT License
71+
* License URI: https://opensource.org/licenses/MIT
72+
* Requires PHP: 8.2
73+
* Requires at least: 5.9
74+
*/
75+
```
76+
77+
````
7678

7779
- Place your configuration files in `config/` within your child theme directory. These will be merged with the parent configuration where child theme configuration takes precedence. To unset a configuration option from the parent theme in the child theme you can pass an empty array for that configuration option.
7880

7981
2. **Update Acorn Bootloader**
80-
8182
- In your theme's `functions.php`, use the `Yard\Nutshell\bootloader()` helper to bootstrap Acorn with Nutshell's enhancements.
8283

83-
```diff
84-
-\Roots\Acorn\Application::configure()->boot();
85-
+\Yard\Nutshell\bootloader(__DIR__)->boot();
86-
```
84+
```diff
85+
-\Roots\Acorn\Application::configure()->boot();
86+
+\Yard\Nutshell\bootloader(__DIR__)->boot();
87+
```
8788

8889
3. **Update app config**
89-
9090
- In your themes `config/app.php' replace Acorn's ServiceProvider with Nutshell's ServiceProvider
9191

92-
```diff
93-
-use Roots\Acorn\ServiceProvider;
94-
+use Yard\Nutshell\ServiceProvider;
95-
```
92+
```diff
93+
-use Roots\Acorn\ServiceProvider;
94+
+use Yard\Nutshell\ServiceProvider;
95+
```
9696

9797
4. **Register View Composers**
9898
- Add your view composers to `config/view.php` under the `composers` key. Automatic discovery is disabled for explicit control.
9999

100-
```diff
101-
- 'composers' => [],
102-
+ 'composers => [
103-
+ 'app' => App\View\Composers\App::class,
104-
+ 'comments' => App\View\Composers\Comments::class,
105-
+ 'post' => App\View\Composers\Post::class,
106-
+ ],
107-
```
100+
```diff
101+
- 'composers' => [],
102+
+ 'composers => [
103+
+ 'app' => App\View\Composers\App::class,
104+
+ 'comments' => App\View\Composers\Comments::class,
105+
+ 'post' => App\View\Composers\Post::class,
106+
+ ],
107+
```
108108

109109
5. **Register Console Commands**
110110
- Add custom Artisan commands to `config/console.php` under the `commands` key.
111111

112-
```diff
113-
+ 'commands => [
114-
+ 'test' => App\Console\Commands\Test::class,
115-
+ ],
116-
```
112+
```diff
113+
+ 'commands => [
114+
+ 'test' => App\Console\Commands\Test::class,
115+
+ ],
116+
```
117117

118118
6. **Vite Integration**
119119
- Vite is enabled by default. Use the provided `Yard\Nutshell\Assets\Vite` class for asset management.
@@ -132,4 +132,3 @@
132132
## About us
133133

134134
[![banner](https://raw.githubusercontent.com/yardinternet/.github/refs/heads/main/profile/assets/small-banner-github.svg)](https://www.yard.nl/werken-bij/)
135-

0 commit comments

Comments
 (0)