formatting

This commit is contained in:
Taylor Otwell 2018-04-17 07:23:04 -05:00
parent d8f5b62d07
commit f81c8bcc99
1 changed files with 3 additions and 1 deletions

View File

@ -1389,8 +1389,10 @@ The `optional` function accepts any argument and allows you to access properties
{!! old('name', optional($user)->name) !!}
The `optional` function also accepts a Closure as its second argument. The Closure will be invoked if the value provided as the first argument is not null:
return optional(User::find($id), function ($user) {
return App\Post::findUser($user->id);
return new DummyUser;
});
<a name="method-policy"></a>