AuthMiddleware
with the key auth
like so:logger()
helperlogger
helper can be used to write debug messages to your logs.logger
function with no arguments. This will get you an instance of the PSR3 compliant logger that is bound to the container. By default Lumberjack uses Monolog\Logger
.Logger
instance is now also bound to the PSR-3 interface Psr\Log\LoggerInterface
in the Container.E_USER_NOTICE
and E_USER_DEPRECATED
errors are now whitelisted from the Exception Handler so that they aren’t fatal.first()
.search
method:App\Http\Controllers\Controller
base class.middleware()
function in your Controller's __constructor()
.has
method only checks whether the config item exists, regardless of its value. app.mySetting
to an empty value such as false
or null
, has('app.mySetting')
will return true
.acf()
method on Rareloop\Lumberjack\Post
. Rareloop\Lumberjack\Post
Rareloop\Router\Router
Rareloop\Router\RouteGroup
Rareloop\Router\Route
7.1
. So make sure your server can handle this version.key
from the container twice. Each time it is resolved, the container will create a new instance of the MyClass
class. If we were to modify $value1
in any way, that change would not persist in $value2
. For example:singleton
method to tell the container to resolve the same instance if there is one.redirect()
- returns a RedirectResponse
back()
- returns a RedirectResponse
which automatically redirects back to the previous URLreport($exception)
- tells the Exception Handler to report an exception. Useful if your theme needs to swallow an exception, but you still want to log the fact that it happenedrequest()
- returns the current ServerRequest
objectsession()
- can be used to interact with the session in various wayssession()
for these examples; make sure you have enabled them if you want to use it too.Zend\Diactoros\ServerRequest
, like so:ServerRequest
class, making it much easier to work with the request. You can access it like so:request()
helper to access the request from anywhere in your theme: