Tutorial (2)

Laravel 5.5 – Localization from scratch

Hi, in this post I will show how you can use localization, remember that there more than one way to do it. For example, you can make a Middleware to handle the localization from User preferences, you can get the localization from specific route, from GeoLocalization, etc…

In our example we will make a middleware to check if a session has locale and if had, the middleware will change the locale of your app and we will make some routes only to test it.

First step, create a fresh installation of Laravel let’s do it, open your terminal and type:

How to do a simple Audit System in Laravel 5.5

Well, in this post I will show how I made a simple audit system using the jenssegers/agent package to get us the stats of system.

To begin, we will need to define what our system will track, in my case I needed log every access to system and track:

  • user
  • method / verb
  • path / uri
  • querystring
  • userAgent
  • ip
  • device
  • platform
  • browser
  • isDesktop
  • isMobile
  • isTablet
  • timestamps