Laravel is an open-source PHP structure that pursues the MVC design. It is a PHP system that diminishes the expense of advancement and improves code quality. It will enable you to get an incredible line of work. Laravel 5.8 is the most recent and current variant.It will provide necessary support in Web and App development. It discharges on 26th February 2019; Bug Fixes Until August 26th, 2019 and Security Fixes Until February 26th, 2020.

There are various features of 5.8 are listed below:-
  • Eloquent hasOneThrough relationships Feature.
  • Improved email validation Feature.
  • Token Guard Token Hashing.
  • Convention based automatic registration of authorization policies.
  • DynamoDB cache and session drivers.
  • Mock or Spy Testing Helper Methods.
  • Improved TimeZone Configuration and Many More.
1. Eloquent :-

Laravel 5.8 supports new Eloquent hasOneThrough relationship type. We can use a hasOneThrough relationship to fetch a Clients account history details through the account model.

public function accountDetail()
return $this->hasOneThrough(AccountDetail::class, Account::class);

2. Improved Email Validation Feature:-

In Laravel 5.8 Advancements, Email validation logic by acquiring the package /email-validator utilized by SwiftMailer.

3. Another Feature Token Guard Token Hashing:-

The guard gives basic API authentication, and now it supports storing API tokens as SHA-256 hashes. Token Guard Token Hashing gives updated security over storing plain-text tokens.

4. DynamoDB Cache/Session drivers:-

It is a Necessary feature. It is a serverless NoSQL database invented by Amazon Web Services. The default setting for cache driver can be Automated through file.

5. Mock or Spy Testing Helper Methods:-

It is more convenient, new mock and spy methods have been added to the core Laravel test case class. It automatically binds the mocked class into its container

$this->mock(Service::class, function ($mock) {

6. Improved TimeZone -

Laravel 5.8 allows us to Change the timezone of a Scheduled task using the timezone :


7. PSR-16 cache driver compliance:-

It allows a more granular expiration time when storing values and provides agreement with PSR-16 caching standard; the cache item value time-to-live has changed from minutes to seconds.

The put, add, , remember and setDefaultCacheTime methods of the Illuminate\Cache\Repository class and its extended classes, as well as the put function of each cache store were modified with this changed behavior.

If we are passing an integer to any of these functions, we should update our code to validate you are passing the number of seconds you wish the value to remain in the cache. Alternatively, we may pass a DateTime instance highlighting when the item should expire:

// In Laravel 5.7

Cache::put('foo', 'bar', 20);

// Laravel 5.8

Cache::put('foo', 'bar', 20);

// Laravel 5.8 Update

Cache::put('foo', 'bar', now()->addSeconds(20));

Related Posts

Business website

Easy to Use WordPress Membership Plugins

Often website owners require visitors to sign up and become members of their platform before allowing access to the content. The solutions for WordPress users are a variety of membership plugins – both free and Read more…

Business website

What are the Challenges of Starting a Business and Startups ?

Did you know that 90% of startups reach their demise within the first five years? Of course, you don’t want to be another number in those stats. The developing countries are facing horrifying issues that Read more…

Business website

4 Key Benefits of an Online Sports Registration Website

The registration process is often the most time consuming (and complicated) component of a league coordinator’s job—but it doesn’t have to be! An online sports registration website fully automates sports management tasks including; tracking finances, creating and Read more…