efficiently / larasset

Larasset is a library for Laravel 4, 5.0, 5.1, 5.2 and 5.3 which manage assets in an easy way
http://laravel.io/forum/07-18-2014-package-larasset-asset-pipeline-the-ultimate-front-end-tool
MIT License
67 stars 5 forks source link

humanize function not found #15

Closed FiloSpaTeam closed 9 years ago

FiloSpaTeam commented 9 years ago

When i use image_tag, i have this in console: err

tortuetorche commented 9 years ago

Hi @FiloSpaTeam,

You're right, I'm going to add this helper.

Cheers, Tortue Torche

FiloSpaTeam commented 9 years ago

;-) I found this function and added in my global.php

    function humanize($str) {

    $str = trim(strtolower($str));
    $str = preg_replace('/[^a-z0-9\s+]/', '', $str);
    $str = preg_replace('/\s+/', ' ', $str);
    $str = explode(' ', $str);

    $str = array_map('ucwords', $str);

    return implode(' ', $str);
    }
tortuetorche commented 9 years ago

Good catch, but it'll be easier for other users to have it bundled into Larasset.

FiloSpaTeam commented 9 years ago

yeah ;D when bundled, i'll remove my function! thanks!

FiloSpaTeam commented 9 years ago

Thanks! :dancer:

tortuetorche commented 9 years ago

You're welcome, I'm going to backport this fix for Larasset 0.9 and 1.0