Skip to content
Merged

4.x #37

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 1 addition & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The package will pick up on the scheduled settings and ping OhDear after the com

# Requirements

This package requires Laravel 10 or 11.
This package requires Laravel 11 or 12.

# Installation

Expand Down Expand Up @@ -128,9 +128,6 @@ public function boot()

To circumvent this, please add the following to `bootstrap/app.php`

<details>
<summary>Laravel 11</summary>

```php
<?php

Expand All @@ -156,42 +153,11 @@ return Application::configure(basePath: dirname(__DIR__))
})->create();

```
</details>

<details>
<summary>Laravel 10</summary>

```php
<?php

/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/

$app = new Illuminate\Foundation\Application(
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);

+ if (($_SERVER['REQUEST_URI'] ?? '') === '/cloud-scheduler-job') {
+ $_ENV['APP_RUNNING_IN_CONSOLE'] = true;
+ }
```
</details>

6 - Optional: whitelist route for maintenance mode

If you want to allow jobs to keep running if the application is down (`php artisan down`), update the following:

<details>
<summary>Laravel 11</summary>

```php
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
Expand All @@ -212,31 +178,6 @@ return Application::configure(basePath: dirname(__DIR__))


```
</details>
<details>
<summary>Laravel 10</summary>

```php
<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;

class PreventRequestsDuringMaintenance extends Middleware
{
/**
* The URIs that should be reachable while maintenance mode is enabled.
*
* @var array
*/
protected $except = [
+ '/cloud-scheduler-job',
];
}

```
</details>

# Cloud Scheduler Example

Expand Down