Showing 7 of 1,975 result(s)
…= '') 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...
…'') 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...
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:
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...
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...
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...
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...