 
                
                        読み込みが終了しない場合は、しばらく待つか、リロードを行なってください。
                    
                    
                        If loading does not finish, wait for a while or reload.
                    
                     
                            
                            エンジニア向けの情報を発信するブログです。
                            どなたでも発信できます。
                            お好きに利用していただれば幸いです。
                        
 
                
📁 Tutorial/blog/resources/views/layouts/app.blade.php
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">
{{--                                             👇 こいつを追加 --}}
    <title>{{ config('app.name', 'Laravel') }} | @yield('sub_title')</title>
    <!-- Scripts -->
    <script src="{{ asset('js/app.js') }}" defer></script>
    <!-- Fonts -->
    <link rel="dns-prefetch" href="//fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
{{-- 省略 --}}
📁 Tutorial/blog/resources/views/article/new.blade.php
@extends('layouts.app')
{{-- 👇 変数を定義 --}}
@php
    $sub_title = 'article new';
@endphp
{{--               👇 変数を指定 --}}
@section('sub_title', $sub_title)
@section('content')
    <form action="{{route('article.create')}}" method="post">
        @csrf
        <input type="hidden" name="id" value="{{$id ?? null}}">
        <div class="form-row">
            <div class="form-group col-sm-6">
                <label>Title</label>
                <input
                    name="title"
                    type="text"
                    value="{{old('title', $title ?? null)}}"
                    class="form-control
                    @error ('title') is-invalid @enderror"
                >
{{-- 省略 --}}

📁 Tutorial/blog/resources/views/article/new.blade.php
@extends('layouts.app')
{{--                    👇 __ヘルパ関数で指定 --}}
@section('sub_title', __('messages.artice_new_sub_title'))
@section('content')
    <form action="{{route('article.create')}}" method="post">
        @csrf
        <input type="hidden" name="id" value="{{$id ?? null}}">
        <div class="form-row">
            <div class="form-group col-sm-6">
                <label>Title</label>
                <input
                    name="title"
                    type="text"
                    value="{{old('title', $title ?? null)}}"
                    class="form-control
                    @error ('title') is-invalid @enderror"
                >
{{-- 省略 --}}
📁 Tutorial/blog/resources/lang/en/messages.php
<?php
return [
    'artice_new_sub_title' => 'article new!',
];

📁 Tutorial/blog/resources/views/article/new.blade.php
@extends('layouts.app')
{{--                    👇 最初こんな感じで書いた --}}
@section('sub_title', '{{__("messages.artice_new_sub_title")}}')
@section('content')
    <form action="{{route('article.create')}}" method="post">
        @csrf
        <input type="hidden" name="id" value="{{$id ?? null}}">
        <div class="form-row">
            <div class="form-group col-sm-6">
                <label>Title</label>
                <input
                    name="title"
                    type="text"
                    value="{{old('title', $title ?? null)}}"
                    class="form-control
                    @error ('title') is-invalid @enderror"
                >
{{-- 省略 --}}

"{{__('messages.artice_new_sub_title')}}"
'{{__('messages.artice_new_sub_title')}}'
"{{__("messages.artice_new_sub_title")}}"