What’s new in Laravel 5.5 PHP Framework. – Quick View

What’s new in Laravel 5.5 PHP Framework. – Quick View

Comments Off on What’s new in Laravel 5.5 PHP Framework. – Quick View



Laravel 5.5 LTS is finally released with great security features in August 2017. As we all Knew that Laravel is very Strong Powerful and Excellent PHP framework for Big projects that work on Blade Engine.

Here is Some Key points that We should know about Laravel 5.5 LTS

  • Custom validation rules and Rule Objects.
  • Blade Engine If() Directive.
  • Whoops, an error handler is back in Laravel 5.5.
  • UI fixes for Error default views.
  • Laravel front end presets and components
  • Migrate: fresh command.
  • Custom Exception handling.

Newly feature coming with Laravel 5.5 Blade Framework is the Validation will now return the request data so you have now almost everything that you need.

public function Demo()
{
    $data = $this->validate(request(), [
        'Username' => 'required',
        'Password' => 'required|numeric',
        'cat_id' => 'numeric|exists:categories',
    ]);

    // $data = request()->only('name', 'price', 'cat_id');

    return Product::create($data);
}

Whoopserror handler is back in Laravel 5.5.

Whoops is a stack-based error handling. Whoops in Laravel It’s generally a PHP error handler that came in Laravel 4 (Pre-installed) and after that was removed with the Laravel 5.0 release. It was announced now that Whoops will be a come back in Laravel 5.5.

Laravel 5.5 Migrate:Fresh Command

with previous versions of Laravel, there is a Command migrate: refresh that allows you to rollback and re-runs your all of migrations. It helps whenever you need to rebuild database and its table in development part.

Now with Coming to Laravel 5.5 is a new command called migrate: fresh. The major difference factor between fresh and “refresh” is that new fresh command skips all your down methods or rollback by deleting the tables, then executing through your up methods.

So first of all we need to Know the actual use of refresh command


$ php artisan migrate:refresh

Rolling back: 2017_10_12_100000_create_password_resets_table
Rolled back:  2017_10_12_100000_create_password_resets_table
Rolling back: 2017_10_12_000000_create_users_table
Rolled back:  2017_10_12_000000_create_users_table
Migrating: 2017_10_12_000000_create_users_table
Migrated:  2017_10_12_000000_create_users_table
Migrating: 2017_10_12_100000_create_password_resets_table
Migrated:  2017_10_12_100000_create_password_resets_table

And also, See the use of Fresh command


$ php artisan migrate:fresh

Dropped all tables successfully.
Migration table created successfully.
Migrating: 2017_10_12_000000_create_users_table
Migrated:  2017_10_12_000000_create_users_table
Migrating: 2017_10_12_100000_create_password_resets_table
Migrated:  2017_10_12_100000_create_password_resets_table

Laravel 5.5 Adds Frontend Presets

React Preset

React preset command can be executed through Artisan in LAravel 5.5:

for example

php artisan preset react

What will happen after this?

After executing this command, It will replace all the Vue.js platform with React. It includes the by default Mixup components, configuration, and other related files.

Bootstrap Preset

Laravel Bootstrap preset is useful if you don’t want to use any JavaScript platform at all, but still, want to keep the default Bootstrap CSS.

php artisan preset bootstrap

For more details about Laravel 5.5 LTS, you can also check it out their official website for Laravel and for Laravel 5.5 LTS news Laravel 5.5 News

Conclusion

So Finally, as a result, We can say it has Bundles of Core and Security features. Therefore Developers can easily build any powerful applications.

Krishna Gupta

Krishna Ballabh Gupta is a Gold Medalist Full Stack Developer & Algorithm Designer and Founder of TechnologyShouters. He generally Blogs about Python, JavaScript, jQuery, AngularJS, Database, PHP, AJAX and something that interesting.

Related Posts

Create Account



Log In Your Account



1Subscribe to Our Live Updates.