Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Listeners;
- use App\Events\CompanyActionlog;
- use Illuminate\Queue\InteractsWithQueue;
- use Illuminate\Contracts\Queue\ShouldQueue;
- class CompanyActionlogHandler extends Handler
- {
- /**
- * Create the event listener.
- */
- public function __construct()
- {
- parent::__construct();
- }
- /**
- * Handle the event.
- *
- * @param CompanyActionlog $event
- * @return void
- */
- public function handle(CompanyActionlog $event)
- {
- if ($this->checkSpamFilter($event)) {
- $this->log->create([
- 'name' => $event->name,
- 'details' => $this->compileDetails($event),
- 'user_id' => $this->sentinel->getUser()->id, // action belongs to
- ]);
- $this->createSpamFilter($event);
- }
- }
- }
Add Comment
Please, Sign In to add comment