• +91 9806724185,+91 9685733903
  • +91 9806724185

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) {
$mock->shouldReceive('process')->once();
});

6. Improved TimeZone -

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

$schedule->command('inspire')->hourly()->timezone('America/Chicago');

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

How Website Redesign Give Benefits in Business

  Wheater it is IT organization, an eCommerce company, or any other business, the website plays a vital role. And why would it not, as our web presence can be one of our most valuable Read more…

Business website

Benefits of Good Website Design for Web-based Businesses

All businesses need the services of professional web designing companies. An appealing website design serves to attract more visitors, thus increasing the traffic and in turn, the revenue generated. A website is considered as the Read more…

Business website

WooCommerce 3.7 – New Updates for Web Development 2019

New Version of WooCommerce has released version 3.7 and presented more product blocks and higher requirements for the PHP and WordPress versions. Let's take a look at what new changes happened in this new version. Read more…