{"id":1640,"date":"2020-03-31T15:00:54","date_gmt":"2020-03-31T06:00:54","guid":{"rendered":"https:\/\/qol-kk.com\/wp2\/?p=1640"},"modified":"2020-03-31T15:00:54","modified_gmt":"2020-03-31T06:00:54","slug":"post-1640","status":"publish","type":"post","link":"https:\/\/qol-kk.com\/wp2\/blog\/2020\/03\/31\/post-1640\/","title":{"rendered":"Laravel\uff1a\u9001\u4fe1\u30e1\u30fc\u30eb\u3092shop.rakuten.co.jp\u306b\u5207\u308a\u66ff\u3048\u308b\u65b9\u6cd5"},"content":{"rendered":"<h2>Laravel\uff1a\u9001\u4fe1\u30e1\u30fc\u30eb\u3092shop.rakuten.co.jp\u306b\u5207\u308a\u66ff\u3048\u308b\u65b9\u6cd5<\/h2>\n<p>\u66f8\u3044\u3066\u7f6e\u304b\u306a\u3044\u3068\u5fd8\u308c\u305d\u3046\u306a\u306e\u3067\u5099\u5fd8\u9332\u3067\u3059\u3002<\/p>\n<p>\u9818\u53ce\u66f8\u767a\u884c\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u767a\u884c\u3057\u305f\u9818\u53ce\u66f8(\u6b63\u78ba\u306b\u306f\u9818\u53ce\u66f8\u3092\u4f5c\u6210\u3059\u308bURL)\u3092\u30e1\u30fc\u30eb\u3067\u9867\u5ba2\u306b\u9001\u308b\u4ed5\u69d8\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u969b\u3001Laravel\u306b\u767b\u9332\u3057\u3066\u3044\u308bMail\u306e\u8a2d\u5b9a\u3092\u3069\u3046\u306b\u304b\u3057\u3066\u5909\u66f4\u3057\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u306e\u3084\u308a\u65b9\u306b\u3064\u3044\u3066\u306e\u30e1\u30e2\u3067\u3059\u3002<\/p>\n<h3>Config\u306e\u5024\u3092\u4e00\u6642\u7684\u306b\u5909\u66f4\u3059\u308b<\/h3>\n<pre class=\"lang:default decode:true\">#\u4eee\u5b9a\uff1a\u30c6\u30fc\u30d6\u30eb[sendmails]\u306b\u5207\u308a\u66ff\u3048\u308b\u9001\u4fe1\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u304c\u5165\u3063\u3066\u3044\u308b\u3082\u306e\u3068\u3059\u308b\u3002\r\n\r\n$mail = Sendmail::find($shop-&gt;id);\r\n\r\n$config = array(\r\n  'driver' =&gt;'smtp',\r\n  'host'=&gt;$mail-&gt;server,\r\n  'port'=&gt;$mail-&gt;port,\r\n  'from' =&gt;$mail-&gt;mailaddress,\r\n  'name' =&gt; $mail-&gt;name,\r\n  'username' =&gt; $mail-&gt;loginid,\r\n  'password' =&gt; $mail-&gt;loginpass\r\n  );\r\n\r\n#SMPT\u8a2d\u5b9a\u3092\u7f6e\u304d\u63db\u3048\u203b\u4e0a\u66f8\u304d\u3067\u306f\u306a\u3044\u306e\u3067\u3053\u306eController\u5185\u3060\u3051\u5909\u5316\u3059\u308b\r\n\\Config::set('mail',$config);\r\n\r\n$title ='\u9001\u4fe1\u30e1\u30fc\u30eb\u306e\u30bf\u30a4\u30c8\u30eb' \r\n$mail_text ='\u30c6\u30ad\u30b9\u30c8\u30e1\u30fc\u30eb\u306e\u6587\u9762'\r\n$mail_html ='HTML\u30e1\u30fc\u30eb\u306e\u6587\u9762'\r\n$sign ='\u7f72\u540d'\r\n$to = [[\r\n  'name'=&gt;'\u9001\u4fe1\u5148\u540d(\u304a\u5ba2\u69d8\u540d)',\r\n  'email'=&gt;'\u9001\u4fe1\u5148\u30a2\u30c9\u30ec\u30b9(\u304a\u5ba2\u69d8\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9)'\r\n  ]]\r\n\r\n#Mail\u306b\u30bf\u30a4\u30c8\u30eb\u306a\u3069\u3092\u6e21\u3059\r\nMail::to($to)\r\n  -&gt;send(new ReceiptMail($title,$mail_text,$mail_html,$sign));<\/pre>\n<p>$config\u306b\u5024\u3092\u7528\u610f\u3057\u3066\u304a\u3044\u3066 \\Config::set('mail',$config);\u3067\u4e00\u767a\uff01\u697d\u3060\u3041\u3002<\/p>\n<h3>\\Config::set('mail',$config);\u3092\u3057\u3066\u3082bootstrap\\cache\\config.php\u306f\u66f8\u304d\u63db\u308f\u3089\u306a\u3044<\/h3>\n<p>\u672c\u4f53\u3092\u66f8\u304d\u63db\u3048\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u4e00\u6642\u7684\u306b\u5185\u5bb9\u3092\u8aad\u307f\u66ff\u3048\u3066\u5229\u7528\u3059\u308b\u3060\u3051\u306a\u306e\u3067\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\u5404\u5e97\u8217\u7528\u306e\u30e1\u30fc\u30eb\u8a2d\u5b9a\u3092\u767b\u9332\u3057\u3066\u304a\u3044\u3066\u9818\u53ce\u66f8\u767a\u884c\u306e\u969b\u306b\u8cfc\u5165\u5e97\u8217\u3082\u8a18\u8f09\u3059\u308b\u3068\u3001\u8cfc\u5165\u3057\u305f\u5e97\u8217\u7528\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3067\u9818\u53ce\u66f8\u3092\u6848\u5185\u3059\u308b\u4e8b\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\u203b\u3053\u306e\u8a2d\u5b9a\u3092\u5165\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u304c\u4e0a\u306e\u4f8b\u3067\u306f sendmails \u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u697d\u5929\u5e02\u5834\u306e\u5834\u5408\u306fURL\u306e\u6848\u5185\u306b\u306f\u6c17\u3092\u4ed8\u3051\u3088\u3046<\/h3>\n<p>\u697d\u5929\u306e@shop.rakuten.co.jp\u3067\u9001\u4fe1\u3057\u305f\u5834\u5408\u3067\u3082URL\u3092\u81ea\u7531\u306b\u9001\u4fe1\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u81ea\u5e97\u8217\u3078\u306e\u30ea\u30f3\u30af\u3092\u8cbc\u3063\u3066\u9001\u4fe1\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u306a\u3093\u3067\u3059\u3002<\/p>\n<p>\u3067\u3082\u3001\u30eb\u30fc\u30eb\u4e0a\u306f\u9055\u53cd\u884c\u70ba\u306a\u306e\u3067\u697d\u5929\u5e02\u5834\u3078\u30de\u30b9\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u767a\u884c\u7533\u8acb\u3092\u884c\u3044\u307e\u3059\u3002<br \/>\n\u305d\u306e\u30eb\u30fc\u30eb\u306b\u5247\u3063\u305f\u5909\u63db\u3092\u884c\u3063\u305f\u30a2\u30c9\u30ec\u30b9\u3092\u6848\u5185\u3059\u308c\u3070\u3001\u30eb\u30fc\u30eb\u306b\u3082\u53cd\u305b\u305a\u304a\u5ba2\u69d8\u3078\u9818\u53ce\u66f8URL\u3092\u9001\u4ed8\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u307e\u3068\u3081<\/h3>\n<p>\u76f4\u63a5\u6848\u5185\u3057\u305f\u5834\u5408\u3001\u697d\u5929\u3055\u3093\u306f\u305d\u308c\u304c\u5206\u304b\u308b\u306e\u304b\u306a\u3002<br \/>\n\u307e\u3041\u5371\u306a\u3044\u6a4b\u306f\u6e21\u3089\u306a\u3044\u306b\u9650\u308a\u307e\u3059\u3051\u3069\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Laravel\uff1a\u9001\u4fe1\u30e1\u30fc\u30eb\u3092shop.rakuten.co.jp\u306b\u5207\u308a\u66ff\u3048\u308b\u65b9\u6cd5 \u66f8\u3044\u3066\u7f6e\u304b\u306a\u3044\u3068\u5fd8\u308c\u305d\u3046\u306a\u306e\u3067\u5099\u5fd8\u9332\u3067\u3059\u3002 \u9818\u53ce\u66f8\u767a\u884c\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u767a\u884c\u3057\u305f\u9818\u53ce\u66f8(\u6b63\u78ba\u306b\u306f\u9818\u53ce\u66f8\u3092\u4f5c\u6210\u3059\u308bURL)\u3092\u30e1\u30fc\u30eb\u3067\u9867\u5ba2\u306b\u9001\u308b\u4ed5\u69d8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":944,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[34],"tags":[19,153,98,53,107,582,45,579],"class_list":["post-1640","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-memorandum","tag-ec","tag-laravel","tag-php","tag-53","tag-107","tag-582","tag-45","tag-579"],"veu_head_title_object":{"title":"","add_site_title":""},"jetpack_publicize_connections":[],"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/qol-kk.com\/wp2\/wp-content\/uploads\/2018\/11\/laravel_logo.png","_links":{"self":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/1640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/comments?post=1640"}],"version-history":[{"count":0,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/1640\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media\/944"}],"wp:attachment":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media?parent=1640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/categories?post=1640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/tags?post=1640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}