Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Turn possible to pass a list of jobs on the make:operation #38

Merged

Conversation

XavierTecBr
Copy link

Turn possible to pass a list of jobs on the make:operation and create it
with all necessary "use" and "$this->run()" following the order of jobs
names.

Examples:

./vendor/bin/lucid make:operation DefaultStore  Deadline 'App\Domains\Common\Jobs\ValidateStoreJob' 'App\Domains\Common\Jobs\StoreJob'

Generating code below

run(ValidateStoreJob::class); $this->run(StoreJob::class);     } }

with all necessary "use" and "$this->run()" following the order of jobs
names.

Examples:

./vendor/bin/lucid make:operation DefaultStore  Deadline 'App\Domains\Common\Jobs\ValidateStoreJob' 'App\Domains\Common\Jobs\StoreJob'

Generating code below

<?php
namespace App\Services\Deadline\Operations;

use Lucid\Foundation\Operation;
use Illuminate\Http\Request;
use App\Domains\Common\Jobs\ValidateStoreJob;
use App\Domains\Common\Jobs\StoreJob;

class DefaultStoreOperation extends Operation
{
    public function handle(Request $request)
    {
		$this->run(ValidateStoreJob::class);

		$this->run(StoreJob::class);
    }
}
@Mulkave Mulkave merged commit c310e00 into lucidarch:master Feb 17, 2020
@Mulkave
Copy link
Member

Mulkave commented Feb 17, 2020

Would be great if you add these instructions to README so that others know about it too. Thanks a lot!

@Mulkave
Copy link
Member

Mulkave commented Feb 17, 2020

This will be available in v6.0.1 of this package so run a composer update lucid-arch/laravel-console in your L6 project to have it!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants