Skip to main content

What's a new in Laravel 5.5?

Laravel 5.5 require PHP 7.0+
            Laravel 5.5 now requires PHP 7.0 or newer to run. PHP 7.0 was written to be faster and to use less memory to accomplish the same task that earlier versions of PHP would have taken to handle.


LTS Release
            After Laravel 5.1, Laravel 5.5 is scheduled to be the next LTS release. This includes two years of bug fixes and three years of security updates.

Error Handling with Whoops
            Whoops actually does is that it makes the annoying PHP errors and exceptions a little less annoying by changing how they appear. As you can see in the image that it sports the lines of the file in which the error or exception occurred and traces back the operation till inception. And not forgetting to mention, it has zero dependencies (currently('pre-laravel-55')).

Email Themes
            Laravel 5.4 offers markdown mailable but there was no option for customization. In Laravel 5.5 you can use your custom styles for emails.

Laravel Migrate Fresh Command
            Laravel 5.5 add Artisan command to the migrate: namespace. This is similar to migrate:refresh but rather than rolling back your existing migrations, it drops all tables and migrates them from start. The difference between rolling back migrations and dropping tables is that rolling back migrations runs the drop method for each of them. Whilst, the migrate:fresh command simply drops all off of the tables and starts from scratch.

Error Pages: Design Improvement:
            Little change is made in the design of the error pages like 404 or 50* errors: there are some design additions with Flexbox getting the error message centered on the page.

Model Factory Generators
            You can now easily use a new artisan command to create custom factory generators.

$ php artisan make:factory PostFactory
            This will make a new file called PostFactory.php in the database/factories folder. What makes it a lot better is that you can also generate a factory while making a model.

$ php artisan make:model Post -f
            The command above will not only create a model, it will also create a model factory, a post controller, and posts migration in one fell swoop! That’s a pro-tip right there.

Comments

Popular posts from this blog

As a symfony developer what you should take care when symfony standard edition is legacy:

Now  symfony standard edition is legacy . So no need to worry much just go threw article and understand whats new in symfony 4 if standard edition is legacy now. This is the main difference in Symfony 4 from symfony 2 and symfony 3 . Older symfony versions provide by default doctrine, twig, form, validation, profiler, annotations and many other components. But some time user do not want to use it. Suppose what if user do not want to doctrine or twig? Still he has doctrine and twig in his dependency. That makes symfony heavy framework. When starting a new project developers do not like to assemble things manually. So symfony 2 and 3 provides standard edition for developers to start a big project. But was hard to scale down project and decrease dependency if user do not require some packages. Symfony 2 and 3  are big success and in years developers are now aware with composer and dependency injection. So adding/removing a new package is not a big deal. So symfony chose...

3 Node.js Alternatives To WordPress

3 Node.js Alternatives To WordPress As compare to WordPress there is alternative option like Node.js. There are many various latest challengers that have large communities, support themes, plugins and are easy to install on your own server. Here are 3 you might want to checkout. KeystoneJS KeystoneJS is a content management system and framework to build server applications that interact with a database. It is based on the Express framework for Node.js and uses MongoDB for data storage. It represents a CMS alternative for web developers who want to build a data-driven website but don’t want to get into the PHP platform or large systems like WordPress. EnduroJS Enduro.js offers a fast and easy way to build your project, beautiful and simple admin UI and integrated tools to build everything on the server. It works without a database, instead relying on a system of flat files that can be opened directly in a text editor. It is easy to install and can be deployed via Git. ...

Laravel: How to protect .env files?

.env files: If you develop your applications using Laravel, you probably use .env files every day in your development life. We use these files to store the most secret information of our application. Be it database credentials, the application key or any third-party service credentials. So simply put: We do not want anyone to get access to these files! But the truth is: quite a few .env files are accessible. And I don’t mean that they are accessible by some hackers, but by Google. To search for public .env files, all you need to do is google for one of these terms: DB_USERNAME filetype:env DB_PASSWORD filetype:env APP_DEBUG filetype:env Secure your .env files The reason that these .env files are accessible and also get scraped is because of two things: Misconfigured shared hosting The .env file has the wrong access rights Shared hosting If you use shared hosting, please make sure that the root folder of your Laravel application is not accessib...