Support the ongoing development of →
Views Blade
Last updated 2 years ago.

I like it, especially because if you're using a helper class, because you can use a syntax like this:

    {{ $formHelper->years(1997, 2007) }}
Last updated 2 years ago.

I think I'd still prefer using a macro.

HTML::macro('human_size', function($bytes)
    $units = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB'];
    for ($i = 0; $bytes > 1024; $i++) {
        $bytes /= 1024;
    return round($bytes, 2).' '.$units[$i];

and then calling

{{ HTML::human_size('123456789') }}
Last updated 2 years ago.

Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.