WebDevEtc /
BlogEtc
| 1 | <?php |
||
| 2 | |||
| 3 | namespace WebDevEtc\BlogEtc\Events; |
||
| 4 | |||
| 5 | use Illuminate\Broadcasting\InteractsWithSockets; |
||
| 6 | use Illuminate\Foundation\Events\Dispatchable; |
||
| 7 | use Illuminate\Queue\SerializesModels; |
||
| 8 | use WebDevEtc\BlogEtc\Models\Post; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * Class UploadedImage. |
||
| 12 | */ |
||
| 13 | class UploadedImage |
||
| 14 | { |
||
| 15 | use Dispatchable; |
||
| 16 | use InteractsWithSockets; |
||
| 17 | use SerializesModels; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 18 | |||
| 19 | /** @var Post|null */ |
||
| 20 | public $blogEtcPost; |
||
| 21 | public $image; |
||
| 22 | public $source; |
||
| 23 | public $image_filename; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * UploadedImage constructor. |
||
| 27 | * |
||
| 28 | * @param $image_filename - the new filename |
||
|
0 ignored issues
–
show
|
|||
| 29 | * @param Post $blogEtcPost |
||
| 30 | * @param $image |
||
| 31 | * @param $source string|null the __METHOD__ firing this event (or other string) |
||
| 32 | */ |
||
| 33 | public function __construct( |
||
| 34 | string $image_filename, |
||
| 35 | $image, |
||
| 36 | Post $blogEtcPost = null, |
||
| 37 | string $source = 'other' |
||
| 38 | ) { |
||
| 39 | $this->image_filename = $image_filename; |
||
| 40 | $this->blogEtcPost = $blogEtcPost; |
||
| 41 | $this->image = $image; |
||
| 42 | $this->source = $source; |
||
| 43 | } |
||
| 44 | } |
||
| 45 |