laravel fire event
event(new OrderShipped($order));
laravel fire event
event(new OrderShipped($order));
laravel event listener
php artisan event:generate
event and listener in laravel
// 'src/Events/PostWasCreated.php'
<?php
namespace JohnDoe\BlogPackage\Events;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use JohnDoe\BlogPackage\Models\Post;
class PostWasCreated
{
use Dispatchable, SerializesModels;
public $post;
public function __construct(Post $post)
{
$this->post = $post;
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us