Package Data | |
---|---|
Maintainer Username: | shpasser |
Maintainer Contact: | shpasser@gmail.com (Ron Shpasser) |
Package Create Date: | 2014-11-23 |
Package Last Update: | 2015-06-08 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-24 15:02:57 |
Package Statistics | |
---|---|
Total Downloads: | 8,767 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 15 |
Total Watchers: | 5 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Google App Engine(GAE) Support package for Laravel 4.
Currently supported features:
For Laravel 5 see https://github.com/shpasser/GaeSupportL5.
For Lumen see https://github.com/shpasser/GaeSupportLumen.
Pull in the package via Composer.
"require": {
"shpasser/gae-support": "~1.0"
}
Then include the service provider within app/config/app.php
.
'providers' => [
'Shpasser\GaeSupport\GaeSupportServiceProvider'
];
Generate the GAE related files / entries.
php artisan gae:setup --config your-app-id
The default GCS bucket is configured unless a custom bucket id is defined using
the --bucket
option.
php artisan gae:setup --config --bucket="your-bucket-id" your-app-id
The mail driver configuration file can be found at app/config/production/mail.php
,
it is one of many configuration files generated by the artisan command. There is
no need in any kind of custom configuration. All the outgoing mail messages are sent
with sender address of an administrator of the application, i.e. admin@your-app-id.appspotmail.com
.
The sender
, to
, cc
, bcc
, replyTo
, subject
, body
and attachment
parts of email message are supported.
The generated queue configuration file app/config/production/queue.php
should contain:
return array(
'default' => 'gae',
/*
|--------------------------------------------------------------------------
| GAE Queue Connection
|--------------------------------------------------------------------------
|
*/
'connections' => array(
'gae' => array(
'driver' => 'gae',
'queue' => 'default',
'url' => '/tasks',
'encrypt' => true,
),
),
);
The 'default' queue and encryption are used by default.
In order to use the queue your app/routes.php
file should contain the following route:
Route::post('tasks', array('as' => 'tasks',
function()
{
return Queue::marshal();
}));
This route will be used by the GAE queue to push the jobs. Please notice that the route and the GAE Queue Connection 'url' parameter point to the same URL. For more information on the matter please see http://laravel.com/docs/4.2/queues#push-queues.
Download and install GAE SDK for PHP and deploy your app.