Search

Showing 7 of 1,975 result(s)

/blog/2016/11/20/laravel-application-helper-public_path

…= '') The public_path will return the path to the public directory. It can also be used to construct paths relative to the public directory if a $path is supplied. The following examples will assume that the Laravel application is installed in...

/blog/2016/11/20/laravel-application-helper-storage_path

…'') The storage_path will return the path to the storage directory. It can also be used to construct paths relative to the storage directory if a $path is supplied. The following examples will assume that the Laravel application is installed in...

/blog/2016/11/20/laravel-helper-function-session#content-setting-a-session-value

The session function allows setting session values directly by passing in an array of key/value pairs. The following example demonstrates this: Setting single session values is also possible:

/blog/2016/11/20/laravel-helper-function-session#content-retrieving-a-session-value

Values can be retrieved with the session function by supplying a $key . To retrieve the test value from the earlier example the function call would look like so: It is possible that a session value does not exist. When this is the case, the...

/blog/2016/11/21/laravel-miscellaneous-helper-function-value

value($value) The value function will return the default value of the supplied $value . Although this sounds redundant, if the supplied $value is an instance of the Closure class, the function will be executed and the value will be returned. If...

/blog/2016/11/21/laravel-router-helper-function-get

get($uri, $action) The get function is a shortcut to registering a route with the router that responds to the GET HTTP verb. The $uri is the URI of the route, such as / or login . The $action is what will be executed by the router when the route...

/blog/2016/11/21/laravel-router-helper-function-patch

patch($uri, $action) The patch function is a shortcut to registering a route with the router that responds to the PATCH HTTP verb. The $uri is the URI of the route, such as / or login . The $action is what will be executed by the router when the...