public function creating(BanContract $ban): void
    {
        $bannedBy = auth()->user();
        if ($bannedBy && is_null($ban->created_by_type) && is_null($ban->created_by_id)) {
            $ban->fill([
                'created_by_type' => $bannedBy->getMorphClass(),
                'created_by_id' => $bannedBy->getKey(),
            ]);
        }
    }
public function creating(BanContract $ban): void
    {
        $bannedBy = auth()->user();
        if ($bannedBy && is_null($ban->created_by_type) && is_null($ban->created_by_id)) {
            $ban->fill([
                'created_by_type' => $bannedBy->getMorphClass(),
                'created_by_id' => $bannedBy->getKey(),
            ]);
        }
    }
public function creating ( BanContract $ ban ) : void { $ bannedBy = auth ( ) -> user ( ) ; if ( $ bannedBy && is_null ( $ ban -> created_by_type ) && is_null ( $ ban -> created_by_id ) ) { $ ban -> fill ( [ 'created_by_type' => $ bannedBy -> getMorphClass ( ) , 'created_by_id' => $ bannedBy -> getKey ( ) , ] ) ; } }
Handle the creating event for the Ban model.

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