Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Table Bundle Laravel Package

araise/table-bundle

View on GitHub
Deep Wiki
Context7

Formatter

Formatter are simple classes to convert a given variable to a string.

You can create your own formatter (you must implement araise\CoreBundle\Formatter\FormatterInterface or extend araise\CoreBundle\Formatter\AbstractFormatter) and add the full class name of your formatter to the options array of a content element.

Register

Your formatters needs to be registered as service with the tag core.formatter. For example:

    Acme\AppBundle\Formatter\:
        resource: '../../Formatter'
        tags:
            - core.formatter

EmailFormatter

<?php

namespace araise\CoreBundle\Formatter;

class EmailFormatter extends AbstractFormatter
{
    /**
     * {[@inheritdoc](https://github.com/inheritdoc)}
     */
    public static function getString($value)
    {
        if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
            return '';
        }

        return $value;
    }

    /**
     * {[@inheritdoc](https://github.com/inheritdoc)}
     */
    public static function getHtml($value)
    {
        if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
            return '';
        }

        return sprintf(
            '<a href="mailto:%s" title="E-Mail senden">%s</a>',
            $value,
            $value
        );
    }
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator