Helpers library

Note: this information is not available in the official docs, I found it by browsing through the source of laravel which I highly recomend for a better understanding of the framework.

The class is under laravel folder / helpers.php. I will not list all functions, only those I found very useful:

To retrieve a language line:


To dump a value and exit:


To remove an array item with “dot” notation:

array_forget($array, '');

Convert an Eloquent model to JSON object:


Get the file size of a file in a human readable form (Bytes, KiB etc):


And many more, feel free to explore, the library and the whole framework is very well commented.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s