如何翻译Laravel电子邮件验证?
某些软件包可能附带其自己的语言文件。您可以通过将文件放在resources / lang / vendor / {package} / {locale}目录中来覆盖它们,而不用更改软件包的核心文件来调整这些行。https://laravel.com/docs/5.7/localization#overriding-package-language-files
如果我们查看本地化文档:https : //laravel.com/docs/5.7/localization#using-translation-strings-as-keys
还有VerifyEmail类:https : //github.com/laravel/framework/blob/5.7/src/Illuminate/Auth/Notifications/VerifyEmail.php#L44
然后,我们必须使用以下内容创建此文件资源/lang/vendor/Auth/de.json:
{
"Verify Email Address": "Email Adresse bestätigen"
}
Run Code Online (Sandbox Code Playgroud)
但这是行不通的。我的Laravel版本是5.7.15。不要与Laravel 5.7混淆以确认电子邮件的本地化,这是针对视图的,而非电子邮件。任何的想法?
Is there an option to paste always from the clipboard as plain text?
I tried it that way, but that does not work:
$(document).ready(function () {
ClassicEditor.create(document.querySelector('#text'), {
toolbar: [
'heading',
'bold',
'italic',
'link',
'bulletedList',
'numberedList',
'blockQuote',
'undo',
'redo'
]
}).then(function (editor) {
this.listenTo(editor.editing.view, 'clipboardInput', function (event, data) {
// No log.
console.log('hello');
});
}).catch(function (error) {
});
});
Run Code Online (Sandbox Code Playgroud)
https://docs.ckeditor.com/ckeditor5/latest/api/module_clipboard_clipboard-Clipboard.html
https://docs.ckeditor.com/ckeditor5/latest/api/clipboard.html
该示例基于 Laravel 的注册。
我在 register.blade.php 中添加了以下内容:
<div class="form-group row">
<label for="file" class="col-md-4 col-form-label text-md-right">{{ __('Files') }}</label>
<div class="col-md-6">
<input type="file" id="files" name="files[]" multiple>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
RegisterController 中的方法如下所示:
protected function validator(array $data)
{
$validator = Validator::make($data, [
'name' => ['required', 'string', 'max:255'],
'files.*' => ['required', 'file'],
]);
dd($validator->errors());
}
Run Code Online (Sandbox Code Playgroud)
我正在尝试上传 PDF 和 DOC 文件。:
MessageBag {#236 ?
#messages: array:2 [?
"files.0" => array:1 [?
0 => "The files.0 must be a file."
]
"files.1" => array:1 [?
0 => "The files.1 …Run Code Online (Sandbox Code Playgroud)