How to extend laravel 4 core?
I am a newb learning laravel 4. I want to override specific helper functions. Or add new functions to Url, Str etc. How to do this? Depending on what part of Laravel you want to extend or replace, there are different approaches. Macros Adding functions to Str is really easy, because of "macros": Here's a short example for adding function: Str::macro('test', function($str) { return 'Testing: ' . $str . '!'; }); You can then call this function as expected: echo Str::test('text'); // Outputs "Testing: text!" Adding functions using macros are supported by Str, Form, HTML and Response . IOC Based