Hello guys, This week is a rare one when I don't have my own articles written, silently working on a big publication for Laravel News and a few ideas to be shared in upcoming month. Meanwhile, there's a lot to read from the community - enjoy!
What’s New in Laravel 5.4
scotch.io
If you've been following Scotch for a while, you heard a lot about Laravel. Some months ago, Laravel 5.3 was released. It introduced new features like Mailables. Yesterday, the 25th of January, Laravel 5.4 was released.
Validation considerations in Laravel 5.4
themsaid.com
Laravel 5.4 introduces two new built-in middleware ConvertEmptyStringsToNull and TrimStrings, the first middleware transforms request parameters with empty string as a value to null, the latter trims the leading and trailing white space from the values of request parameters.
An artisan command to easily test mailables
murze.be
Most of the Laravel apps we create at Spatie will send mails. This can be a password reset mail, a welcome mail after registration, an order confirmation mail, … One of the things we do is styling such mails so it has the same look and feel as the site it was sent from.
Simple Record History Tracking with Laravel Observers
medium.com
I had a client recently that wanted to track changes made to certain database records and who had made them. He was basically asking for a written history of any record in the specified tables. Laravel makes this absurdly easy with model observers and polymorphic relationships.
Deprecations for PHP 7.2
laravel-news.com
The PHP 7.2 RFC for deprecating some current functionality has been approved. The following items are included in this list and will begin throwing deprecated notices: The magic __autoload function has been superseded by spl_autoload_register in PHP 5.1 and its use discouraged in the documentation.
Using anonymous classes to write simpler tests
mnapoli.fr
Anonymous classes were added to PHP 7. This article intends to show how useful they can be for writing tests. In the example above we have written a very dumb implementation. That’s often useful when the mock will not be used or its behavior isn’t important for the use case we are testing.
DanZeuss/BrowsersyncInLaravel
github.com
Install all needed to get the BrowserSync working with gulp and Laravel. You can get all details here: Browser-sync It will show you details about the host and the port. Note the port number.
Codeception for Laravel
codeception.com
This will create tests directory and configuration file codeception.yml. This also prepares 3 suites for testing: acceptance, functional, and unit. You will also need to prepare .env file for testing environment:
Laravel Random Keys with Keygen
scotch.io
When developing applications, it is usually common to see randomness come into play - and as a result, many programming languages have built-in random generation mechanisms. Some common applications include:
adamwathan/bootforms · GitHub
github.com
BootForms builds on top of my more general Form package by adding another layer of abstraction to rapidly generate markup for standard Bootstrap 3 forms. Probably not perfect for your super custom branded ready-for-release apps, but a huge time saver when you are still in the prototyping stage!
That's it for this time, see you next week! Povilas Korop Laravel Daily Team
|