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:

__($line);

To dump a value and exit:

dd($value);

To remove an array item with “dot” notation:

array_forget($array, 'user.data.name');

Convert an Eloquent model to JSON object:

eloquent_to_json($model);

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

get_file_size($size);

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