{"id":5993,"date":"2020-03-03T23:23:14","date_gmt":"2020-03-03T14:23:14","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=5993"},"modified":"2020-03-14T01:32:41","modified_gmt":"2020-03-13T16:32:41","slug":"laravel-7-x%e3%81%ae%e6%96%b0%e3%82%b3%e3%83%b3%e3%83%9d%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e6%a9%9f%e8%83%bd%ef%bc%81%e5%ae%9f%e4%be%8b","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=5993","title":{"rendered":"Laravel 7.x\u306e\u65b0\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u6a5f\u80fd\uff01\u5b9f\u4f8b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001Laravel\u306e\u30d0\u30fc\u30b8\u30e7\u30f3<code>7.x<\/code>\u304c\u3064\u3044\u306b\u516c\u958b\u3055\u308c\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u4e00\u8db3\u5148\u306b\u3069\u306e\u3088\u3046\u306a\u6a5f\u80fd\u304c\u8ffd\u52a0\u306b\u306a\u3063\u305f\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3044\u304f\u3064\u304b<code>Laravel 7.x<\/code>\u306b\u306f\u65b0\u3057\u3044\u6a5f\u80fd\u304c\u8ffd\u52a0\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u306e\u4e2d\u3067\u3082\u3072\u3068\u304d\u308f\u8208\u5473\u3092\u5f15\u304b\u308c\u305f\u306e\u304c\u3001<\/p>\n<p><strong style=\"font-size: 35px;\">Blade\u306e\u65b0\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u6a5f\u80fd<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>\u6b63\u78ba\u306b\u8a00\u3046\u3068\u3001\u4ee5\u524d\u304b\u3089<code>Blade<\/code>\u306b\u306f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u6a5f\u80fd\u304c\u5b58\u5728\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u305d\u306e\u6a5f\u80fd\u304c\u5927\u5e45\u306b\u62e1\u5f35\u3055\u308c\u3001\u3044\u308d\u3044\u308d\u3068\u4fbf\u5229\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u4eca\u56de\u306e\u8a18\u4e8b\u3067\u307e\u3068\u3081\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u306e\u304a\u5f79\u306b\u7acb\u3066\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\ud83d\ude0a\u2728<\/p>\n<p><strong>\u3010\u8ffd\u8a18:2020.3.14\u3011<\/strong>Laravel 7.1.2\u672a\u6e80\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b<code>Blade Component<\/code>\u7531\u6765\u306eXSS\uff08\u30af\u30ed\u30b9\u30b5\u30a4\u30c8\u30b9\u30af\u30ea\u30d7\u30c6\u30a3\u30f3\u30b0\uff09\u306e\u8106\u5f31\u6027\u304c\u5831\u544a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3067\u304d\u308b\u3060\u3051\u65e9\u304f\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3344 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_22.png\" alt=\"\" width=\"320\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_22.png 320w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_22-150x150.png 150w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_22-300x300.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_22-100x100.png 100w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Larave 7.x<\/p>\n<h1>\u4f55\u304c\u4e00\u756a\u5909\u308f\u3063\u305f\u304b<\/h1>\n<p>\u307e\u305a\u3001\u3053\u308c\u307e\u3067<code>Blade<\/code>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u4f7f\u3063\u3066\u547c\u3073\u51fa\u3057\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<pre><strong>@component('components.search-box')<\/strong>\r\n<strong>@endcomponent<\/strong><\/pre>\n<p>\u3053\u308c\u307e\u3067\u3068\u540c\u69d8\u3053\u306e\u5f62\u3082\u4f7f\u3048\u307e\u3059\u304c\u3001\u4eca\u56de\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5c02\u7528\u30bf\u30b0\u3082\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><strong>&lt;x-search-box \/&gt;<\/strong><\/pre>\n<p>\u3064\u307e\u308a\u3001<code>x-<\/code>\u304b\u3089\u59cb\u307e\u3063\u3066\u305d\u308c\u4ee5\u964d\u306f\u30d5\u30a1\u30a4\u30eb\u540d\u306b\u306a\u308a\u307e\u3059\u3002\uff08\u968e\u5c64\u304c\u6df1\u3044\u5834\u5408\u306f\u3001\u30c9\u30c3\u30c8\u3067\u3064\u306a\u3044\u3067<code>&lt;x-boxes.search \/&gt;<\/code>\u3068\u3044\u3046\u5177\u5408\u306b\u306a\u308a\u307e\u3059\uff09<\/p>\n<p>\u307e\u305f\u3001<code>artisan<\/code>\u30b3\u30de\u30f3\u30c9\u306b\u300c\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u7ba1\u7406\u3059\u308b\u30af\u30e9\u30b9\u300d\u3092\u4f5c\u6210\u3059\u308b<code>make:component<\/code>\u304c\u8ffd\u52a0\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u3053\u3093\u306a\u611f\u3058\u3067\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan make:component SearchBox<\/strong><\/pre>\n<p>\u3067\u306f\u30011\u3064\u305a\u3064\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<h1>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30fb\u30af\u30e9\u30b9\u3092\u3064\u304f\u308bartisan\u30b3\u30de\u30f3\u30c9<\/h1>\n<p>\u5148\u307b\u3069\u3082\u66f8\u3044\u305f\u3088\u3046\u306b\u3001\u4eca\u56de\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u65b0\u3057\u3044<code>artisan<\/code>\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u7ba1\u7406\u3059\u308b\u30af\u30e9\u30b9\u3092\u3064\u304f\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u306e\u3067\u3001\u307e\u305a\u306f\u3053\u306e\u65b9\u6cd5\u3067\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u3064\u304f\u3063\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306f\u691c\u7d22\u30dc\u30c3\u30af\u30b9\u306e\u305f\u3081\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f5c\u308a\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:component SearchBox<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001<code>\/app\/View\/Components<\/code>\u30d5\u30a9\u30eb\u30c0\u306b<code>SearchBox.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5995\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/blade_component_1.png\" alt=\"\" width=\"288\" height=\"232\" \/><\/p>\n<p>\u305d\u3057\u3066\u3001<code>SearchBox.php<\/code>\u306e<code>render()<\/code>\u5185\u3067\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u30d3\u30e5\u30fc\u3082\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>\/resources\/views\/components<\/code>\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u81ea\u52d5\u7684\u306b\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5997\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/blade_component_2.png\" alt=\"\" width=\"290\" height=\"380\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/blade_component_2.png 290w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/blade_component_2-229x300.png 229w\" sizes=\"auto, (max-width: 290px) 100vw, 290px\" \/><\/p>\n<p>\u3067\u306f\u3001\u3053\u306e<code>\/resources\/views\/components\/search-box.blade.php<\/code>\u3092\u958b\u3044\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u691c\u7d22\u30dc\u30c3\u30af\u30b9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>&lt;!-- \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u672c\u4f53 --&gt;\r\n&lt;form action=\"\/search\"&gt;<\/strong>\r\n<strong>    &lt;input type=\"text\" name=\"q\"&gt;<\/strong>\r\n<strong>    &lt;select&gt;<\/strong>\r\n<strong>        &lt;option&gt;\u25bc\u4ee5\u4e0b\u304b\u3089\u9078\u629e&lt;option&gt;<\/strong>\r\n<strong>        &lt;option value=\"book\"&gt;\u672c&lt;option&gt;<\/strong>\r\n<strong>        &lt;option value=\"music\"&gt;\u97f3\u697d&lt;\/option&gt;<\/strong>\r\n<strong>        &lt;option value=\"game\"&gt;\u30b2\u30fc\u30e0&lt;\/option&gt;<\/strong>\r\n<strong>        &lt;option value=\"food\"&gt;\u98df\u7269&lt;\/option&gt;<\/strong>\r\n<strong>        &lt;option value=\"hobby\"&gt;\u30db\u30d3\u30fc&lt;\/option&gt;<\/strong>\r\n<strong>    &lt;\/select&gt;<\/strong>\r\n<strong>    &lt;button type=\"submit\"&gt;\u691c\u7d22&lt;\/button&gt;<\/strong>\r\n<strong>&lt;\/form&gt;<\/strong><\/pre>\n<p>\u3053\u308c\u3067\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30fb\u30af\u30e9\u30b9\u306e\u4f5c\u6210\u306f\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u547c\u3073\u51fa\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>&lt;html&gt;\r\n&lt;body&gt;\r\n\r\n    <strong>&lt;x-search-box \/&gt;<\/strong>\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5998\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/blade_component_3.png\" alt=\"\" width=\"367\" height=\"45\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/blade_component_3.png 367w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/blade_component_3-300x37.png 300w\" sizes=\"auto, (max-width: 367px) 100vw, 367px\" \/><\/p>\n<p>\u306a\u304a\u3001\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u3044\u305f\u3044\u5834\u5408\u3001\u308f\u3056\u308f\u3056\u30d3\u30e5\u30fc\u3092\u7528\u610f\u3059\u308b\u306e\u306f\u3081\u3093\u3069\u3046\u306a\u3082\u306e\u3067\u3059\u3002\u305d\u306e\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>--inline<\/code>\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u3064\u3051\u308b\u3068<code>render()<\/code>\u5185\u306b\u30d2\u30a2\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u4f7f\u3063\u305f\u7c21\u6613\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3057\u3066\u304f\u308c\u307e\u3059\u3002\uff08\u3082\u3061\u308d\u3093\u30d3\u30e5\u30fc\u306f\u4f5c\u6210\u3055\u308c\u307e\u305b\u3093\uff09<\/p>\n<pre>php artisan make:component YourComponent <strong>--inline<\/strong><\/pre>\n<pre>public function render()\r\n{\r\n    <strong>return &lt;&lt;&lt;'blade'<\/strong>\r\n<strong>&lt;div&gt;<\/strong>\r\n<strong>    \uff08\u3053\u3053\u306b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u5185\u5bb9\u3092\u7528\u610f\u3057\u3066\u304f\u3060\u3055\u3044\uff09<\/strong>\r\n<strong>&lt;\/div&gt;<\/strong>\r\n<strong>blade;<\/strong>\r\n}<\/pre>\n<h1>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3078\u30c7\u30fc\u30bf\u3092\u9001\u308b<\/h1>\n<p>\u3053\u3053\u307e\u3067\u3067\u306f\u3001\u5358\u306b\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u3063\u305f\u3060\u3051\u3067\u3059\u306e\u3067\u3001\u6bce\u56de\u540c\u3058\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u304c\u3001\u6b21\u306f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u30c7\u30fc\u30bf\u3092\u9001\u3063\u3066\u305d\u306e\u5185\u5bb9\u306b\u5fdc\u3058\u3066\u8868\u793a\u5185\u5bb9\u3092\u5909\u5316\u3055\u305b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u30bf\u30b0\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3046<\/h2>\n<p>\u3067\u306f\u3001\u307e\u305a<code>&lt;x-search-box \/&gt;<\/code>\u306bHTML\u30bf\u30b0\u306e\u3088\u3046\u306a<code>title<\/code>\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f5c\u3063\u3066\u30bf\u30a4\u30c8\u30eb\u304c\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code>\/app\/View\/Components\/SearchBox.php<\/code>\u3092\u958b\u3044\u3066\u4ee5\u4e0b\u306e\u90e8\u5206\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\View\\Components;\r\n\r\nuse Illuminate\\View\\Component;\r\n\r\nclass SearchBox extends Component\r\n{\r\n    <strong>public $title;<\/strong>\r\n\r\n    \/**\r\n     * Create a new component instance.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function __construct(<strong>$title<\/strong>)\r\n    {\r\n        <strong>$this-&gt;title = $title;<\/strong>\r\n    }\r\n\r\n    \/**\r\n     * Get the view \/ contents that represent the component.\r\n     *\r\n     * @return \\Illuminate\\View\\View|string\r\n     *\/\r\n    public function render()\r\n    {\r\n        return view('components.search-box');\r\n    }\r\n}<\/pre>\n<p>\u3053\u308c\u3067\u3001<code>&lt;x-search-box \/&gt;<\/code>\u30bf\u30b0\u3067<code>title<\/code>\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre><strong>&lt;x-search-box title=\"\u691c\u7d22\u30d5\u30a9\u30fc\u30e0\" \/&gt;<\/strong><\/pre>\n<p>\u3067\u306f\u3001<code>\/resources\/views\/components\/search-box.blade.php<\/code>\u306e\u4e2d\u3067\u30bf\u30a4\u30c8\u30eb\u3092\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>&lt;form action=\"\/search\"&gt;\r\n    <strong>{{ $title }}<\/strong>&lt;br&gt;\r\n    &lt;input type=\"text\" name=\"q\"&gt;\r\n    &lt;select&gt;\r\n        &lt;option&gt;\u25bc\u4ee5\u4e0b\u304b\u3089\u9078\u629e&lt;option&gt;\r\n        &lt;option value=\"book\"&gt;\u672c&lt;option&gt;\r\n        &lt;option value=\"music\"&gt;\u97f3\u697d&lt;\/option&gt;\r\n        &lt;option value=\"game\"&gt;\u30b2\u30fc\u30e0&lt;\/option&gt;\r\n        &lt;option value=\"food\"&gt;\u98df\u7269&lt;\/option&gt;\r\n        &lt;option value=\"hobby\"&gt;\u30db\u30d3\u30fc&lt;\/option&gt;\r\n    &lt;\/select&gt;\r\n    &lt;button type=\"submit\"&gt;\u691c\u7d22&lt;\/button&gt;\r\n&lt;\/form&gt;<\/pre>\n<p>\u30d6\u30e9\u30a6\u30b6\u3067\u78ba\u8a8d\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5999\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/blade_component_4.png\" alt=\"\" width=\"369\" height=\"69\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/blade_component_4.png 369w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/blade_component_4-300x56.png 300w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><\/p>\n<h2>\u5909\u6570\u3092\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u9001\u308b<\/h2>\n<p>\u4eca\u56de\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u3053\u306e\u90e8\u5206\u304c\u4e00\u756a\u6c17\u3092\u3064\u3051\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3078\u5909\u6570\u306e\u5185\u5bb9\u3092\u9001\u308b\u5834\u5408\u306f\u3001\u5c11\u3057\u6307\u5b9a\u65b9\u6cd5\u304c\u5909\u308f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u307e\u3067\u306e\u6d41\u308c\u3067\u8a00\u3046\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u6570\u3092\u6307\u5b9a\u3057\u305f\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u3046\u307e\u304f\u3044\u304d\u307e\u305b\u3093\u3002<\/p>\n<pre>&lt;!-- <strong>\u6ce8\u610f<\/strong>\uff1a \u3053\u308c\u306f<strong>\u9593\u9055\u3063\u305f\u4f8b<\/strong>\u3067\u3059\uff01 --&gt;\r\n\r\n&lt;x-search-box <strong>title=\"{{ $title }}\"<\/strong> \/&gt;<\/pre>\n<p>\u6b63\u89e3\u3092\u8a00\u3044\u307e\u3059\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u72ec\u81ea\u306e\u66f8\u304d\u65b9\u3092\u3057\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002\uff08\u3061\u3087\u3063\u3068<code>Vue<\/code>\u306b\u4f3c\u305f\u30ab\u30f3\u30b8\u3067\u3059\u306d\uff09<\/p>\n<pre>&lt;x-search-box <strong>:title=\"$title\"<\/strong> \/&gt;<\/pre>\n<h2>\u30af\u30e9\u30b9\u5185\u304b\u3089\u30c7\u30fc\u30bf\u3092\u9001\u308b<\/h2>\n<p>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30fb\u30af\u30e9\u30b9\u306e\u4e2d\u304b\u3089\u3067\u3082\u7c21\u5358\u306b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3078\u30c7\u30fc\u30bf\u3092\u9001\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001<code>\/app\/View\/Components\/SearchBox.php<\/code>\u3092\u958b\u3044\u3066<code>sections()<\/code>\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\View\\Components;\r\n\r\nuse Illuminate\\View\\Component;\r\n\r\nclass SearchBox extends Component\r\n{\r\n    \/\/ \u7701\u7565\r\n\r\n    <strong>public function sections() {<\/strong>\r\n\r\n<strong>        return [<\/strong>\r\n<strong>            'book' =&gt; '\u672c',<\/strong>\r\n<strong>            'music' =&gt; '\u97f3\u697d',<\/strong>\r\n<strong>            'game' =&gt; '\u30b2\u30fc\u30e0',<\/strong>\r\n<strong>            'food' =&gt; '\u98df\u7269',<\/strong>\r\n<strong>            'hobby' =&gt; '\u30db\u30d3\u30fc'<\/strong>\r\n<strong>        ];<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n    \/\/ \u7701\u7565\r\n}<\/pre>\n<p>\u5b9f\u306f\u3001\u3053\u308c\u3067\u8a2d\u5b9a\u306f\u5b8c\u4e86\u3067\u3059\u3002\uff08\u3064\u307e\u308a\u3001\u3044\u3061\u3044\u3061\u30d3\u30e5\u30fc\u306b\u5909\u6570\u3068\u3057\u3066\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u3057\u307e\u3059\u3088\u3001\u3068\u3044\u3046\u30b3\u30fc\u30c9\u3092\u66f8\u304b\u306a\u304f\u3066\u3082OK\u306a\u3093\u3067\u3059\ud83d\ude0a\u2728\uff09<\/p>\n<p>\u3067\u306f\u3001<code>\/resources\/views\/components\/search-box.blade.php<\/code>\u306e\u4e2d\u3067<code>sections()<\/code>\u306e\u4e2d\u8eab\u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>&lt;form action=\"\/search\"&gt;\r\n\r\n    &lt;!--\u7701\u7565--&gt;\r\n\r\n    &lt;select&gt;\r\n        &lt;option&gt;\u25bc\u4ee5\u4e0b\u304b\u3089\u9078\u629e&lt;option&gt;\r\n        <strong>@foreach($sections as $key =&gt; $name)<\/strong>\r\n<strong>            &lt;option value=\"{{ $key }}\"&gt;{{ $name }}&lt;\/option&gt;<\/strong>\r\n<strong>        @endforeach<\/strong>\r\n    &lt;\/select&gt;\r\n    &lt;button type=\"submit\"&gt;\u691c\u7d22&lt;\/button&gt;\r\n&lt;\/form&gt;<\/pre>\n<p>\u3053\u308c\u3067\u30af\u30e9\u30b9\u5185\u306e<code>sections()<\/code>\u304b\u3089\u30c7\u30fc\u30bf\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092\u5224\u5225\u3057\u305f\u7d50\u679c\u3092\u9001\u4fe1\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u5148\u307b\u3069\u4f5c\u3063\u305f\u30b3\u30fc\u30c9\u306e\u4e2d\u306b\u306f\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9\u304c\u3042\u308a\u307e\u3057\u305f\u304c\u3001\u3053\u306e\u521d\u671f\u5024\u3092\u300c\u30b2\u30fc\u30e0\u300d\u306b\u3059\u308b\u4f8b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code>\/app\/View\/Components\/SearchBox.php<\/code>\u3092\u958b\u3044\u3066\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\View\\Components;\r\n\r\nuse Illuminate\\View\\Component;\r\n\r\nclass SearchBox extends Component\r\n{\r\n    <strong>public $selected; \/\/ \u521d\u671f\u5024\uff08sections\u306ekey\uff09<\/strong>\r\n\r\n    \/**\r\n     * Create a new component instance.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function __construct(<strong>$selected<\/strong>)\r\n    {\r\n        <strong>$this-&gt;selected = $selected;<\/strong>\r\n    }\r\n\r\n    public function sections() {\r\n\r\n        return [\r\n            'book' =&gt; '\u672c',\r\n            'music' =&gt; '\u97f3\u697d',\r\n            'game' =&gt; '\u30b2\u30fc\u30e0',\r\n            'food' =&gt; '\u98df\u7269',\r\n            'hobby' =&gt; '\u30db\u30d3\u30fc'\r\n        ];\r\n\r\n    }\r\n\r\n    <strong>public function isSelected($option) {<\/strong>\r\n\r\n<strong>        return $option === $this-&gt;selected;<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n    \/**\r\n     * Get the view \/ contents that represent the component.\r\n     *\r\n     * @return \\Illuminate\\View\\View|string\r\n     *\/\r\n    public function render()\r\n    {\r\n        return view('components.search-box');\r\n    }\r\n}<\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u91cd\u8981\u306a\u306e\u304c\u3001<code>__construct()<\/code>\u306b<code>$selected<\/code>\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u90e8\u5206\u3068<code>isSelected()<\/code>\u306e\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001<code>$selected<\/code>\u306f\u521d\u671f\u5024\u3001\u3064\u307e\u308a\u4eca\u56de\u306e\u5834\u5408\u3067\u306f <code>game<\/code> \u304c\u5165\u3063\u3066\u304f\u308b\u4e88\u5b9a\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001<code>isSelected()<\/code>\u304c <code>true<\/code> \/ <code>false<\/code> \u306e\u5024\u3092\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5074\u306b\u9001\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\uff08\u306a\u304a\u3001\u5225\u306b<code>isSelected()<\/code>\u3067\u306f\u306a\u304f\u3001\u5225\u306e\u540d\u524d\u3067\u3082\u554f\u984c\u3042\u308a\u307e\u305b\u3093\uff09<\/p>\n<p>\u3067\u306f\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5074\u3092\u307f\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>&lt;form action=\"\/search\"&gt;\r\n    &lt;input type=\"text\" name=\"q\"&gt;\r\n    &lt;select&gt;\r\n        &lt;option&gt;\u25bc\u4ee5\u4e0b\u304b\u3089\u9078\u629e&lt;option&gt;\r\n        @foreach($sections as $key =&gt; $name)\r\n            <strong>&lt;option value=\"{{ $key }}\" {{ $isSelected($key) ? 'selected=\"selected\"' : '' }}&gt;{{ $name }}&lt;\/option&gt;<\/strong>\r\n        @endforeach\r\n    &lt;\/select&gt;\r\n    &lt;button type=\"submit\"&gt;\u691c\u7d22&lt;\/button&gt;\r\n&lt;\/form&gt;<\/pre>\n<p><code>&lt;option&gt;<\/code>\u30bf\u30b0\u306e\u4e2d\u3067\u4e09\u9805\u6f14\u7b97\u5b50\u3092\u4f7f\u3063\u305f\u6761\u4ef6\u5206\u3051\u304c\u3042\u308b\u306e\u304c\u308f\u304b\u3063\u3066\u3044\u305f\u3060\u3051\u308b\u3068\u601d\u3044\u307e\u3059\u3002\uff08\u305f\u3060\u3057\u3001<code>$isSelected()<\/code>\u3068<code>$<\/code>\u30de\u30fc\u30af\u304c\u3064\u3044\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<p>\u305d\u3057\u3066\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u547c\u3073\u51fa\u3059\u90e8\u5206\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>&lt;x-search-box <strong>selected=\"game\"<\/strong> \/&gt;<\/pre>\n<h1>\u30b9\u30bf\u30a4\u30eb\u3084\u30af\u30e9\u30b9\u3092\u8a2d\u5b9a\u3059\u308b<\/h1>\n<p>\u4f8b\u3048\u3070\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b<code>style<\/code>\u3084<code>class<\/code>\u306a\u3069\u306eHTML\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u76f4\u63a5\u4f7f\u3044\u305f\u3044\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>&lt;x-search-box <strong>style=\"background:#eee;padding:10px;\"<\/strong> :title=\"$title\" \/&gt;<\/pre>\n<p>\u3053\u306e\u5834\u5408\u3001<code>$attributes<\/code>\u3068\u3044\u3046\u5909\u6570\u3092\u4f7f\u3046\u3053\u3068\u3067\u5b9f\u88c5\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<pre>&lt;form action=\"\/search\" <strong>{{ $attributes }}<\/strong>&gt;\r\n\r\n    &lt;!-- \u7701\u7565 --&gt;\r\n\r\n&lt;\/form&gt;<\/pre>\n<p>\u3053\u306e\u5834\u5408\u3001\u5b9f\u969b\u306b\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u308bHTML\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<pre>&lt;form action=\"\/search\" <strong>style=\"background:#eee;padding:10px;\"<\/strong>&gt;\r\n\r\n    &lt;!-- \u7701\u7565 --&gt;\r\n\r\n&lt;\/form&gt;<\/pre>\n<p>\u306a\u304a\u3001<code>$attributes<\/code>\u306f\u5358\u306a\u308b\u5909\u6570\u3067\u306f\u306a\u304f<code>ComponentAttributeBag<\/code>\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306a\u306e\u3067\u3001\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>&lt;form action=\"\/search\" {{ <strong>$attributes-&gt;merge(['class' =&gt; 'my-class'])<\/strong> }}&gt;\r\n\r\n    &lt;!--\u7701\u7565--&gt;\r\n\r\n&lt;\/form&gt;<\/pre>\n<p>\u5b9f\u969b\u306eHTML\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>&lt;form action=\"\/search\" <strong>class=\"my-class\" style=\"background:#eee;padding:10px;\"<\/strong>&gt;\r\n    \r\n    &lt;!-- \u7701\u7565 --&gt;\r\n\r\n&lt;\/form&gt;<\/pre>\n<p>\u203b<code>$attributes<\/code>\u306b\u306f\u3001<code>only()<\/code>\u3084<code>except()<\/code>\u306a\u3069\u306e\u30e1\u30bd\u30c3\u30c9\u3082\u4f7f\u3048\u307e\u3059\u3002\u8a73\u3057\u304f\u306f<a href=\"https:\/\/laravel.com\/api\/master\/Illuminate\/View\/ComponentAttributeBag.html\" target=\"_blank\" rel=\"noopener noreferrer\">Illuminate\\View\\ComponentAttributeBag<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>\u30b9\u30ed\u30c3\u30c8\u3092\u3064\u304b\u3046<\/h1>\n<p>\u4eca\u56de\u306e\u65b0\u3057\u3044<code>&lt;x-***** \/&gt;<\/code>\u30bf\u30b0\u3067\u3082\u30b9\u30ed\u30c3\u30c8\u304c\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<h2>\u3072\u3068\u3064\u3060\u3051\u30b9\u30ed\u30c3\u30c8\u3092\u4f7f\u3046\u5834\u5408<\/h2>\n<p>\u30b9\u30ed\u30c3\u30c8\u3092\u3072\u3068\u3064\u3060\u3051\u4f7f\u3046\u5834\u5408\u306f\u3001\u3068\u3066\u3082\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u3002<br \/>\n\u4f8b\u3068\u3057\u3066\u9001\u4fe1\u30dc\u30bf\u30f3\u3092\u30b9\u30ed\u30c3\u30c8\u5316\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>&lt;form action=\"\/search\"&gt;\r\n    \r\n    &lt;!-- \u7701\u7565 --&gt;\r\n\r\n    &lt;!-- \u2193\u2193\u2193\u3053\u3053\u306b\u30dc\u30bf\u30f3\u304c\u5165\u308a\u307e\u3059 --&gt;\r\n    <strong>{{ $slot }}<\/strong>\r\n&lt;\/form&gt;<\/pre>\n<p>\u4f7f\u3044\u65b9\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>&lt;x-search-box&gt;\r\n    <strong>&lt;button type=\"submit\"&gt;\u5546\u54c1\u691c\u7d22&lt;\/button&gt;<\/strong>\r\n&lt;\/x-search-box&gt;<\/pre>\n<h2>\u30b9\u30ed\u30c3\u30c8\u3092\u8907\u6570\u4f7f\u3046\u5834\u5408<\/h2>\n<p>\u30b9\u30ed\u30c3\u30c8\u304c\u8907\u6570\u5fc5\u8981\u306a\u5834\u5408\u306f\u3001<code>x-slot<\/code>\u30bf\u30b0\u3092\u4f7f\u3063\u3066\u5404\u30b9\u30ed\u30c3\u30c8\u306b\u540d\u524d\u3092\u4ed8\u3051\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>&lt;x-search-box :title=\"$title\"&gt;\r\n    <strong>&lt;x-slot name=\"title\"&gt;\u30bf\u30a4\u30c8\u30eb&lt;\/x-slot&gt;<\/strong>\r\n<strong>    &lt;x-slot name=\"button\"&gt;<\/strong>\r\n<strong>        &lt;button type=\"submit\"&gt;\u5546\u54c1\u691c\u7d22&lt;\/button&gt;<\/strong>\r\n<strong>    &lt;\/x-slot&gt;<\/strong>\r\n&lt;\/x-search-box&gt;<\/pre>\n<p>\u305d\u3057\u3066\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5185\u3067\u306f\u305d\u308c\u305e\u308c<code>name=\"*****\"<\/code>\u306e\u4e2d\u8eab\u304c\u5909\u6570\u3068\u3057\u3066\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<pre>&lt;form action=\"\/search\"&gt;\r\n    <strong>{{ $title }}<\/strong>\r\n    \r\n    &lt;!-- \u7701\u7565 --&gt;\r\n\r\n    <strong>{{ $button }}<\/strong>\r\n&lt;\/form&gt;<\/pre>\n<p>\u5b9f\u969b\u306eHTML\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>&lt;form action=\"\/search\"&gt;\r\n    <strong>\u30bf\u30a4\u30c8\u30eb<\/strong>\r\n    \r\n    &lt;!-- \u7701\u7565 --&gt;\r\n\r\n    <strong>&lt;button type=\"submit\"&gt;\u5546\u54c1\u691c\u7d22&lt;\/button&gt;<\/strong>\r\n&lt;\/form&gt;<\/pre>\n<h1>\u7121\u540d\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<\/h1>\n<p>\u3053\u3053\u307e\u3067\u3044\u308d\u3044\u308d\u3068\u7d39\u4ecb\u3057\u3066\u304d\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u5834\u5408\u3001\u5b9f\u306f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30fb\u30af\u30e9\u30b9\u3092\u4f5c\u308b\u5fc5\u8981\u306f\u306a\u304f\u3001\u5358\u306b<code>\/resources\/views\/components<\/code>\u5185\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3059\u308b\u3060\u3051\u3067OK\u3067\u3059\u3002<\/p>\n<p>\u4f8b\u3068\u3057\u3066\u3001\u4eca\u65e5\u306e\u65e5\u4ed8\u3092\u8868\u793a\u3059\u308b\u3060\u3051\u306e\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u300c<strong>today<\/strong>\u300d\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code>\/resources\/views\/components\/today.blade.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u3066\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>{{ date('Y-m-d') }}<\/strong><\/pre>\n<p>\u4f7f\u3044\u65b9\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><strong>&lt;x-today \/&gt;<\/strong><\/pre>\n<p>\u3069\u3046\u3067\u3057\u3087\u3046\u3002<br \/>\n\u3053\u308c\u3060\u3051\u3067\u7c21\u5358\u306b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u3082\u3061\u308d\u3093\u30c7\u30fc\u30bf\u3092\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5074\u306b\u9001\u4fe1\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u3066\u3001\u4f8b\u3048\u3070\u6328\u62f6\u6587\u3092\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u8868\u793a\u3059\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3068OK\u3067\u3059\u3002<\/p>\n<pre><strong>{{ $greeting }}<\/strong>\r\n{{ date('Y-m-d') }}<\/pre>\n<pre>&lt;x-today <strong>greeting=\"\u3053\u3093\u306b\u3061\u306f\u3002\"<\/strong> \/&gt;<\/pre>\n<p>\u5b9f\u969b\u306b\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3059\u308b\u3068\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6002\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/blade_component_5.png\" alt=\"\" width=\"200\" height=\"29\" \/><\/p>\n<p>\u306a\u304a\u3001\u3053\u306e\u7121\u540d\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u6c17\u3092\u3064\u3051\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u304c\u3001\u300c\u3069\u308c\u304c\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u3069\u308c\u304c\u5909\u6570\u306e\u9001\u4fe1\u304b\u308f\u304b\u3089\u306a\u304f\u306a\u308b\u300d\u3068\u3044\u3046\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u4f8b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;x-today <strong>style=\"font-weight:bold;\" greeting=\"\u3053\u3093\u306b\u3061\u306f\u3002\"<\/strong> \/&gt;<\/pre>\n<p>\u3053\u308c\u306f\u5148\u307b\u3069\u306e\u4f8b\u306b<code>style<\/code>\u3092\u8ffd\u52a0\u3057\u305f\u3082\u306e\u3067\u3059\u304c\u3001\u3053\u308c\u3092<code>$attributes<\/code>\u3092\u4f7f\u3063\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u53d6\u5f97\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u5c11\u3057\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n<pre>&lt;div <strong>{{ $attributes }}<\/strong>&gt;\r\n    {{ $greeting }}\r\n    {{ date('Y-m-d') }}\r\n&lt;\/div&gt;<\/pre>\n<p>\u5b9f\u969b\u306eHTML\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>&lt;div style=\"font-weight:bold;\" <strong>greeting=\"\u3053\u3093\u306b\u3061\u306f\u3002\"<\/strong>&gt;\r\n    \u3053\u3093\u306b\u3061\u306f\u3002\r\n    2020-03-02\r\n&lt;\/div&gt;<\/pre>\n<p>\u305d\u3046\u3067\u3059\u3002<code>greeting<\/code>\u307e\u3067<code>style<\/code>\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u3066\u3057\u307e\u3046\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u3042\u308b\u306e\u304c\u3001<code>@props()<\/code>\u3067\u3059\u3002<br \/>\n\u4eca\u56de\u306e\u4f8b\u3067\u8a00\u3046\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067<code>greeting<\/code>\u3092\u9664\u5916\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><strong>@props(['greeting'])\r\n<\/strong>\r\n&lt;div {{ $attributes }}&gt;\r\n    {{ $greeting }}\r\n    {{ date('Y-m-d') }}\r\n&lt;\/div&gt;<\/pre>\n<p>\u51fa\u529b\u7d50\u679c\u306f\u3053\u3046\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre>&lt;div <strong>style=\"font-weight:bold;\"<\/strong>&gt;\r\n    \u3053\u3093\u306b\u3061\u306f\u3002\r\n    2020-03-02\r\n&lt;\/div&gt;<\/pre>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u4eca\u56de\u306f\u3001<code>Laravel 7.x<\/code>\u306e\u65b0\u3057\u3044\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u5c02\u7528\u306e\u30bf\u30b0\u3092HTML\u3068\u540c\u3058\u3088\u3046\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u306e\u3067\u3001\u30c7\u30b6\u30a4\u30ca\u30fc\u3055\u3093\u304c\u898b\u3066\u3082\u4fdd\u5b88\u304c\u3057\u3084\u3059\u304f\u306a\u308b\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u307e\u305f\u3001\u3082\u3061\u308d\u3093\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u4f7f\u3044\u56de\u3057\u304c\u3057\u3084\u3059\u3044\u306e\u3067\u4e00\u5ea6\u3044\u3044\u3082\u306e\u3092\u3064\u304f\u3063\u3066\u304a\u3051\u3070\u3042\u3068\u3067\u697d\u304c\u3067\u304d\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082\u5c06\u6765\u306e\u305f\u3081\u306b\u9811\u5f35\u3063\u3066\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f5c\u3063\u3066\u898b\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2597 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/15-2.png\" alt=\"\" width=\"275\" height=\"350\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/15-2.png 275w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/15-2-236x300.png 236w\" sizes=\"auto, (max-width: 275px) 100vw, 275px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001Laravel\u306e\u30d0\u30fc\u30b8\u30e7\u30f37.x\u304c\u3064\u3044\u306b\u516c\u958b\u3055\u308c\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u4e00\u8db3\u5148\u306b\u3069\u306e\u3088\u3046\u306a\u6a5f\u80fd\u304c\u8ffd\u52a0\u306b\u306a\u3063\u305f\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u305f\u3002 \u3044\u304f\u3064\u304bLaravel  &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=5993\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Laravel 7.x\u306e\u65b0\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u6a5f\u80fd\uff01\u5b9f\u4f8b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":6006,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[57,68],"class_list":["post-5993","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","tag-blade","tag-68"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5993","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5993"}],"version-history":[{"count":16,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5993\/revisions"}],"predecessor-version":[{"id":6225,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5993\/revisions\/6225"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/6006"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}