이메일을 맞춤 설정하려면 그 길이가 될 것입니다.
대신을 시도해보십시오
php artisan vendor:publish
그런 다음 우리의 사용에 대한
/resources/views/vendor/notifications/email.blade.php
훌륭한 작품 여기에 파일을 수정합니다.
[email protected]:~/laravel_5.4$ php artisan vendor:publish
Copied Directory [/vendor/laravel/framework/src/Illuminate/Pagination/resources/views] To [/resources/views/vendor/pagination]
Copied Directory [/vendor/laravel/framework/src/Illuminate/Notifications/resources/views] To [/resources/views/vendor/notifications]
Copied Directory [/vendor/laravel/framework/src/Illuminate/Mail/resources/views] To [/resources/views/vendor/mail]
Publishing complete.
이제 사본을 변경해야하는 경우 원래 ResetPassword 클래스가 사용하는 공상 버튼을, 당신은 다음의 예처럼 User.php 클래스에서 메일 클래스를 확장 할 수 있습니다합니다.
<?php
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Auth\Notifications\ResetPassword;
use Illuminate\Notifications\Messages\MailMessage;
class User extends Authenticatable
{
use Notifiable;
protected $table = 'Users';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'firstName',
'lastName',
'email',
'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
/**
* Sends the password reset notification.
*
* @param string $token
*
* @return void
*/
public function sendPasswordResetNotification($token)
{
$this->notify(new CustomPassword($token));
}
}
class CustomPassword extends ResetPassword
{
public function toMail($notifiable)
{
return (new MailMessage)
->line('We are sending this email because we recieved a forgot password request.')
->action('Reset Password', url(config('app.url') . route('password.reset', $this->token, false)))
->line('If you did not request a password reset, no further action is required. Please contact us if you did not submit this request.');
}
}
체크 아웃이 답변을 http://stackoverflow.com/questions/40574001/how-to-change-reset-password-email : 여기
은 단지 예를 위대한 작품을 우리의 사본입니다 -subject-in-laravel –