What's new in Laravel 5.8

What's new in Laravel 5.8

We take a look at new features and changes in Laravel 5.8 you should be aware of whether starting a new project or upgrading an existing one.

We take a look at new features and changes in Laravel 5.8 you should be aware of whether starting a new project or upgrading an existing one.

Introduction:

Laravel 5.0 was released in February 2015 and a 5.x update has been released roughly every six months since then. As 5.7 was released in September 2018, we can expect to see the initial release of Laravel 5.8 sometime around March 2019.

In this article we’ll take a quick look at some new features or important changes that you should be aware of whether creating a new project from scratch or updating an existing one.

As always, before upgrading a Laravel version, be sure to carefully read and understand the upgrade guides to ensure a smooth upgrade process.

So here’s a few important updates coming to Laravel 5.8.

Email validation:

Laravel’s built in validation rule for email in 5.8 will now allow for international characters in email addresses.

If you have the following validation code:

$request->validate([
'email' => 'email',
]);

And attempt to validate an email address such as [email protected]är.se in 5.7, it will fail. However it will pass validation in 5.8.

In 5.7 the validation logic did not match with the logic used by SwiftMailer (the PHP mailer library used by Laravel), but now they both conform to RFC6530 compliance.

dotenv 3.0:

Laravel 5.8 will support the relatively new dotenv 3.0 to manage your project’s .env environment file.

The key new features in dotenv 3.0 are support for multiline strings and white space at the end of strings in your environment file, for example, something like:

DEVELOPMENT_APP_KEY="specialstringfor
thisapp"

Will only return specialstringfor, whereas in 5.8 the whole specialstringfor thisapp will be parsed. It will also respect any spaces at the end of the string, which were previously stripped from the environment variables.

This is a great update for situations where multiline API keys are required for security.

Mailables directory name change:

This is less of a new feature but an important element you will need to be aware of when upgrading a project.

If you have mailables in your project and you have customised the components using the php artisan vendor:publish command, the folder names have changed slightly, namely the /resources/views/vendor/mail/markdown directory is now named /resources/views/vendor/mail/text. This is because both folders can contain markdown code for making good looking responsive html templates with plain text fallbacks. It’s more logical to call the markdown folder text

New error page templates:

Laravel 5.8 will ship with new error pages featuring a very minimalist design that is intended to be more suitable for a range of websites and web apps without needing to be re-designed to fit a theme.

You can still customise the error pages or import your previous designs if you prefer them(see our tutorial on custom Laravel error pages).

Array and String helper functions are deprecated:

All array_* and str_* global helpers have been deprecated and will be removed in Laravel 5.9. There are Arr:: and Str:: facades that should be used instead. There will be packages available to maintain functionality if you can’t or don’t want to re-work existing code but it is good practice to get used to the new commands now if you need to use them.

An existing array_ function such as:

function array_add($array, $key, $value)


Should be replaced with:

Arr::add($array, $key, $value)

Similarly string helper functions such as:

function str_contains($haystack, $needles)


Should be replaced with:

Str::contains($haystack, $needles);

In fact, if you check the 5.8 code for array_* and str_* global helpers you’ll see they already simply use the facade version.

Caching — ttl now in seconds instead of minutes:

If you are using Laravel’s caching functions take note that if you are passing an integer to the cache function in 5.8 it will apply the time to live in seconds and not minutes as it currently is in 5.7, so this command:

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

Will store the item for 30 minutes in Laravel 5.7 and 30 seconds in Laravel 5.8. A simple but important difference!

JSON values in MySQL:

If you are storing JSON values in MySQL and MariaDB database columns, in 5.7 Laravel would return values wrapped in double quotes. 5.8 returns the same values in cleaner strings.

The following is the example from the Laravel upgrade guide which illustrates the change:

$value = DB::table('users')->value('options->language');

dump($value);

// Laravel 5.7…
'"en"'

// Laravel 5.8…
'en'

Carbon version 2 support:

You will now have the option of using Carbon 1 or Carbon 2 for your DateTime functions in Laravel 5.8. Check the Carbon migration guide if you intend to use Carbon 2.

Nexmo and Slack Notification channels:

The Nexmo and Slack Notification channels have been removed from the main Laravel project and extracted into first-party packages.

To continue using Slack or Nexmo functionality in your project you’ll need to use:

composer require laravel/nexmo-notification-channel
composer require laravel/slack-notification-channel

They can then be configured and used as before.

So that pretty much covers the key changes you should be aware of. We always like checking out new software releases at Welcm Software, and look forward to the release of 5.8 soon.

Advantages of Hiring PHP Developer for your Website Project

Advantages of Hiring PHP Developer for your Website Project

PHP - Hypertext pre-processor, a scripting language used by many people in developing web pages, but most of us are unaware even of the full form. To train someone and make them learn this whole language is as difficult and time-consuming as it is...

PHP - Hypertext pre-processor, a scripting language used by many people in developing web pages, but most of us are unaware even of the full form. To train someone and make them learn this whole language is as difficult and time-consuming as it is to learn the language yourself. That’s why PHP developers are there to make your life easy. This article will give us the advantages and requirements of Hire PHP Developer for our very own website project.

First of all, let us understand the value the right developer brings to the project and why it is important for your business.

A website is a major component of any company/business and is very important for its face value, the way it represents the company on the internet is critical for any business to succeed. This is the reason why companies are looking for PHP developers who can develop their webpage.

If you're planning to do an online business, your PHP programmer will be the first person to transfer your thinking onto the webpage. You should, therefore, employ developers from PHP to make your hypothetical idea a reality.

With this software programming language, PHP developers all-around can easily build website frameworks, web content management systems, web template systems, and various other web-based designs.

Some of the reasons why we need to outsource these developers are:

Not everyone is the best in each field, all of us have our specific skills and talents hence, PHP developers are also the best at what they do. The time and money spent on the training of the in house employees would be saved if the professional PHP developers are hired. Instead of multitasking, if the employees were to focus on what they’re good at it would increase productivity too.

The PHP developers would be much more professional than the in-house workers. It would lead to the seriousness of work. Hence, on-time delivery is guaranteed with hired PHP developers.

In addition to these benefits, you would also be able to track your project through every stage in constant communication with your online team. These advantages make it incredibly popular and smart to hire a PHP developer.

The PHP developers have in-depth knowledge of PHP, HTML and various frameworks in terms of technical capabilities. Hiring PHP developers are advised to give your website a professional look based on PHP.

Much of web success depends on the involvement of social media. The developer can add to your social networking pages a feature that explicitly redirects visitors. In addition, SEO experts also suggest better connections to the website's social network.

Just like a tailor stitches our dresses according to our preferences and is ready to make last-minute changes. A PHP developer will also be available at the nick of your call to make the website just the way you want it to be and have a customized solution for every problem.

Read also: Why & How to Hire Dedicated PHP Developer

At some point in your business, you’re going to have problems regarding your webpage due to the rapidly changing technology, instead of struggling with ideas like these and not being able to come up with an appropriate solution a PHP web developer could help us with our problems just like any technician would help us with the problems we face in our offices or any architect would help us with designing the structure of a building or any interior designer would help us with setting up our home. The PHP development company are hubs of workers who would help us overcome these problems and are always there.

Source by

Hire PHP Developer and Web Developer for your Online Business

Hire PHP Developer and Web Developer for your Online Business

PHP is widely used open-source scripting language it helps in making dynamically easy your websites and web application. Mobiweb Technology is your best technical partner and offering you solution for any kind of website and application...

PHP is widely used open-source scripting language it helps in making dynamically easy your websites and web application. Mobiweb Technology is your best technical partner and offering you solution for any kind of website and application development. To hire PHP developer and web developer at affordable prices contact Mobiweb Technology via [email protected]

Laravel Framework Development Services | Laravel Web Development

CMARIX is leading Laravel Web application Development Service Provider with the track record of implementing diverse high-performance Laravel web applications with skilled Laravel developer team for clients across the globe<a href="https://www.cmarix.com/laravel-framework-development-services.html?utm_source=SB" target="_blank">.Continue</a>

CMARIX is leading Laravel Web application Development Service Provider with the track record of implementing diverse high-performance Laravel web applications with skilled Laravel developer team for clients across the globe.Continue