{"id":5663,"date":"2015-01-08T00:16:35","date_gmt":"2015-01-07T15:16:35","guid":{"rendered":"http:\/\/www.webcyou.com\/?p=5663"},"modified":"2015-01-08T00:16:35","modified_gmt":"2015-01-07T15:16:35","slug":"%e9%81%85%e3%82%8c%e3%81%be%e3%81%97%e3%81%9f%e3%81%8c-%e3%81%82%e3%81%91%e3%81%be%e3%81%97%e3%81%a6%e3%81%8a%e3%82%81%e3%81%a7%e3%81%a8%e3%81%86%e3%81%94%e3%81%96%e3%81%84%e3%81%be%e3%81%99%ef%bc%81","status":"publish","type":"post","link":"https:\/\/www.webcyou.com\/?p=5663","title":{"rendered":"\u9045\u308c\u307e\u3057\u305f\u304c..\u3042\u3051\u307e\u3057\u3066\u304a\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307e\u3059\uff012015\u5e74\u306f Laravel\u3067\u753b\u50cf\u51e6\u7406\u3002\u304b\u3089\u3068\u3044\u3046\u3053\u3068\u3067\u3002"},"content":{"rendered":"<p>\u3042\u3051\u307e\u3057\u3066\u304a\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307e\u3059\uff01\uff01<\/p>\n<p>\u65b0\u5e74\u65e9\u3005\u3001\u98a8\u90aa\u3092\u3072\u3044\u3066\u3057\u307e\u3044\u4f53\u8abf\u304c\u60aa\u3044\u307e\u307e2015\u5e74\u306f\u59cb\u307e\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u304a\u304b\u3052\u69d8\u3067\u8272\u3005\u3068\u304f\u305f\u3070\u3063\u3066\u304a\u308a\u307e\u3057\u305f\u3002\u3002\u3002\uff1e\uff1c<\/p>\n<p>&nbsp;<\/p>\n<p>\u65b0\u5e741\u767a\u76ee\u306f\u4f55\u3092\u66f8\u3053\u3046\u3068\u8003\u3048\u305f\u3068\u3053\u308d2014\u5e74\u6d41\u884c\u3063\u305fLaravel\u306b\u3064\u3044\u3066\u3061\u3089\u3063\u3068\u3002<\/p>\n<h4>Laravel<\/h4>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/laravel-icon.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/laravel-icon.png\" alt=\"\" title=\"laravel-icon\" width=\"200\" height=\"160\" class=\"alignnone size-full wp-image-5428\" \/><\/a><\/p>\n<p>\u3053\u3061\u3089\u3067\u307e\u3068\u3081\u3089\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u3001<\/p>\n<p><a href=\"http:\/\/qiita.com\/shukotang\/items\/055058b33b553b48c164\" target=\"_blank\">http:\/\/qiita.com\/shukotang\/items\/055058b33b553b48c164<\/a><\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/3e84f661614653d22b1e498205024483.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/3e84f661614653d22b1e498205024483.png\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2015-01-07 23.10.08\" width=\"589\" height=\"231\" class=\"alignnone  wp-image-5664\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/3e84f661614653d22b1e498205024483.png 841w, https:\/\/www.webcyou.com\/wp-content\/uploads\/3e84f661614653d22b1e498205024483-300x117.png 300w\" sizes=\"(max-width: 589px) 100vw, 589px\" \/><\/a><\/p>\n<p>2014\u5e74PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b1\u4f4d\u306b\u306a\u3063\u305f<strong>Laravel<\/strong>\u3002<\/p>\n<p>\u65e5\u672c\u4eba\u304c\u597d\u307f\u305d\u3046\u306a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u3044\u308f\u308c\u3066\u3044\u308b\u3088\u3046\u3001\u4f7f\u3044\u3084\u3059\u3055\u304c\u7279\u5fb4\u3060\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<p>\u53bb\u5e74\u306f\u3061\u3087\u3053\u3061\u3087\u3053\u3068\u6271\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001<\/p>\n<p>\u666e\u6bb5\u3001\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u306e\u4f5c\u696d\u3092\u884c\u308f\u306a\u3044\u79c1\u3067\u3082\u30b5\u30af\u30b5\u30af\u3068\u4f5c\u6210\u3067\u304d\u3066\u3057\u307e\u3046\u7a0b\u306e\u304a\u624b\u8efd\u3055\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Eloquent\u00a0ORM<\/strong>\u3060\u3063\u305f\u308a\u3001<strong>RESTful\u30ea\u30bd\u30fc\u30b9\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc<\/strong>\u3060\u3063\u305f\u308a\u3001<strong>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3<\/strong>\u3060\u3063\u305f\u308a\u3068\u4fbf\u5229\u306a\u6a5f\u80fd\u304c\u305d\u308d\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u3053\u308c\u306f\u5165\u308c\u3068\u3044\u305f\u65b9\u304c\u826f\u3044\u3068\u3055\u308c\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u3002<\/p>\n<h4>\u753b\u50cf\u51e6\u7406\u3092\u4fbf\u5229\u306b\u00a0Intervention Image\u00a0<\/h4>\n<p>Intervention Image<\/p>\n<p><a href=\"http:\/\/image.intervention.io\" target=\"_blank\">http:\/\/image.intervention.io<\/a><\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/31d1ef09c146f6ab66b9ecc7800ee129.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/31d1ef09c146f6ab66b9ecc7800ee129.png\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2015-01-07 23.14.14\" width=\"470\" height=\"311\" class=\"alignnone  wp-image-5665\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/31d1ef09c146f6ab66b9ecc7800ee129.png 784w, https:\/\/www.webcyou.com\/wp-content\/uploads\/31d1ef09c146f6ab66b9ecc7800ee129-300x198.png 300w\" sizes=\"(max-width: 470px) 100vw, 470px\" \/><\/a><\/p>\n<p>Intervention Image\u306f\u753b\u50cf\u51e6\u7406\u3092\u4fbf\u5229\u306b\u3057\u3066\u304f\u308c\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/p>\n<p>\u4e0a\u8a18\u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u306b\u3082\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306fcomposer\u3067\u30b5\u30af\u30c3\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">composer require intervention\/image<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3089\u3001\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3067\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3002<\/p>\n<p>app\/config\/app.php<\/p>\n<p>\uff08124\u884c\u76ee\u8fba\u308a providers\u306b\u8ffd\u52a0\uff09<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">'Intervention\\Image\\ImageServiceProvider',<\/pre>\n<p>\uff08190\u884c\u76ee\u8fba\u308aaliases \u306b\u8ffd\u52a0\uff09<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">'Image'\u3000=&gt;\u3000'Intervention\\Image\\Facades\\Image',<\/pre>\n<p>\u3068\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306f\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p>\u3042\u3068\u3001artisan\u30b3\u30de\u30f3\u30c9\u3067\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3067\u304d\u307e\u3059\u306e\u3067\u3001<\/p>\n<p>app\/config\/app.php<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">php artisan config:publish intervention\/image<\/pre>\n<p>\u30c9\u30e9\u30a4\u30d0\u3092\u5909\u66f4\u3057\u305f\u3044\u969b\u3068\u304b\u306b\u306f\u3053\u3061\u3089\u3092\u5909\u66f4\u3057\u3066\u3044\u305f\u3060\u3051\u308c\u3070\u3068\u3002<\/p>\n<p><strong>\uff08\u4f7f\u7528\u306b\u306fGD\u30e9\u30a4\u30d6\u30e9\u30ea\u3082\u3057\u304f\u306f Imagick PHP extension\u304c\u5fc5\u8981\u3068\u306a\u3063\u3066\u304d\u307e\u3059\uff09<\/strong><\/p>\n<p>\uff08\u5f8c\u534a\u306b\u3001GD\u30c9\u30e9\u30a4\u30d0\u3067\u30cf\u30de\u3063\u305f\u4e8b\u4f8b\u3092\u66f8\u3044\u3066\u307e\u3059\u306e\u3067\u3001\u30a8\u30e9\u30fc\u3067\u4e0a\u624b\u304f\u3044\u304b\u306a\u304b\u3063\u305f\u308a\u3059\u308b\u65b9\u306f\u53c2\u8003\u306b\u3057\u3066\u3044\u305f\u3060\u3051\u308c\u3070\u3068\u3002\uff09<\/p>\n<h4>\u4f7f\u3044\u65b9<\/h4>\n<p>\u4f7f\u3044\u65b9\u3068\u3057\u3066\u306f\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$image = Image::make('public\/foo.jpg')-&gt;resize(300, 200);&lt;br \/&gt;&lt;br \/&gt;return $image\u00a0-&gt; response('jpg');<\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u3001\u753b\u50cf\u53d6\u5f97\u3057\u3066\u30ea\u30b5\u30a4\u30ba\u304c\u30b5\u30af\u30c3\u3068\u3067\u304d\u308b\u306e\u3067\u3059\uff1e\uff1c<\/p>\n<p>web\u304b\u3089url\u3092\u5f15\u3063\u5f35\u3063\u3066\u304d\u3066<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$image =\u00a0Image::make(file_get_contents($url))-&gt;resize(300, 200);<\/pre>\n<p>\u3082\u3061\u308d\u3093\u3001\u30ea\u30b5\u30a4\u30ba\u3060\u3051\u3067\u306f\u306a\u304f\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$image-&gt;crop(200, 200);<\/pre>\n<p>\u30af\u30ed\u30c3\u30d7\u3057\u305f\u308a\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u4e2d\u5fc3\u3068\u306a\u308a\u307e\u3059\u304c\u3001\u3053\u306e\u3088\u3046\u306b\u5de6\u4e0a\u304b\u3089\u8a2d\u5b9a\u3082\u53ef\u80fd\u3068\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$image-&gt;crop(200, 200, 0, 0);<\/pre>\n<p>web\u4e0a\u304b\u3089\u53d6\u5f97\u3057\u3066\u4fdd\u5b58\u3057\u305f\u3044\u5834\u5408\u306a\u3069\u3082\u30e1\u30bd\u30c3\u30c9\u30c1\u30a7\u30fc\u30f3\u3067\u30b5\u30af\u30c3\u3068\u884c\u3048\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">Image::make(file_get_contents($url))-&gt;crop(200, 200)-&gt;save('\/image\/sample.jpg');<\/pre>\n<p>opacity\u306e\u5909\u66f4\u3082<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">Image::make('public\/foo.jpg')-&gt;opacity(50);<\/pre>\n<p>blur\u52b9\u679c\u3082<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$img-&gt;blur(15);<\/pre>\n<p>\u3068\u3001\u753b\u50cf\u51e6\u7406\u3092\u4fbf\u5229\u306b\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u306e\u3067\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u969b\u306f\u5165\u308c\u3066\u304a\u3044\u3066\u640d\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h4>GD\u30e9\u30a4\u30d6\u30e9\u30ea<\/h4>\n<p>Intervention Image\u3092\u5229\u7528\u3059\u308b\u306b\u306f<strong>GD\u30e9\u30a4\u30d6\u30e9\u30ea\u3082\u3057\u304f\u306f Imagick\u00a0PHP extension\u304c\u5fc5\u8981\u3068\u306a\u3063\u3066\u304d\u307e\u3059<\/strong>\u3002<\/p>\n<p>GD\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u78ba\u8a8d\u306f\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">php -m<\/pre>\n<p>\u3067\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4e00\u89a7\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u306e\u3067\u305d\u3061\u3089\u3067\u78ba\u8a8d\u3059\u308b\u304b\u3001<strong>phpinfo\u3067gd\u304c\u8868\u793a\u3057\u3066enabled<\/strong>\u306b\u306a\u3063\u3066\u3044\u308c\u3070\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/56d5728417ee1541dc3014064fb610c1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/56d5728417ee1541dc3014064fb610c1.png\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2015-01-08 0.02.30\" width=\"524\" height=\"396\" class=\"alignnone  wp-image-5666\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/56d5728417ee1541dc3014064fb610c1.png 655w, https:\/\/www.webcyou.com\/wp-content\/uploads\/56d5728417ee1541dc3014064fb610c1-300x226.png 300w\" sizes=\"(max-width: 524px) 100vw, 524px\" \/><\/a><\/p>\n<p>GD\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u6709\u52b9\u5316\u306fphp.ini\u306e<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">;extension=php_gd2.dll<\/pre>\n<p>\u306e\u30b3\u30e1\u30f3\u30c8\u3092\u89e3\u9664\u3067\u6709\u52b9\u5316\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">extension=php_gd2.dll<\/pre>\n<p>\uff08apache\u306e\u518d\u8d77\u52d5\u3082\u5fd8\u308c\u305a\u306b\uff09<\/p>\n<p>\u305d\u3082\u305d\u3082\u79c1\u306ecentos\u306b\u306f\u306f\u3044\u3063\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067yum\u3067\u30b5\u30af\u30c3\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3088\u3046\u3068\u3057\u305f\u3068\u3053\u308d\u3001<\/p>\n<p>grep\u3067\u691c\u7d22\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">yum list | grep php-gd<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">yum -y install php-gd<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u4e0a\u624b\u304f\u3044\u304b\u305a\u3002\u3002\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u3053\u3061\u3089\u3092\u53c2\u8003\u306b<\/p>\n<p><a href=\"http:\/\/qiita.com\/wakaba260\/items\/9b06c4d64239a2b0bd48\" target=\"_blank\">http:\/\/qiita.com\/wakaba260\/items\/9b06c4d64239a2b0bd48<\/a><\/p>\n<p>gd-last\u3092remi\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3067\u4e0a\u624b\u304f\u3044\u304d\u307e\u3057\u305f\uff1e\uff1c<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">sudo yum -y install --enablerepo=remi gd-last<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">sudo yum -y install --enablerepo=remi-php55 php-gd<\/pre>\n<p>\u3044\u3084\u3041\u52a9\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3093\u306a\u611f\u3058\u3067\u4eca\u5e74\u3082\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3044\u305f\u3057\u307e\u3059\u3000mm<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3042\u3051\u307e\u3057\u3066\u304a\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307e\u3059\uff01\uff01 \u65b0\u5e74\u65e9\u3005\u3001\u98a8\u90aa\u3092\u3072\u3044\u3066\u3057\u307e\u3044\u4f53\u8abf\u304c\u60aa\u3044\u307e\u307e2015\u5e74\u306f\u59cb\u307e\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002 \u304a\u304b\u3052\u69d8\u3067\u8272\u3005\u3068\u304f\u305f\u3070\u3063\u3066\u304a\u308a\u307e\u3057\u305f\u3002\u3002\u3002\uff1e\uff1c &nbsp; \u65b0\u5e741\u767a\u76ee\u306f\u4f55\u3092\u66f8\u3053\u3046\u3068\u8003\u3048\u305f\u3068\u3053\u308d2014 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[180,173,44,45,138,78,118],"_links":{"self":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/5663"}],"collection":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5663"}],"version-history":[{"count":1,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/5663\/revisions"}],"predecessor-version":[{"id":5667,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/5663\/revisions\/5667"}],"wp:attachment":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}