PHPackages                             eureciclo/gae-support-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. eureciclo/gae-support-laravel

ActiveLibrary[Framework](/categories/framework)

eureciclo/gae-support-laravel
=============================

Google App Engine (Standard and Flexible Environment) runtime support for Laravel apps.

v10.0.1(1y ago)01.3kMITPHPPHP ^8.3

Since Jun 8Pushed 1y agoCompare

[ Source](https://github.com/eureciclo/GaeSupportLaravel)[ Packagist](https://packagist.org/packages/eureciclo/gae-support-laravel)[ RSS](/packages/eureciclo-gae-support-laravel/feed)WikiDiscussions dev-master Synced 1mo ago

READMEChangelog (3)Dependencies (22)Versions (75)Used By (0)

GaeSupportLaravel
=================

[](#gaesupportlaravel)

Google App Engine (GAE) Standard Environment support package for **Laravel 9.x**.

[![Latest Stable Version](https://camo.githubusercontent.com/116e38a4c2bda3a1789b371f1bdd2e7f65693bcd8ecf703ba2622cdbcacad42a/68747470733a2f2f706f7365722e707567782e6f72672f6131636f6d6d732f6761652d737570706f72742d6c61726176656c2f762f737461626c65)](https://packagist.org/packages/a1comms/gae-support-laravel)[![Monthly Downloads](https://camo.githubusercontent.com/ab67ace426c81aeb39070847dedd6bb024d2bcad4f636eba82d23927506499d2/68747470733a2f2f706f7365722e707567782e6f72672f6131636f6d6d732f6761652d737570706f72742d6c61726176656c2f642f6d6f6e74686c79)](https://packagist.org/packages/a1comms/gae-support-laravel)[![Total Downloads](https://camo.githubusercontent.com/a6b1ed29c5618c276ffe147bc2c03f0ff467c9f1e7cba4c1e8931d4d9c7d513c/68747470733a2f2f706f7365722e707567782e6f72672f6131636f6d6d732f6761652d737570706f72742d6c61726176656c2f646f776e6c6f616473)](https://packagist.org/packages/a1comms/gae-support-laravel)[![Latest Unstable Version](https://camo.githubusercontent.com/2bc438a3b78d03651240ac4e95d3457a3ab304b44f02d6162969ddc1561b3a71/68747470733a2f2f706f7365722e707567782e6f72672f6131636f6d6d732f6761652d737570706f72742d6c61726176656c2f762f756e737461626c65)](https://packagist.org/packages/a1comms/gae-support-laravel)[![License](https://camo.githubusercontent.com/fa3cdf0b3ce0164151b9a4f89c9bd608c1852856490b17e62e681446ebf5a644/68747470733a2f2f706f7365722e707567782e6f72672f6131636f6d6d732f6761652d737570706f72742d6c61726176656c2f6c6963656e7365)](https://packagist.org/packages/a1comms/gae-support-laravel)

Based on original work for App Engine Standard (on the PHP5.5 runtime) by @shpasser

*Note: we only intend to support Laravel LTS releases, with this version targeted specifically at **Laravel 9.x***

Functionality
-------------

[](#functionality)

- StackDriver Logging integration
- StackDriver Trace integration (see [docs/trace.md](https://github.com/a1comms/GaeSupportLaravel/blob/php7.4-laravel6.0/docs/trace.md))
- Blade View Pre-Compiler (optional, see [docs/blade-pre-compile.md](https://github.com/a1comms/GaeSupportLaravel/blob/php7.4-laravel6.0/docs/blade-pre-compile.md))
- Guzzle integration (optional, see [docs/trace.md](https://github.com/a1comms/GaeSupportLaravel/blob/php7.4-laravel6.0/docs/trace.md#guzzle))
- Laravel Auth Integration for IAP (optional, see [docs/iap-auth-verify.md](https://github.com/a1comms/GaeSupportLaravel/blob/php7.4-laravel6.0/docs/iap-auth-verify.md))
- Queue Driver for Cloud Tasks (optional, see [docs/queue.md](https://github.com/a1comms/GaeSupportLaravel/blob/php7.4-laravel6.0/docs/queue.md))
- Examples for deployment from Git via Cloud Build, plus encrypted secrets with KMS (optional, see [docs/cloudbuild.md](https://github.com/a1comms/GaeSupportLaravel/blob/php7.4-laravel6.0/docs/cloudbuild.md))

Installation
------------

[](#installation)

Pull in the package via Composer:

```
"require": {
    "a1comms/gae-support-laravel": "~9.0"
}
```

### Laravel Specific (Not Lumen)

[](#laravel-specific-not-lumen)

**1.** Add the following to `composer.json`:

```
    "scripts": {
        "post-autoload-dump": [
            "php artisan gae:prepare"
        ]
    },
```

**2.** For Laravel, include the service provider within `config/app.php`:

```
    'providers' => [
        A1comms\GaeSupportLaravel\GaeSupportServiceProvider::class,
    ];
```

**3.** Also, for added functionality, include the optional service providers:

```
    'providers' => [
        A1comms\GaeSupportLaravel\Auth\AuthServiceProvider::class,
        A1comms\GaeSupportLaravel\View\ViewServiceProvider::class,
        A1comms\GaeSupportLaravel\Queue\QueueServiceProvider::class,
        A1comms\GaeSupportLaravel\Trace\TraceServiceProvider::class,
    ];
```

And remove the relevant Laravel service providers that these replace:

```
    'providers' => [
        //Illuminate\View\ViewServiceProvider::class,
        //Illuminate\Queue\QueueServiceProvider::class,
    ];
```

**4.** Update `bootstrap/app.php` to load the overridden application class &amp; initialise logging to Stackdriver:

```
/*
|--------------------------------------------------------------------------
| 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 A1comms\GaeSupportLaravel\Foundation\Application(
    $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);
```

**5.** Update `app/Exceptions/Handler.php` to enable proper Exception logging to StackDriver Error Reporting &amp; Logging:

Change the following `use` statement:

```
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
```

To our class, that'll inject the required logging hook:

```
use A1comms\GaeSupportLaravel\Foundation\Exceptions\Handler as ExceptionHandler;
```

**6.** In `config/logging.php`, configure a custom logger and set it as the default:

*It's also useful to set the emergency log path to a location App Engine will forward to Stackdriver Logging, see below.*

```
