PHP code example of nmc / laravel-cloud-tasks
1. Go to this page and download the library: Download nmc/laravel-cloud-tasks library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nmc / laravel-cloud-tasks example snippets
use Nmc\CloudTasks\Http\Middleware\VerifyCloudTasksToken;
return [
'middleware' => ['api', VerifyCloudTasksToken::class],
'queue' => [
'driver' => 'cloud-tasks',
'project' => env('CLOUD_TASKS_PROJECT_ID'),
'location' => env('CLOUD_TASKS_LOCATION'),
'queue' => env('CLOUD_TASKS_QUEUE', 'default'),
'handler_url' => env('CLOUD_TASKS_HANDLER_URL', env('APP_URL') . '/cloud-tasks-handler'),
'credentials' => env('CLOUD_TASKS_CREDENTIALS', config_path('credentials.json')),
'auth' => [
'enabled' => env('CLOUD_TASKS_AUTH_ENABLED', true),
'allowed_emails' => env('CLOUD_TASKS_AUTH_ALLOWED_EMAILS', null),
'service_account_email' => env('CLOUD_TASKS_SERVICE_ACCOUNT_EMAIL'),
'audience' => env('CLOUD_TASKS_AUDIENCE'),
],
'after_commit' => false,
]
];
bash
php artisan vendor:publish --provider="Nmc\CloudTasks\CloudTasksServiceProvider" --tag="cloud-tasks-config"