Free 20-minute strategy call with a senior engineer: AI, payments, eLearning or custom software
Engineering

What’s New in Laravel: Structure, Routing & Validation

What’s New in Laravel: Structure, Routing & Validation

In short

New features in Laravel 5: the reorganised directory structure, middleware, route caching, the Laravel Scheduler and Form Request validation.

  1. Directory structure

significantly different from the previous versions. config /, database /, storage / and resources / (includes the old app / views / and app / lang /) are now located outside of app / and directories within app / were fine divided into folders with a capital letter beginning: Commands /, Console /, Events /, exception /, handler / Http / (includes routes.php), provider /, Services /

  1. Middlewares

Allow the request (Request) before and change after editing. This functionality has been taken over by the filter (in filters.php). The new approach is simpler, cleaner and more flexible.

  1. Route Caching

Command artisan route: cache now allows caching all Routes (routes.php). These must not be parsed on each page view. This can greatly reduce the load times for large volume applications.

  1. Laravel Scheduler

Simplifies setting up cron jobs or repetitive tasks. You have to create (for each minute), the artisan the schedule command only a cron job: run calls and communicate with $ schedule a then many methods available to create tasks. Including the option to save the output to a file or to be send via email.

  1. Form validation

New class Illuminate \ Foundation \ Http \ Request form now allows to define rules for form validations. If the shape of the user is not validated by default to the original page in a resources / lang / en / validation.php (s is the country code replaces) the notification set out run. Also can check whether the user is actually authorized for this request is.

Vibidsoft Engineering Team

Senior engineers who have shipped 450+ projects since 2014 across AI, payments, eCommerce, eLearning and custom software. Every guide is written and reviewed by the people who do the work.

Follow us on LinkedIn · About Vibidsoft

Next step

Talk to an engineer about Modernize & Rescue

Fixed-price upgrades for ageing PHP, Drupal, Magento or hybrid apps, with security patching and a care plan. from $5,000.

  • A 20-minute call with a senior engineer, not a salesperson
  • A written next-step plan within one business day
  • NDA on request
Book a call WhatsApp