for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Innoflash\Events\Listeners\Guest\Saved;
use Illuminate\Contracts\Queue\ShouldQueue;
use Innoflash\Events\Events\Guest\Saved;
use Intervention\Image\ImageManager;
class ProcessImage implements ShouldQueue
{
protected $imageManager;
/**
* Create the event listener.
*
* @return void
*/
public function __construct(ImageManager $imageManager)
$this->imageManager = $imageManager;
}
* Handle the event.
* @param Saved $event
public function handle(Saved $event)
if ($event->getGuest()->image()->exists()) {
$ogImage = storage_path('app/public/events/original/').$event->getGuest()->image->name;
image
Innoflash\Events\Models\Guest
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.
$thumb100 = storage_path('app/public/events/50-50/').$event->getGuest()->image->name;
$this->imageManager->make($ogImage)->fit(50, 50, function ($constraint) {
$constraint->upsize();
$constraint->aspectRatio();
}, 'center')->save($thumb100);
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.