Laravel V5.4.18 is now released and available. This is a maintenance release but it does include a few new features to the TestResponse, Validator, Artisan, and Mailer.
The TestResponse received a few new methods:
assertSeeText() assertDontSeeText() assertJsonMissing() assertSuccessful()
assertDontSeeText() look for text within HTML responses, but run a strip_tags over the results so the match is less strict. Here is an example:
// <h1>My <span>Title</span></h1> $response->assertSeeText('My Title');
assertJsonMissing() can be used to test that a response does not contain a given fragment, and the
assertSuccessful() tests that the status code is 2xx.
Nested Model Controllers
Now you can pass a parent flag to
make:controller which will create a parent model:
$ php artisan make:controller ClientDocumentController --parent=App/Client --resource A App\Client model does not exist. Do you want to generate it? (yes/no) [yes]: > yes Model created successfully. Controller created successfully.
For a complete list of changes in this release see the changelog below:
- Added support for attaching an image to Slack attachments
Validator::extendDependent()to allow adding custom rules that depend on other fields (#18654)
- Added support for
- Don’t trim leading slashes on local filesystem base URLs (acd66fe)
- Accept variable on
stringvalidation rules to
- Fixed an issue with
Collection::groupBy()when the provided value is a boolean (#18674)
- Bring back an old behaviour in resolving controller method dependencies (#18646)
- Fixed job release when exception occurs (#18737)
- Fixed eloquent
decrement()update attributes (#18739, 1728a88)
Join the weekly newsletter and never miss out on new tips, tutorials, and more.
- Senior Developer for a Algo Strategy Marketplace Startup
- Software Engineer
- Laravel Developer
South Florida (Remote considered)
- Senior Software Engineer - LAMP/PHP/MySQL/Laravel
Los Angeles / Remote
- Senior PHP/Laravel Developer: Your Dream Work Environment
iPhone Photography School
- In-house Laravel Developer.
Gold Coast / Australia
- Laravel Developer
Oak Brook, IL
Quickly Run PHPUnit Tests in PhpStorm
PhpStorm has loads of features and it’s extremely powerful, however, it can be difficult finding new options that wil…
Using the Google API with Socialite
When I start a project that requires users to log in using their Google accounts, I immediately turned to Laravel Soc…