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