Hello Masonite Newsletter #3
Hello 👋
I hope you've had a great week, so far.
Here's what I've got for you today:
Articles
Package
Did you know?
Middleware is a way to filter the incoming HTTP requests. A middleware sits in the middle of every web request & response. It can act as a guardian for example by denying access for non authenticated users.
Maybe you want to log all incoming requests in your Masonite application. Just create a new middleware with craft middleware command and add something like below:
from masonite.logging import Logger
from masonite.request import Request
class HttpLoggerMiddleware:
"""HttpLogger Middleware."""
def __init__(self, request: Request, logger: Logger):
self.request = request
logger.info('Dump request...')
This is the most easiest way. You can have more information in the Masonite documentation
News
We're working on a new package for Masonite: Internationalization aka I18n. You will be able to translate your application to a single custom language other than English. If you have a request, suggestion or anything in mind, feel free to respond to this email.
Have a great week,
Please be safe and take precautions.... and wash your hands.
From all of us at Hello Masonite.