Skip to content

Commit

Permalink
Fixed Queue Issue
Browse files Browse the repository at this point in the history
Also added PSR-2 to all files
  • Loading branch information
iwasherefirst2 committed Oct 9, 2019
1 parent 567e720 commit 641c8c0
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 240 deletions.
8 changes: 4 additions & 4 deletions src/Facades/MultiMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

class MultiMail extends Facade
{
protected static function getFacadeAccessor()
{
return 'iwasherefirst2-laravelmultimail';
}
protected static function getFacadeAccessor()
{
return 'iwasherefirst2-laravelmultimail';
}
}
7 changes: 4 additions & 3 deletions src/Jobs/SendMailJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
namespace IWasHereFirst2\LaravelMultiMail\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use IWasHereFirst2\LaravelMultiMail\MultiMailer;

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

protected $mailer_name;

protected $mailable;

/**
Expand All @@ -34,6 +35,6 @@ public function __construct($mailer_name, $mailable)
*/
public function handle()
{
MultiMailer::send($this->mailer_name, $this->mailable);
MultiMailer::sendMail($this->mailable, $this->mailer_name);
}
}
7 changes: 3 additions & 4 deletions src/MultiMailServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class MultiMailServiceProvider extends ServiceProvider
*/
public function register()
{
//
}

/**
Expand All @@ -23,12 +22,12 @@ public function register()
*/
public function boot()
{
$this->app->bind('iwasherefirst2-laravelmultimail', function() {
return new MultiMailer();
$this->app->bind('iwasherefirst2-laravelmultimail', function () {
return new MultiMailer();
});

$this->publishes([
dirname(__DIR__) . '/publishable/config/multimail.php' => config_path('multimail.php'),
dirname(__DIR__) . '/publishable/config/multimail.php' => config_path('multimail.php'),
]);
}
}
Loading

0 comments on commit 641c8c0

Please sign in to comment.