Download the PHP package calebporzio/awesome-helpers without Composer
On this page you can find all versions of the php package calebporzio/awesome-helpers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download calebporzio/awesome-helpers
More information about calebporzio/awesome-helpers
Files in calebporzio/awesome-helpers
Package awesome-helpers
Short Description Helper functions I find super-duper handy
License MIT
Homepage https://github.com/calebporzio/awesome-helpers
Informations about the package awesome-helpers
A collection of awesome helpful functions for Laravel
Installation
Helpers
carbon
Shortcut for: new Carbon
or Carbon::parse()
chain
Makes an ordinary object chainable.
connection
Run callback under a different database connection.
dump_sql
Returns sql query with bindings data.
faker
Shortcut for: $faker = Faker\Factory::create()
user
A shortcut for auth()->user()
money
ok
Shortcut for response('', 204)
. When you don't have anything to return from an endpoint, but you want to return success.
stopwatch
Returns the amount of time (in seconds) the provided callback took to execute. Useful for debugging and profiling.
str_between
Returns string between second argument
str_extract
Returns capture groups contained in the provided regex pattern.
str_match
Checks the provided string against the provided regex pattern.
str_validate
A simple way to use validate a string using Laravel's built-in validation system.
str_wrap
swap
This function swaps the values of two variables.
tinker
Kind of like dd()
, but will open an artisan tinker
terminal session with the variables you passed in, so you can play around.
Am I missing an awesome helper function?
Submit a PR or issue with helper functions you use or ideas you have for others!
TTFN, Caleb