public function created(BanContract $ban): void
    {
        $bannable = $ban->bannable()->withBanned()->first();
        $bannable->setBannedFlag($ban->created_at)->save();

        event(new ModelWasBanned($bannable, $ban));
    }
public function created(BanContract $ban): void
    {
        $bannable = $ban->bannable()->withBanned()->first();
        $bannable->setBannedFlag($ban->created_at)->save();

        event(new ModelWasBanned($bannable, $ban));
    }
public function created ( BanContract $ ban ) : void { $ bannable = $ ban -> bannable ( ) -> withBanned ( ) -> first ( ) ; $ bannable -> setBannedFlag ( $ ban -> created_at ) -> save ( ) ; event ( new ModelWasBanned ( $ bannable , $ ban ) ) ; }
Handle the created event for the Ban model.

@param \Cog\Contracts\Ban\Ban $ban
@return void
Handle the created event for the Ban model .