Before Thanksgiving last week Laravel 5.7.14 was released with the ability to make asset root URLs configurable with the app.asset_url
config option. This release contains other convenient configurations and overrides:
First, the Illuminate\Cookie\CookieJar
is now macroable.
You now have the ability to disable the password reset functionality by passing the reset
key in your routes/web.php
file:
Auth::routes(['reset' => false]);
Next, you can publish Laravel error views just like any other views from a service provider with the vendor:publish
command. Running the pubish command will result in templates from /Illuminate/Foundation/Exceptions/views
being copied too resources/views/errors
.
You can configure an asset root URL in the config/app.php
file:
Thinking about adding this “asset_url” configuration option to Laravel… good? pic.twitter.com/QaRFM7Wbsy
— Taylor Otwell ????♂️ (@taylorotwell) November 14, 2018
The configuration might look something like:
'asset_url' => 'https://cdn.example.com',
You can now also set $tries
and $timeout
in a \Illuminate\Notifications\Notification
instance. Here’s an example from the pull request:
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
class TestNotification extends Notification implements ShouldQueue
{
use Queueable;
public $tries = 3; // Max tries
public $timeout = 15; // Timeout seconds
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
->line('The introduction to the notification.')
->action('Notification Action', url('/'))
->line('Thank you for using our application!');
}
}
You can see the full diff between 5.7.13 and 5.7.14 on GitHub, and the full release notes below from the 5.7 changelog:
v5.7.14
Added
- Added
Macroable
trait toIlluminate\Cookie\CookieJar
(#26445) - Added ability to disable password reset route (#26459)
- Added ability to publish error views (#26460)
- Added ability to set notifcation tries and timeout (#26493)
- Added
mail.log_channel
config for makelog
for mail driver configurable (#26510) - Allowed
asset
root urls to be configurable viaapp.asset_url
(9172a67) - Added
Error while sending QUERY packet
string toDetectsLostConnections
trait (#26233) - Added env override for running in console (a36906a, 19f2245)
Fixed
- Fixed
UNION
aggregate queries with columns (#26466) - Allowed migration table name to be guessed without
_table
suffix (#26429) - Fixed
TestResponse::assertExactJson
for empty JSON objects (#26353, e6ebc8d, 621d91d, #26508) - Fixed cache repository for PHP from 7.2.12v (#26495)
- Fixed user authorization check for Email Verification (#26528)
- Fixed nested JOINs on SQLite (#26567)
Changed
- Improved eager loading performance (#26434, #26453, 3992140, #26471, a3738cf, #26531)
- Adjusted
mix
missing asset exceptions (#26431) - Used
asset
helper to generate full path urls in exception views (#26411) - Changed
Illuminate\Foundation\Testing\Concerns\MocksApplicationServices::withoutJobs
method (#26437) - Cached
distinct
validation rule data (#26509) - Improved DNS Prefetching in view files (#26552)
#laravel/writing
Filed in:
Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.