@@ -50,7 +50,7 @@ The package will pick up on the scheduled settings and ping OhDear after the com
50
50
51
51
# Requirements
52
52
53
- This package requires Laravel 10 or 11 .
53
+ This package requires Laravel 11 or 12 .
54
54
55
55
# Installation
56
56
@@ -128,9 +128,6 @@ public function boot()
128
128
129
129
To circumvent this, please add the following to ` bootstrap/app.php `
130
130
131
- <details >
132
- <summary >Laravel 11</summary >
133
-
134
131
``` php
135
132
<?php
136
133
@@ -156,42 +153,11 @@ return Application::configure(basePath: dirname(__DIR__))
156
153
})->create();
157
154
158
155
```
159
- </details >
160
-
161
- <details >
162
- <summary >Laravel 10</summary >
163
-
164
- ``` php
165
- <?php
166
-
167
- /*
168
- |--------------------------------------------------------------------------
169
- | Create The Application
170
- |--------------------------------------------------------------------------
171
- |
172
- | The first thing we will do is create a new Laravel application instance
173
- | which serves as the "glue" for all the components of Laravel, and is
174
- | the IoC container for the system binding all of the various parts.
175
- |
176
- */
177
-
178
- $app = new Illuminate\Foundation\Application(
179
- $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
180
- );
181
-
182
- + if (($_SERVER['REQUEST_URI'] ?? '') === '/cloud-scheduler-job') {
183
- + $_ENV['APP_RUNNING_IN_CONSOLE'] = true;
184
- + }
185
- ```
186
- </details >
187
156
188
157
6 - Optional: whitelist route for maintenance mode
189
158
190
159
If you want to allow jobs to keep running if the application is down (` php artisan down ` ), update the following:
191
160
192
- <details >
193
- <summary >Laravel 11</summary >
194
-
195
161
``` php
196
162
return Application::configure(basePath: dirname(__DIR__))
197
163
->withRouting(
@@ -212,31 +178,6 @@ return Application::configure(basePath: dirname(__DIR__))
212
178
213
179
214
180
```
215
- </details >
216
- <details >
217
- <summary >Laravel 10</summary >
218
-
219
- ``` php
220
- <?php
221
-
222
- namespace App\Http\Middleware;
223
-
224
- use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
225
-
226
- class PreventRequestsDuringMaintenance extends Middleware
227
- {
228
- /**
229
- * The URIs that should be reachable while maintenance mode is enabled.
230
- *
231
- * @var array
232
- */
233
- protected $except = [
234
- + '/cloud-scheduler-job',
235
- ];
236
- }
237
-
238
- ```
239
- </details >
240
181
241
182
# Cloud Scheduler Example
242
183
0 commit comments