{"id":1215,"date":"2018-09-12T04:51:43","date_gmt":"2018-09-11T19:51:43","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=1215"},"modified":"2019-12-10T20:41:03","modified_gmt":"2019-12-10T11:41:03","slug":"%e3%80%90laravel%e3%80%91%e9%83%b5%e4%be%bf%e7%95%aa%e5%8f%b7%e3%81%a7%e4%bd%8f%e6%89%80%e6%a4%9c%e7%b4%a2%e3%81%99%e3%82%8b%ef%bc%88%e3%83%80%e3%82%a6%e3%83%b3%e3%83%ad%e3%83%bc%e3%83%89%e5%8f%af","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=1215","title":{"rendered":"\u3010Laravel\u3011\u90f5\u4fbf\u756a\u53f7\u3067\u4f4f\u6240\u691c\u7d22\u3059\u308b\uff08\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u53ef\uff09"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001Laravel<code>5.7<\/code>\u306e\u65b0\u6a5f\u80fd\u3092<a href=\"https:\/\/blog.capilano-fw.com\/?p=1147\">Laravel 5.7 \u306e\u65b0\u6a5f\u80fd\u307e\u3068\u3081<\/a>\u3067\u4e00\u901a\u308a\u89e6\u3063\u3066\u307f\u305f\u306e\u3067\u3053\u306e\u8fba\u3067\u4ee5\u524d\u304b\u3089\u4f5c\u3063\u3066\u304a\u304d\u305f\u304b\u3063\u305f\u3001\u3042\u308b\u6a5f\u80fd\u3092\u3064\u304f\u308b\u3053\u3068\u306b\u6642\u9593\u3092\u5272\u304f\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u306e\u6a5f\u80fd\u3068\u306f\u3001<strong>\u90f5\u4fbf\u756a\u53f7\u691c\u7d22<\/strong>\u3067\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001<code>131-0045<\/code>\u3068\u90f5\u4fbf\u756a\u53f7\u3092\u5165\u308c\u3066\u691c\u7d22\u3059\u308b\u3068<code>\u6771\u4eac\u90fd\u58a8\u7530\u533a\u62bc\u4e0a<\/code>\u3068\u3044\u3046\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3067\u304d\u308b\u6a5f\u80fd\u3067\u3059\u306d\u3002<\/p>\n<p>\u3082\u3061\u308d\u3093\u3001JavaScript\u306b\u307b\u3093\u306e\u5c11\u3057\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3059\u308b\u3060\u3051\u3067\u3001\u3053\u306e\u6a5f\u80fd\u3092\u5b9f\u88c5\u3067\u304d\u308b<a href=\"https:\/\/github.com\/ajaxzip3\/ajaxzip3.github.io\" target=\"_blank\" rel=\"noopener noreferrer\">ajaxzip3<\/a>\u3068\u3044\u3046\u7d20\u6674\u3089\u3057\u3044\u30b5\u30fc\u30d3\u30b9\u304c\u3042\u308b\u3053\u3068\u306f\u77e5\u3063\u3066\u3044\u307e\u3059\u3002\uff08\u3068\u3044\u3046\u304b\u3088\u304f\u5229\u7528\u3055\u305b\u3066\u3044\u305f\u3060\u3044\u3066\u307e\u3059\u3002\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002m_ _m\uff09<\/p>\n<p>\u304c\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3055\u3093\u306b\u3088\u3063\u3066\u306f\u300c\u5c06\u6765\u7684\u306b\u306a\u304f\u306a\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u30b5\u30fc\u30d3\u30b9\u306f\u6975\u529b\u4f7f\u308f\u306a\u3044\u300d\u65b9\u91dd\u306e\u65b9\u304c\u3044\u3089\u3063\u3057\u3083\u308b\u306e\u3082\u4e8b\u5b9f\u3067\u3059<strong>\u3002\u5b9f\u969b\u3001ajaxzip\u306f\u904e\u53bb\u306bGoogle Code\u304b\u3089GitHub\u3078\u79fb\u884c\u3057\u3066\u3044\u307e\u3059<\/strong>\u3057\u3001Google\u306f\u7279\u306b\u3088\u304f\u30b5\u30fc\u30d3\u30b9\u3092\u7d42\u4e86\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u4e0b\u624b\u3059\u308b\u3068cdn\u306a\u3069\u3082\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u53ef\u80fd\u6027\u3060\u3063\u3066\u3042\u308b\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u4eca\u56de\u306f\u72ec\u81ea\u306e\u90f5\u4fbf\u756a\u53f7\u691c\u7d22\u3092\u4f5c\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u305c\u3072\u307f\u306a\u3055\u3093\u3082\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-417 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/9.png\" alt=\"\" width=\"370\" height=\"220\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/9.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/9-300x178.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/p>\n<p>\u3010\u8ffd\u8a18\uff1a2019.12.10\u3011\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9\u3092\u30d9\u30fc\u30b9\u3068\u3057\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u516c\u958b\u3057\u307e\u3057\u305f\u3002\u8a73\u3057\u304f\u306f<a href=\"https:\/\/blog.capilano-fw.com\/?p=5276\">\u6642\u77ed\uff01\u90f5\u4fbf\u756a\u53f7\u304b\u3089\u4f4f\u6240\u304c\u691c\u7d22\u3067\u304d\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u516c\u958b\u3057\u307e\u3057\u305f<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\uff01<\/p>\n<h1>\u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>\u5192\u982d\u90e8\u5206\u3067\u3082\u66f8\u304d\u307e\u3057\u305f\u304c\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u6d41\u308c\u3092\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u90f5\u4fbf\u756a\u53f7\u3092&lt;input type=&#8221;text&#8221;&gt;\u306b\u5165\u529b\u3059\u308b<\/li>\n<li>\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068Ajax\u7d4c\u7531\u3067\u90f5\u4fbf\u756a\u53f7\u306b\u5bfe\u5fdc\u3059\u308b\u4f4f\u6240\u3092\u691c\u7d22\u3059\u308b<\/li>\n<li>\u4f4f\u6240\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001\u4f4f\u6240\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3067\u8868\u793a\u3059\u308b<\/li>\n<\/ol>\n<p>\u203b \u958b\u767a\u74b0\u5883\u306f<code>Laravel 5.7<\/code> + <code>nginx<\/code>\u00a0+ <code>PHP 7.2<\/code> \u3067\u3059\u3002<\/p>\n<h1>\u90f5\u4fbf\u756a\u53f7\u691c\u7d22\u3092\u3064\u304f\u308b<\/h1>\n<h2>\u30c7\u30fc\u30bf\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/h2>\n<p>\u90f5\u4fbf\u30c7\u30fc\u30bf\u306f\u65e5\u672c\u90f5\u4fbf\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3067CSV\u3068\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002\u4eca\u56de\u306f<a href=\"https:\/\/www.post.japanpost.jp\/zipcode\/dl\/oogaki-zip.html\" target=\"_blank\" rel=\"noopener noreferrer\">\u8aad\u307f\u4eee\u540d\u30c7\u30fc\u30bf\u306e\u4fc3\u97f3\u30fb\u62d7\u97f3\u3092\u5c0f\u66f8\u304d\u3067\u8868\u8a18\u3057\u306a\u3044\u3082\u306e<\/a>\u306e\u4e2d\u306b\u3042\u308b<code>ken_all.zip<\/code>\u3068\u3044\u3046\u5168\u56fd\u4e00\u62ec\u7248\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1216\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/yubin_download_1.png\" alt=\"\" width=\"978\" height=\"196\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/yubin_download_1.png 978w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/yubin_download_1-300x60.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/yubin_download_1-768x154.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1216\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/yubin_download_2.png\" alt=\"\" width=\"978\" height=\"196\" \/><\/p>\n<p>\u3067\u306f\u3053\u306ezip\u30d5\u30a1\u30a4\u30eb\u3092\u5c55\u958b\u3057\u3066<code>KEN_ALL.CSV<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u308a\u51fa\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001Laravel\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u3001<code>storage\/csv\/<\/code>\u5185\u306b\u30b3\u30d4\u30fc\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1218\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/ken_all_csv.png\" alt=\"\" width=\"114\" height=\"79\" \/><\/p>\n<h2>\u90f5\u4fbf\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b<\/h2>\n<p>CSV\u306e\u307e\u307e\u3067\u306f\u691c\u7d22\u3057\u306b\u304f\u3044\u306e\u3067\u3001\u5fc5\u8981\u306a\u30c7\u30fc\u30bf\u306f\u5168\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306b\u79fb\u52d5\u3055\u305b\u307e\u3059\u3002\u3067\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u8a2d\u8a08\u66f8\u300c\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u300d\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3069\u3046\u305b\u5f8c\u3067\u5fc5\u8981\u306b\u306a\u308b\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3068\u540c\u6642\u306b\u30e2\u30c7\u30eb\u3082\u4f5c\u6210\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>php artisan make:model PostalCode -m<\/strong><\/pre>\n<p>\u3067\u306f\u3001<code>database\/migrations<\/code>\u5185\u306b<code>xxxx_xx_xx_xxxxxx_create_postal_codes_table.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u3067\u304d\u3066\u3044\u308b\uff08\u4f5c\u6210\u6642\u9593\u306b\u3088\u3063\u3066\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u82e5\u5e72\u9055\u3044\u307e\u3059\uff09\u306e\u3067\u3001up()\u306e\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre>public function up()\r\n{\r\n    Schema::create('postal_codes', function (Blueprint $table) {\r\n        <strong>$table-&gt;increments('id');<\/strong>\r\n<strong>        $table-&gt;unsignedInteger('first_code')-&gt;index();<\/strong>\r\n<strong>        $table-&gt;unsignedInteger('last_code')-&gt;index();<\/strong>\r\n<strong>        $table-&gt;string('prefecture');<\/strong>\r\n<strong>        $table-&gt;string('city');<\/strong>\r\n<strong>        $table-&gt;string('address');<\/strong>\r\n    });\r\n}<\/pre>\n<p>\u5185\u5bb9\u306f\u3001<\/p>\n<ol>\n<li><strong>ID<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u30aa\u30fc\u30c8\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u3067\u9023\u756a<\/li>\n<li><strong>first_code<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u90f5\u4fbf\u756a\u53f7\u306e\u59cb\u3081\uff08\uff13\u6841\uff09\u306e\u90e8\u5206<\/li>\n<li><strong>last_code<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u90f5\u4fbf\u756a\u53f7\u306e\u5f8c\u308d\uff08\uff14\u6841\uff09\u306e\u90e8\u5206<\/li>\n<li><strong>prefecture<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u90fd\u9053\u5e9c\u770c\u540d<\/li>\n<li><strong>city<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u5e02\u533a\u753a\u6751<\/li>\n<li><strong>address<\/strong>\u3000\u30fb\u30fb\u30fb\u3000\u305d\u308c\u79fb\u884c\u306e\u4f4f\u6240<\/li>\n<\/ol>\n<p>\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u90f5\u4fbf\u30c7\u30fc\u30bf\u306f\u30de\u30b9\u30bf\u30fc\u30c7\u30fc\u30bf\u306a\u306e\u3067<code>$table-&gt;timestamps();<\/code>\u306f\u524a\u9664\u3057\u3066\u3044\u307e\u3059\u3002\uff08\u3064\u307e\u308a\u3001<code>created_at<\/code>\u3068<code>updated_at<\/code>\u3092\u4f7f\u308f\u306a\u3044\uff09<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001<code>PostalCode<\/code>\u3067\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u4f7f\u308f\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3001\u3064\u3044\u3067\u306b\u30c7\u30fc\u30bf\u8ffd\u52a0\u6642\u306b\u30a8\u30e9\u30fc\u304c\u3067\u306a\u3044\u3088\u3046<code>$guarded<\/code>\u3082\u8ffd\u52a0\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App;\r\n\r\nuse Illuminate\\Database\\Eloquent\\Model;\r\n\r\nclass PostalCode extends Model\r\n{\r\n    <strong>public $timestamps = false;\r\n    protected $guarded = ['id'];<\/strong>\r\n}<\/pre>\n<p>\u3067\u306f\u3001\u3053\u308c\u3067\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u306f\u5b8c\u6210\u3057\u307e\u3057\u305f\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>php artisan migrate<\/strong><\/pre>\n<h2>\u90f5\u4fbf\u30c7\u30fc\u30bf\u3092DB\u3078\u79fb\u52d5\u3055\u305b\u308b<\/h2>\n<p>\u90f5\u4fbf\u30c7\u30fc\u30bf\u306fSeeder\u3092\u4f5c\u3063\u3066\u683c\u7d0d\u3057\u3066\u3082\u3044\u3044\u306e\u3067\u3059\u304c\u3001\u5148\u307b\u3069\u306e\u65e5\u672c\u90f5\u4fbf\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30da\u30fc\u30b8\u3092\u898b\u308b\u3068\u7d50\u69cb\u983b\u7e41\u306b\u30c7\u30fc\u30bf\u66f4\u65b0\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3057\u305f\u306e\u3067\u3001\u305d\u306e\u90fd\u5ea6\u66f4\u65b0\u304c\u3057\u3084\u3059\u3044\u3088\u3046\u306b\u72ec\u81ea\u306e\u30b3\u30de\u30f3\u30c9\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan make:command ImportPostalCodeCommand<\/strong><\/pre>\n<p>\u6b21\u306b\u3001<code>app\/Console\/Commands\/ImportPostalCodeCommand.php<\/code>\u3092\u958b\u3044\u3066\u3001\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002\u5909\u66f4\u3001\u8ffd\u52a0\u3057\u305f\u5834\u6240\u306f<strong>\u592a\u5b57<\/strong>\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Console\\Commands;\r\n\r\nuse Illuminate\\Console\\Command;\r\n\r\nclass ImportPostalCodeCommand extends Command\r\n{\r\n    \/**\r\n     * The name and signature of the console command.\r\n     *\r\n     * @var string\r\n     *\/\r\n    protected $signature = <strong>'import:postal-code'<\/strong>;\r\n\r\n    \/**\r\n     * The console command description.\r\n     *\r\n     * @var string\r\n     *\/\r\n    protected $description = <strong>'Import postal-code'<\/strong>;\r\n\r\n    \/**\r\n     * Create a new command instance.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function __construct()\r\n    {\r\n        parent::__construct();\r\n    }\r\n\r\n    \/**\r\n     * Execute the console command.\r\n     *\r\n     * @return mixed\r\n     *\/\r\n    public function handle()\r\n    {\r\n        <strong>\/\/ \u30c6\u30fc\u30d6\u30eb\u3092\u7a7a\u306b\u3059\u308b\r\n        \\App\\PostalCode::truncate();\r\n\r\n        \/\/ CSV\u30d5\u30a1\u30a4\u30eb\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u5909\u63db\r\n        $csv_path = storage_path('app\/csv\/KEN_ALL.CSV');\r\n        $converted_csv_path = storage_path('app\/csv\/postal_code_utf8.csv');\r\n        file_put_contents(\r\n            $converted_csv_path,\r\n            mb_convert_encoding(\r\n                file_get_contents($csv_path),\r\n                'UTF-8',\r\n                'SJIS-win'\r\n            )\r\n        );\r\n\r\n        \/\/ CSV\u304b\u3089\u90f5\u4fbf\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3066DB\u3078\u4fdd\u5b58\r\n        $file = new \\SplFileObject($converted_csv_path);\r\n        $file-&gt;setFlags(\\SplFileObject::READ_CSV);\r\n\r\n        foreach ($file as $row) {\r\n<\/strong>\r\n<strong>            if(!is_null($row[0])) {<\/strong>\r\n<strong>\r\n                \\App\\PostalCode::create([\r\n                    'first_code' =&gt; intval(substr($row[2], 0, 3)),\r\n                    'last_code' =&gt; intval(substr($row[2], 3, 4)),\r\n                    'prefecture' =&gt; $row[6],\r\n                    'city' =&gt; $row[7],\r\n                    'address' =&gt; (str_contains($row[8], '\uff08')) ? current(explode('\uff08', $row[8])) : $row[8]\r\n                ]);<\/strong>\r\n\r\n<strong>            }\r\n\r\n        }<\/strong>\r\n    }\r\n}<\/pre>\n<p>\u3067\u306f\u3001<code>php artisan import:postal-code<\/code>\u3092\u5b9f\u884c\u3057\u3066\u90f5\u4fbf\u30c7\u30fc\u30bf\u3092\u79fb\u52d5\u3055\u305b\u307e\u3057\u3087\u3046\u3002\uff08\u5168\uff11\uff12\u4e07\u4ef6\u3068\u3001\u30c7\u30fc\u30bf\u91cf\u304c\u3068\u3066\u3082\u5927\u304d\u3044\u306e\u3067\u3001\u5c11\u3057\u6642\u9593\u304c\u304b\u304b\u308b\u306f\u305a\u3067\u3059\u3002PHP\u304c\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3059\u308b\u5834\u5408\u306f<code>php.ini<\/code>\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u3066\u518d\u5ea6\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001<code>address<\/code>\u306e\u90e8\u5206\u3067\u306f\u62ec\u5f27\u66f8\u304d\u306e\u60c5\u5831\u304c\u5165\u3063\u3066\u304f\u308b\u5834\u5408\u306f\u304c\u3042\u308b\u306e\u3067\u3001\u305d\u306e\u5834\u5408\u306f\u5206\u5272\u3057\u3066\u6700\u521d\u306e\u6587\u5b57\u5217\u3092\u4fdd\u5b58\u30c7\u30fc\u30bf\u3068\u3057\u3066\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3010\u8ffd\u8a18\uff1a2019.12.10\u3011<\/p>\n<p>CSV\u306e\u5185\u5bb9\u306b\u3088\u3063\u3066\u306f\u3001\u6700\u5f8c\u306e\u884c\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u306e\u3067<code>if<\/code>\u6587\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002<\/p>\n<h1>\u691c\u7d22\u30c7\u30fc\u30bf\u3092\u6271\u3044\u3084\u3059\u304f\u3059\u308b\u305f\u3081\u306b\u30e2\u30c7\u30eb\u306b\u6a5f\u80fd\u8ffd\u52a0\u3059\u308b<\/h1>\n<h2>\u30b9\u30b3\u30fc\u30d7\u3067\u691c\u7d22\u5c02\u7528\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3059\u308b<\/h2>\n<p><code>postal_codes<\/code>\u30c6\u30fc\u30d6\u30eb\u306f\u307b\u307c\u90f5\u4fbf\u756a\u53f7\u304b\u3089\u306e\u307f\u306e\u691c\u7d22\u306b\u306a\u308b\u306f\u305a\u3067\u3059\u306e\u3067\u3001\u691c\u7d22\u7528\u306ewhere\u30e1\u30bd\u30c3\u30c9\u3092\u3064\u304f\u3063\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>\/\/ Scope\r\n<strong>public function scopeWhereSearch($query, $first_code, $last_code) {\r\n\r\n    $query-&gt;where('first_code', intval($first_code))\r\n        -&gt;where('last_code', $last_code);\r\n\r\n}<\/strong><\/pre>\n<p>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3092<code>PostalCode<\/code>\u30e2\u30c7\u30eb\u3078\u8ffd\u52a0\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u4f7f\u3044\u65b9\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>\\App\\PostalCode::<strong>whereSearch('131', '0045')-&gt;first()<\/strong>;<\/pre>\n<p>\u307e\u305f\u3001<code>first_code<\/code>\u3068<code>last_code<\/code>\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u3046\u305f\u3081\u306b\u6570\u5024\u30d5\u30a3\u30fc\u30eb\u30c9\u3068\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u307e\u307e\u3067\u306f\u90f5\u4fbf\u756a\u53f7\u3068\u3057\u3066\u306f\u9593\u9055\u3063\u3066\u3044\u308b\u306e\u3067\u3001<code>accessor<\/code>\u3092\u4f5c\u3063\u3066\u6570\u5024\u3092\u30bc\u30ed\u3067\u57cb\u3081\u308b\u3088\u3046\u306b\u52a0\u5de5\u3057\u307e\u3059\u3002<\/p>\n<pre>\/\/ Accessor\r\n<strong>public function getFirstCodeAttribute($value) {<\/strong>\r\n\r\n<strong>    return str_pad($value, 3, '0', STR_PAD_LEFT);<\/strong>\r\n\r\n<strong>}<\/strong>\r\n\r\n<strong>public function getLastCodeAttribute($value) {<\/strong>\r\n\r\n<strong>    return str_pad($value, 4, '0', STR_PAD_LEFT);<\/strong>\r\n\r\n<strong>}<\/strong><\/pre>\n<p>\u3067\u306f\u30c7\u30fc\u30bf\u306e\u4e2d\u8eab\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>Array\r\n(\r\n    [id] =&gt; 39314\r\n    [first_code] =&gt; 131\r\n    [last_code] =&gt; 0045\r\n    [prefecture] =&gt; \u6771\u4eac\u90fd\r\n    [city] =&gt; \u58a8\u7530\u533a\r\n    [address] =&gt; \u62bc\u4e0a\r\n)<\/pre>\n<p>\u3061\u306a\u307f\u306b\u30c7\u30fc\u30bf\u306f\uff11\uff12\u4e07\u4ef6\u3092\u8d85\u3048\u3066\u3044\u307e\u3059\u304c\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u304a\u304b\u3052\u3067\u30b9\u30d4\u30fc\u30c7\u30a3\u30fc\u306b\u30c7\u30fc\u30bf\u53d6\u5f97\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h1>Ajax\u3092\u901a\u3057\u3066\u4f4f\u6240\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u3053\u3053\u304b\u3089\u306f\u5b9f\u969b\u306b\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u3092\u4f5c\u3063\u3066\u90f5\u4fbf\u756a\u53f7\u3092\u5165\u529b\u3057\u3001Ajax\u7d4c\u7531\u3067\u4f4f\u6240\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067<code>postal_code.blade.php<\/code>\u304c\u30d3\u30e5\u30fc\u3068\u3057\u3066\u8fd4\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre>public function postal_code() {\r\n\r\n    <strong>return view('postal_code');<\/strong>\r\n\r\n}<\/pre>\n<h2>JavaScript\u90e8\u5206\u3092\u3064\u304f\u308b<\/h2>\n<pre>&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/vue@2.5.17\/dist\/vue.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/axios\/0.18.0\/axios.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script&gt;\r\n\r\n    <strong>new Vue({<\/strong>\r\n<strong>        el: '#app',<\/strong>\r\n<strong>        data: {<\/strong>\r\n<strong>            firstCode: '',<\/strong>\r\n<strong>            lastCode: '',<\/strong>\r\n<strong>            prefecture: '',<\/strong>\r\n<strong>            city: '',<\/strong>\r\n<strong>            address: ''<\/strong>\r\n<strong>        },<\/strong>\r\n<strong>        methods: {<\/strong>\r\n<strong>            onClick: function() {<\/strong>\r\n\r\n<strong>                const url = '\/ajax\/postal_search?'+ [<\/strong>\r\n<strong>                    'first_code='+ this.firstCode,<\/strong>\r\n<strong>                    'last_code='+ this.lastCode<\/strong>\r\n<strong>                ].join('&amp;');<\/strong>\r\n\r\n<strong>                axios.get(url).then((response) =&gt; {<\/strong>\r\n\r\n<strong>                    this.prefecture = response.data.prefecture;<\/strong>\r\n<strong>                    this.city = response.data.city;<\/strong>\r\n<strong>                    this.address = response.data.address;<\/strong>\r\n\r\n<strong>                });<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n<strong>        }<\/strong>\r\n<strong>    });<\/strong>\r\n\r\n&lt;\/script&gt;<\/pre>\n<p><code>Vue<\/code>\u3068<code>axios<\/code>\u3092cdn\u3067\u8aad\u307f\u8fbc\u3093\u3067\uff08\u2190\u4eca\u56de\u306e\u30b3\u30f3\u30bb\u30d7\u30c8\u3068\u3057\u3066\u306fcdn\u306f\u3054\u6cd5\u5ea6\u3067\u3059\u304c\u3001\u30c6\u30b9\u30c8\u3067\u5206\u304b\u308a\u3084\u3059\u3044\u306e\u3067\u4f7f\u3044\u307e\u3057\u305f\u3002\u3042\u3057\u304b\u3089\u305a\u3002m_ _m\uff09\u3001\u5404\u7a2e\u5909\u6570\u3092\u5ba3\u8a00\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3068\u304d\u306b\u8d77\u52d5\u3059\u308b<code>onClick<\/code>\u3082\u8ffd\u52a0\u3002Ajax\u7d4c\u7531\u3067\u90f5\u4fbf\u756a\u53f7\u691c\u7d22\u3057\u3001\u30c7\u30fc\u30bf\u304c\u8fd4\u3063\u3066\u304d\u305f\u3089\u5404\u7a2e\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u306b\u53cd\u6620\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>HTML\u90e8\u5206\u3092\u3064\u304f\u308b<\/h2>\n<pre>&lt;div id=\"app\"&gt;\r\n    &lt;input type=\"text\" <strong>v-model=\"firstCode\"<\/strong>&gt;&amp;nbsp;-&amp;nbsp;&lt;input type=\"text\" <strong>v-model=\"lastCode\"<\/strong>&gt;\r\n    &lt;button type=\"button\" <strong>@click=\"onClick\"<\/strong>&gt;\u90f5\u4fbf\u756a\u53f7\u691c\u7d22&lt;\/button&gt;\r\n    &lt;hr&gt;\r\n    \u90fd\u9053\u5e9c\u770c\uff1a &lt;input type=\"text\" <strong>v-model=\"prefecture\"<\/strong>&gt;\r\n    \u5e02\u533a\u753a\u6751\u540d\uff1a &lt;input type=\"text\" <strong>v-model=\"city\"<\/strong>&gt;\r\n    \u305d\u308c\u4ee5\u964d\uff1a &lt;input type=\"text\" <strong>v-model=\"address\"<\/strong>&gt;\r\n&lt;\/div&gt;<\/pre>\n<p>\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u306b\u306fVue\u5074\u3067\u5ba3\u8a00\u3057\u305f\u5909\u6570\u3092\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001<code>@click<\/code>\u306b<code>onClick<\/code>\u3082\u5fd8\u308c\u305a\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001\u898b\u305f\u76ee\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1219\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/postal_inputs.png\" alt=\"\" width=\"510\" height=\"76\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/postal_inputs.png 510w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/postal_inputs-300x45.png 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/p>\n<h2>PHP\u5074\uff08\u90f5\u4fbf\u756a\u53f7\u691c\u7d22\uff09\u3092\u4f5c\u308b<\/h2>\n<p>\u6700\u5f8c\u306b\u3001Ajax\u901a\u4fe1\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b\u5148\u306e\u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u9069\u5f53\u306a\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>public function search(Request $request) {\r\n\r\n    <strong>return \\App\\PostalCode::whereSearch($request-&gt;first_code, $request-&gt;last_code)-&gt;first();<\/strong>\r\n\r\n}<\/pre>\n<p>\u5148\u307b\u3069\u4f5c\u3063\u305f<code>whereSearch()<\/code>\u3092\u3053\u3053\u3067\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<h1>\u5b9f\u969b\u306b\u691c\u7d22\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u691c\u7d22\u304c\u3069\u306e\u3088\u3046\u306b\u306a\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1220\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/postal_inputs_2.png\" alt=\"\" width=\"510\" height=\"76\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/postal_inputs_2.png 510w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/postal_inputs_2-300x45.png 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/p>\n<p>\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1221\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/postal_inputs_3.png\" alt=\"\" width=\"511\" height=\"78\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/postal_inputs_3.png 511w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/09\/postal_inputs_3-300x46.png 300w\" sizes=\"auto, (max-width: 511px) 100vw, 511px\" \/><\/p>\n<p>\u3046\u307e\u304f\u30c7\u30fc\u30bf\u3092\u53cd\u6620\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\uff01<\/p>\n<p>\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\u3002<\/p>\n<p>\u203b\u3061\u306a\u307f\u306b\u3001\u4eca\u56de\u306f\u30c6\u30b9\u30c8\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u9001\u4fe1\u30c7\u30fc\u30bf\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306f\u5168\u304f\u884c\u3063\u3066\u3044\u307e\u305b\u3093\u306e\u3067\u304a\u6c17\u3092\u3064\u3051\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>\u30b3\u30fc\u30c9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/h1>\n<p>\u4ee5\u4e0b\u306e\u30dc\u30bf\u30f3\u304b\u3089\u3001\u4eca\u56de\u4f7f\u3063\u305f\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002\u4e2d\u8eab\u306fLaravel\u306e\u30d5\u30a1\u30a4\u30eb\u69cb\u9020\u306e\u307e\u307e\u3067\u3001\u4eca\u56de\u4f7f\u3063\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u307f\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u9069\u5b9c\u8a72\u5f53\u3059\u308b\u30d5\u30a9\u30eb\u30c0\u3078\u30b3\u30d4\u30fc\u3057\u3066\u5229\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u90f5\u4fbf\u756a\u53f7\u30c7\u30fc\u30bf\u306eCSV\u306f\u5165\u3063\u3066\u3044\u307e\u305b\u3093\u306e\u3067\u3054\u81ea\u8eab\u3067\u65e5\u672c\u90f5\u4fbf\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u203b\u306a\u304a\u3001autoload\u304c\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u5834\u5408\u304c\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u305d\u306e\u5834\u5408\u306f<code>composer dumpautoload -o<\/code>\u3092\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\uff1a<\/strong><\/p>\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/blog.capilano-fw.com?download=1223&amp;tmstv=1777537671\" rel=\"nofollow\" id=\"download-link-1223\" data-redirect=\"false\" >\n\t\u90f5\u4fbf\u756a\u53f7\u691c\u7d22\u3092\u5b9f\u88c5\u3059\u308b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/a>\n\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u524d\u304b\u3089\u4f5c\u3063\u3066\u304a\u304d\u305f\u304b\u3063\u305f\u90f5\u4fbf\u756a\u53f7\u306e\u691c\u7d22\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u5b9f\u306f\u3001\u8a18\u4e8b\u3092\u66f8\u304f\u524d\u306f\u305d\u308c\u307b\u3069\u30b3\u30fc\u30c9\u91cf\u304c\u591a\u304f\u306a\u308b\u3068\u306f\u601d\u3063\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u306a\u3093\u3060\u304b\u3093\u3060\u3067\u3044\u308d\u3044\u308d\u3068\u30d5\u30a1\u30a4\u30eb\u304c\u5fc5\u8981\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u5c11\u3057\u8907\u96d1\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\u4eca\u5f8c\u3082\u3057\u6642\u9593\u304c\u3067\u304d\u305f\u3089<code>laravel-jp-postal-code<\/code>\u307f\u305f\u3044\u306a\u540d\u524d\u3067\u72ec\u81ea\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u516c\u958b\u3057\u3001\u8ab0\u3067\u3082\u7c21\u5358\u306b\u90f5\u4fbf\u756a\u53f7\u691c\u7d22\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u3067\u304d\u308c\u3070\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002\u5b8c\u6210\u3057\u305f\u3089\u3053\u306e\u30da\u30fc\u30b8\u3067\u304a\u77e5\u3089\u305b\u3059\u308b\u306e\u3067\u3001\u305c\u3072\u3054\u671f\u5f85\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u3002<\/p>\n<p>\u3010\u8ffd\u8a18\uff1a2019.12.10\u3011\u5b9f\u969b\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u516c\u958b\u3057\u307e\u3057\u305f\u3002\u8a73\u3057\u304f\u306f<a href=\"https:\/\/blog.capilano-fw.com\/?p=5276\">\u6642\u77ed\uff01\u90f5\u4fbf\u756a\u53f7\u304b\u3089\u4f4f\u6240\u304c\u691c\u7d22\u3067\u304d\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u516c\u958b\u3057\u307e\u3057\u305f<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-519 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/05\/21.png\" alt=\"\" width=\"192\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/05\/21.png 192w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/05\/21-180x300.png 180w\" sizes=\"auto, (max-width: 192px) 100vw, 192px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001Laravel5.7\u306e\u65b0\u6a5f\u80fd\u3092Laravel 5.7 \u306e\u65b0\u6a5f\u80fd\u307e\u3068\u3081\u3067\u4e00\u901a\u308a\u89e6\u3063\u3066\u307f\u305f\u306e\u3067\u3053\u306e\u8fba\u3067\u4ee5\u524d\u304b\u3089\u4f5c\u3063\u3066\u304a\u304d\u305f\u304b\u3063\u305f\u3001\u3042\u308b\u6a5f\u80fd\u3092\u3064\u304f\u308b\u3053\u3068\u306b\u6642 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=1215\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Laravel\u3011\u90f5\u4fbf\u756a\u53f7\u3067\u4f4f\u6240\u691c\u7d22\u3059\u308b\uff08\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u53ef\uff09&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":1238,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,97],"tags":[35,85],"class_list":["post-1215","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","category-97","tag-ajax","tag-85"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/1215","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=1215"}],"version-history":[{"count":15,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/1215\/revisions"}],"predecessor-version":[{"id":5288,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/1215\/revisions\/5288"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/1238"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}