for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* rmarchiv.tk
* (c) 2016-2017 by Marcel 'ryg' Hering
*/
namespace App\Listeners;
use Carbon\Carbon;
use App\Events\Obyx;
class ObyxListener
{
/**
* Create the event listener.
*
* @return void
@return
Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.
Please refer to the PHP core documentation on constructors.
public function __construct()
//
}
* Handle the event.
* @param Obyx $event
public function handle(Obyx $event)
$obyx = \DB::table('obyx')
->where('reason', '=', $event->reason)
->first();
\DB::table('user_obyx')->insert([
'user_id' => $event->user_id,
'obyx_id' => $obyx->id,
'created_at' => Carbon::now(),
]);
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.