Skip to content

Instantly share code, notes, and snippets.

@pyaesone17
Last active February 7, 2018 13:42
Show Gist options
  • Save pyaesone17/087ec4f90c8c294a68c7f1a6c78b3469 to your computer and use it in GitHub Desktop.
Save pyaesone17/087ec4f90c8c294a68c7f1a6c78b3469 to your computer and use it in GitHub Desktop.

Revisions

  1. pyaesone17 revised this gist Feb 7, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions .php
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@
    use Illuminate\Contracts\Queue\ShouldQueue;
    use Illuminate\Foundation\Bus\Dispatchable;

    class ProcessPodcast implements ShouldQueue
    class WelcomeEmailJob implements ShouldQueue
    {
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    @@ -28,6 +28,6 @@ public function __construct(User $user)

    public function handle()
    {
    // Process uploaded podcast...
    \Log::info("Send user email");
    }
    }
  2. pyaesone17 created this gist Feb 7, 2018.
    33 changes: 33 additions & 0 deletions .php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    <?php

    namespace App\Jobs;

    use App\User;
    use Illuminate\Bus\Queueable;
    use Illuminate\Queue\SerializesModels;
    use Illuminate\Queue\InteractsWithQueue;
    use Illuminate\Contracts\Queue\ShouldQueue;
    use Illuminate\Foundation\Bus\Dispatchable;

    class ProcessPodcast implements ShouldQueue
    {
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    protected $user;

    /**
    * Create a new job instance.
    *
    * @param Podcast $podcast
    * @return void
    */
    public function __construct(User $user)
    {
    $this->user = $user;
    }

    public function handle()
    {
    // Process uploaded podcast...
    }
    }