{"id":5002,"date":"2019-11-15T19:48:39","date_gmt":"2019-11-15T10:48:39","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=5002"},"modified":"2019-11-15T19:48:39","modified_gmt":"2019-11-15T10:48:39","slug":"%e3%80%90laravel%e3%80%91%e7%ae%a1%e7%90%86%e8%80%85%e3%81%ae%e3%83%a6%e3%83%bc%e3%82%b6%e3%83%bc%e6%89%bf%e8%aa%8d%e6%a9%9f%e8%83%bd%e3%82%92%e3%81%a4%e3%81%8f%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=5002","title":{"rendered":"\u3010Laravel\u3011\u7ba1\u7406\u8005\u306e\u30e6\u30fc\u30b6\u30fc\u627f\u8a8d\u6a5f\u80fd\u3092\u3064\u304f\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u524d\u56de\u306f <a href=\"https:\/\/blog.capilano-fw.com\/?p=4966\">\u30ed\u30b0\u30a4\u30f3\u65e5\u6642\u306e\u7d71\u8a08\u3092\u3068\u3063\u3066\u68d2\u30b0\u30e9\u30d5\u306b\u3057\u3066\u307f\u308b<\/a> \u3068\u3044\u3046\u8a18\u4e8b\u3092\u516c\u958b\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u3044\u308b\u6642\u306b\u3042\u308b\u6a5f\u80fd\u3092\u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u307e\u3060\u7d39\u4ecb\u3057\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u601d\u3044\u51fa\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u306f\u3001<\/p>\n<p><strong style=\"font-size: 35px;\">\u7ba1\u7406\u8005\u306e\u30e6\u30fc\u30b6\u30fc\u627f\u8a8d\u6a5f\u80fd<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u3069\u3046\u3044\u3046\u3082\u306e\u304b\u3068\u3044\u3046\u3068\u3001\u6b21\u306e\u3088\u3046\u306a\u6d41\u308c\u304c\u30a4\u30e1\u30fc\u30b8\u3057\u3084\u3059\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u8ab0\u304b\u304c\u3001\u30b5\u30a4\u30c8\u306b\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3059\u308b<\/li>\n<li>\u7ba1\u7406\u8005\u304c\u305d\u306e\u4eba\u3092\u30e6\u30fc\u30b6\u30fc\u3068\u3057\u3066\u627f\u8a8d\uff08\u3082\u3057\u304f\u306f\u975e\u627f\u8a8d\uff09\u3059\u308b<\/li>\n<li>\u30e6\u30fc\u30b6\u30fc\u3068\u3057\u3066\u627f\u8a8d\u3055\u308c\u305f\u4eba\u306f\u30ed\u30b0\u30a4\u30f3\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b<\/li>\n<\/ol>\n<p>\u3064\u307e\u308a\u3001<strong>\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3057\u3066\u3082\u3089\u3063\u305f\u4eba\u304c\u672c\u5f53\u306b\u30e6\u30fc\u30b6\u30fc\u3068\u3057\u3066\u3075\u3055\u308f\u3057\u3044\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001\u5408\u683c\uff0f\u4e0d\u5408\u683c\u3092\u8a2d\u5b9a\u3059\u308b<\/strong>\u3068\u3044\u3046\u6a5f\u80fd\u306b\u306a\u308a\u307e\u3059\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<br \/>\n\uff08\u6700\u5f8c\u306b\u4eca\u56de\u958b\u767a\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e00\u5f0f\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2595 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/7.png\" alt=\"\" width=\"226\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/7.png 226w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/7-212x300.png 212w\" sizes=\"auto, (max-width: 226px) 100vw, 226px\" \/><\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 6.x<\/p>\n<h1>\u524d\u63d0\u3068\u3057\u3066<\/h1>\n<p>Laravel\u306b\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u524d\u63d0\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3082\u3057\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u307e\u3060\u306e\u65b9\u306f\u4ee5\u4e0b\u3092\u53c2\u8003\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li>Laravel 6.x \u4ee5\u4e0a\u3000\u30fb\u30fb\u30fb\u3000<a href=\"https:\/\/blog.capilano-fw.com\/?p=4576\">Laravel6.0\u3067\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u3092\u4f7f\u3046\u65b9\u6cd5<\/a><\/li>\n<li>\u305d\u308c\u672a\u6e80\u3000\u30fb\u30fb\u30fb\u3000<a href=\"https:\/\/blog.capilano-fw.com\/?p=289\">\u3010Laravel5.6\u3011\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u76f4\u5f8c\u306b\u3084\u308b\u3053\u3068\uff13\u70b9<\/a><\/li>\n<\/ul>\n<h1>\u8a8d\u8a3c\u7528\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092 users \u30c6\u30fc\u30d6\u30eb\u306b\u8ffd\u52a0\u3059\u308b<\/h1>\n<pre><strong>php artisan make:migration add_accepted_to_users<\/strong><\/pre>\n<p><code>database\/migrations\/****_**_**_******_add_two_factor_auth_fields_to_users.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u958b\u3044\u3066\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002\uff08<strong>\u592a\u5b57<\/strong>\u304c\u8ffd\u52a0\u3057\u305f\u30b3\u30fc\u30c9\uff09<\/p>\n<pre>&lt;?php\r\n\r\nuse Illuminate\\Database\\Migrations\\Migration;\r\nuse Illuminate\\Database\\Schema\\Blueprint;\r\nuse Illuminate\\Support\\Facades\\Schema;\r\n\r\nclass AddAcceptedToUsers extends Migration\r\n{\r\n    \/**\r\n     * Run the migrations.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function up()\r\n    {\r\n        Schema::table('users', function (Blueprint $table) {\r\n            <strong>$table-&gt;boolean('accepted')<\/strong>\r\n<strong>                -&gt;default(false)<\/strong>\r\n<strong>                -&gt;comment('\u7ba1\u7406\u8005\u627f\u8a8d')<\/strong>\r\n<strong>                -&gt;after('remember_token');<\/strong>\r\n        });\r\n    }\r\n\r\n    \/**\r\n     * Reverse the migrations.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function down()\r\n    {\r\n        Schema::table('users', function (Blueprint $table) {\r\n            <strong>$table-&gt;dropColumn('accepted');<\/strong>\r\n        });\r\n    }\r\n}<\/pre>\n<p>\u5909\u66f4\u3057\u305f\u3089\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>php artisan migrate<\/strong><\/pre>\n<p>\u3059\u308b\u3068<code>users<\/code>\u30c6\u30fc\u30d6\u30eb\u306f\u3053\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5003\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_1.png\" alt=\"\" width=\"370\" height=\"337\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_1.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_1-300x273.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/p>\n<h1>\u627f\u8a8d\u3055\u308c\u3066\u3044\u306a\u3044\u30e6\u30fc\u30b6\u30fc\u304c\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u3059\u308b<\/h1>\n<p>\u73fe\u5728\u306e\u307e\u307e\u3067\u306f\u3001<code>accepted<\/code>\u306b\u95a2\u4fc2\u306a\u304f\u8ab0\u3067\u3082\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u306e\u3067\u3001<code>app\/Http\/Controllers\/Auth\/LoginController.php<\/code>\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3001\u672a\u627f\u8a8d\u306e\u4eba\u306f\u5f37\u5236\u7684\u306b\u30ed\u30b0\u30a2\u30a6\u30c8\u3055\u305b\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\nclass LoginController extends Controller\r\n{\r\n    \/\/ \u7701\u7565\r\n\r\n    protected function authenticated(Request $request, $user)\r\n    {\r\n        <strong>if(!$user-&gt;accepted) {  \/\/ \u672a\u627f\u8a8d\u306e\u5834\u5408<\/strong>\r\n\r\n<strong>            \\Auth::logout();<\/strong>\r\n<strong>            return redirect('\/login')-&gt;withErrors([<\/strong>\r\n<strong>                'email' =&gt; '\u3053\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306f\u307e\u3060\u627f\u8a8d\u3055\u308c\u3066\u3044\u307e\u305b\u3093'<\/strong>\r\n<strong>            ]);<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n    }\r\n}<\/pre>\n<h1>\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3055\u308c\u305f\u3068\u304d\u306e\u51e6\u7406\u3092\u3064\u304f\u308b<\/h1>\n<p><code>Laravel<\/code>\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3055\u308c\u308b\u3068\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u627f\u8a8d\u6a5f\u80fd\u3068\u3057\u3066\u306f\u6b63\u3057\u304f\u306a\u3044\u306e\u3067\u3001\u5f37\u5236\u7684\u306b\u7121\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u6bce\u56de\u30c1\u30a7\u30c3\u30af\u3059\u308b\u306e\u306f\u3081\u3093\u3069\u3046\u306a\u306e\u3067\u3001\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u304c\u3042\u3063\u305f\u3089\u30e1\u30fc\u30eb\u3067\u77e5\u3089\u305b\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>Mailable\u3092\u3064\u304f\u308b<\/h2>\n<p>\u307e\u305a\u306f\u9001\u4fe1\u3059\u308b\u30e1\u30fc\u30eb\u3092\u4f5c\u6210\u3057\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:mail UserRegistered<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001<code>app\/Mail\/UserRegistered.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Mail;\r\n\r\nuse App\\User;\r\nuse Illuminate\\Bus\\Queueable;\r\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\r\nuse Illuminate\\Mail\\Mailable;\r\nuse Illuminate\\Queue\\SerializesModels;\r\n\r\nclass UserRegistered extends Mailable\r\n{\r\n    use Queueable, SerializesModels;\r\n\r\n    <strong>private $user;<\/strong>\r\n\r\n    \/**\r\n     * Create a new message instance.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function __construct(User $user)\r\n    {\r\n        <strong>$this-&gt;user = $user;<\/strong>\r\n    }\r\n\r\n    \/**\r\n     * Build the message.\r\n     *\r\n     * @return $this\r\n     *\/\r\n    public function build()\r\n    {\r\n        <strong>return $this-&gt;subject('\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u304c\u3042\u308a\u307e\u3057\u305f')<\/strong>\r\n<strong>            -&gt;view('emails.auth.registered')<\/strong>\r\n<strong>            -&gt;with('user', $this-&gt;user);<\/strong>\r\n    }\r\n}<\/pre>\n<h2>\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3057\u305f\u3068\u304d\u51e6\u7406\u3092\u3064\u304f\u308b<\/h2>\n<p>\u7d9a\u3044\u3066\u3001\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3057\u305f\u3068\u304d\u306e\u51e6\u7406\u3067\u3059\u3002<br \/>\n\u3084\u308b\u3053\u3068\u306f\u4ee5\u4e0b\u306e\uff12\u3064\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u77e5\u3089\u305b\u308b\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b<\/li>\n<li>\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u3092\u7121\u52b9\u306b\u3059\u308b<\/li>\n<\/ul>\n<p>\u3067\u306f\u3001<code>app\/Http\/Controllers\/Auth\/RegisterController.php<\/code>\u3092\u958b\u3044\u3066<code>registered()<\/code>\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\nclass RegisterController extends Controller\r\n{\r\n    \/\/ \u7701\u7565\r\n\r\n    <strong>protected function registered(Request $request, $user)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $admin_email = 'admin@example.com';<\/strong>\r\n<strong>        \\Mail::to($admin_email)-&gt;send(new UserRegistered($user));<\/strong>\r\n\r\n<strong>        \\Auth::logout();<\/strong>\r\n<strong>        return '\u767b\u9332\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\u627f\u8a8d\u3055\u308c\u308b\u307e\u3067\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u304f\u3060\u3055\u3044';<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p><code>registered()<\/code>\u3067\u306f\u3001\u307e\u305a\u4e0a\u306e\uff12\u884c\u3067\u5148\u307b\u3069\u306e\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u3066\u3044\u307e\u3059\u3002\uff08\u306a\u304a\u3001\u30c6\u30b9\u30c8\u306e\u305f\u3081\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u76f4\u306b\u66f8\u3044\u3066\u3044\u307e\u3059\u304c<code>config\/app.php<\/code>\u306a\u3069\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u30d5\u30a1\u30a4\u30eb\u306b\u5165\u308c\u3066\u304a\u304f\u65b9\u304c\u3044\u3044\u3067\u3057\u3087\u3046\uff09<\/p>\n<p>\u5b9f\u969b\u306b\u9001\u4fe1\u3055\u308c\u305f\u3082\u306e\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5005\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_2.png\" alt=\"\" width=\"304\" height=\"247\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_2.png 304w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_2-300x244.png 300w\" sizes=\"auto, (max-width: 304px) 100vw, 304px\" \/><\/p>\n<p>\u307e\u305f\u3001\u4e0b\u306e\uff12\u884c\u3067\u306f\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u3055\u308c\u305f\u3082\u306e\u3092\u5f37\u5236\u7684\u306b\u30ed\u30b0\u30a2\u30a6\u30c8\u3057\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u767b\u9332\u3059\u308b\u3068\u3053\u306e\u3088\u3046\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5006\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_3.png\" alt=\"\" width=\"475\" height=\"43\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_3.png 475w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_3-300x27.png 300w\" sizes=\"auto, (max-width: 475px) 100vw, 475px\" \/><\/p>\n<p>\u203b \u306a\u304a\u3001\u3053\u3061\u3089\u3082\u30c6\u30b9\u30c8\u306a\u306e\u3067\u7c21\u7565\u306a\u3082\u306e\u306b\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u5b9f\u969b\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u3066\u5b8c\u4e86\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u307b\u3046\u304c\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<pre>protected function registered(Request $request, $user)\r\n{\r\n    \/\/ \u7701\u7565\r\n\r\n    <strong>return redirect('\/register_complete');<\/strong> \/\/ \u79fb\u52d5\u5148\u3067\u5b8c\u4e86\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\r\n}<\/pre>\n<h1>\u627f\u8a8d\u6a5f\u80fd\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u3053\u3053\u304b\u3089\u306f\u767b\u9332\u3055\u308c\u305f\u30e6\u30fc\u30b6\u30fc\u3092\u7ba1\u7406\u8005\u304c\u627f\u8a8d\u3059\u308b\u6a5f\u80fd\u3092\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308b<\/h2>\n<p>\u307e\u305a\u306f\u30eb\u30fc\u30c8\u3067\u3059\u3002<br \/>\n\u4eca\u56de\u306fAjax\u5074\u3068\u30d6\u30e9\u30a6\u30b6\u5074\u306e\uff12\u3064\u306b\u5206\u3051\u3066\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>Route::prefix('admin')-&gt;group(function(){<\/strong>\r\n\r\n<strong>    Route::get('user_accept', 'Admin\\UserAcceptController@index');<\/strong>\r\n<strong>    Route::get('ajax\/user_accept', 'Admin\\Ajax\\UserAcceptController@index');<\/strong>\r\n<strong>    Route::post('ajax\/user_accept\/accept', 'Admin\\Ajax\\UserAcceptController@accept');<\/strong>\r\n\r\n<strong>});<\/strong><\/pre>\n<p><strong>\u3010\u6ce8\u610f\u3011<\/strong>\u4eca\u56de\u306f\u30c6\u30b9\u30c8\u3067\u3059\u306e\u3067\u3053\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u307e\u307e\u3067\u306f\u8ab0\u3067\u3082\u3053\u308c\u3089\u306eURL\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u5b9f\u969b\u306e\u904b\u7528\u3067\u306f\u3001\u7ba1\u7406\u8005\u3060\u3051\u3057\u304b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306a\u3069\u3092\u3064\u304f\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u4f5c\u6210\u306f\u3001<a href=\"https:\/\/blog.capilano-fw.com\/?p=3987#i-7\">\u300c\u3053\u3093\u306a\u3068\u304d\u300d\u306e\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u5168\uff17\u5b9f\u4f8b\uff1a\u30e6\u30fc\u30b6\u30fc\u30bf\u30a4\u30d7\u3067\u8a31\u53ef\uff0f\u62d2\u5426<\/a> \u3092\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u308b<\/h2>\n<p>\u7d9a\u3044\u3066\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\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:controller Admin\\\\UserAcceptController<\/strong><\/pre>\n<pre><strong>php artisan make:controller Admin\\\\Ajax\\\\UserAcceptController<\/strong><\/pre>\n<p>\u7d9a\u3044\u3066\u5404\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u5074\u3067\u3059\u3002<\/p>\n<p><code>app\/Http\/Controllers\/Admin\/UserAcceptController.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Controllers\\Admin;\r\n\r\nuse App\\Http\\Controllers\\Controller;\r\nuse Illuminate\\Http\\Request;\r\n\r\nclass UserAcceptController extends Controller\r\n{\r\n    <strong>public function index() {<\/strong>\r\n\r\n<strong>        return view('admin.user_accept.index');<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u305d\u3057\u3066\u3001<code>Ajax<\/code>\u5074\u3067\u3059\u3002<br \/>\n\u30d5\u30a1\u30a4\u30eb\u306f\u3001<code>app\/Http\/Controllers\/Admin\/Ajax\/UserAcceptController.php<\/code>\u3067\u3059\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Controllers\\Admin\\Ajax;\r\n\r\nuse App\\Http\\Controllers\\Controller;\r\nuse Illuminate\\Http\\Request;\r\n\r\nclass UserAcceptController extends Controller\r\n{\r\n    <strong>public function index() {<\/strong>\r\n\r\n<strong>        $query = \\App\\User::query();<\/strong>\r\n\r\n<strong>        \/\/ \u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3053\u3053\u3067\u691c\u7d22<\/strong>\r\n\r\n<strong>        return $query-&gt;get();<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function accept(Request $request) {<\/strong>\r\n\r\n<strong>        $user = \\App\\User::find($request-&gt;user_id);<\/strong>\r\n<strong>        $user-&gt;accepted = $request-&gt;accept;<\/strong>\r\n<strong>        $result = $user-&gt;save();<\/strong>\r\n<strong>        return ['result' =&gt; $result];<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u306a\u304a\u3001<code>accept()<\/code>\u306f\u4ee5\u4e0b\uff12\u3064\u306e\u30c7\u30fc\u30bf\u304c\u9001\u4fe1\u3055\u308c\u3066\u304f\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>user_id\u3000\u30fb\u30fb\u30fb\u3000\u30e6\u30fc\u30b6\u30fcID<\/li>\n<li>accepted\u3000\u30fb\u30fb\u30fb\u3000\u627f\u8a8d\u306e true or false<\/li>\n<\/ul>\n<h2>\u30d3\u30e5\u30fc\u3092\u3064\u304f\u308b<\/h2>\n<p>\u3055\u3089\u306b\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3059\u308b\u305f\u3081\u306e\u30d3\u30e5\u30fc\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<p><code>resources\/views\/admin\/user_accept\/index.blade.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;html&gt;\r\n&lt;head&gt;\r\n    &lt;link href=\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.3.1\/css\/bootstrap.min.css\" rel=\"stylesheet\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n    &lt;div id=\"app\"&gt;\r\n        &lt;table class=\"table\"&gt;\r\n            &lt;thead&gt;\r\n                &lt;th&gt;\u540d\u524d&lt;\/th&gt;\r\n                &lt;th&gt;E-Mail&lt;\/th&gt;\r\n                &lt;th&gt;\u627f\u8a8d\u72b6\u614b&lt;\/th&gt;\r\n                &lt;th&gt;&lt;\/th&gt;\r\n                &lt;th&gt;&lt;\/th&gt;\r\n            &lt;\/thead&gt;\r\n            &lt;tbody&gt;\r\n                <strong>&lt;tr v-for=\"user in users\"&gt;<\/strong>\r\n<strong>                    &lt;td v-text=\"user.name\"&gt;&lt;\/td&gt;<\/strong>\r\n<strong>                    &lt;td v-text=\"user.email\"&gt;&lt;\/td&gt;<\/strong>\r\n<strong>                    &lt;td&gt;<\/strong>\r\n<strong>                        &lt;div class=\"text-success\" v-if=\"user.accepted\"&gt;\u627f\u8a8d\u6e08\u307f&lt;\/div&gt;<\/strong>\r\n<strong>                        &lt;div class=\"text-danger\" v-else&gt;\u672a\u627f\u8a8d&lt;\/div&gt;<\/strong>\r\n<strong>                    &lt;\/td&gt;<\/strong>\r\n<strong>                    &lt;td&gt;<\/strong>\r\n<strong>                        &lt;button type=\"button\" class=\"btn btn-sm btn-primary\" @click=\"accept(user.id, true)\"&gt;\u627f\u8a8d\u3059\u308b&lt;\/button&gt;<\/strong>\r\n<strong>                        &lt;button type=\"button\" class=\"btn btn-sm btn-light\" @click=\"accept(user.id, false)\"&gt;\u3057\u306a\u3044&lt;\/button&gt;<\/strong>\r\n<strong>                    &lt;\/td&gt;<\/strong>\r\n<strong>                &lt;\/tr&gt;<\/strong>\r\n            &lt;\/tbody&gt;\r\n        &lt;\/table&gt;\r\n    &lt;\/div&gt;\r\n    &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/axios\/0.19.0\/axios.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/vue@2.6.0\"&gt;&lt;\/script&gt;\r\n    &lt;script&gt;\r\n\r\n        new Vue({\r\n            el: '#app',\r\n            data: {\r\n                users: []\r\n            },\r\n            methods: {\r\n                <strong>getUsers() {<\/strong>\r\n\r\n<strong>                    const url = '\/admin\/ajax\/user_accept';<\/strong>\r\n<strong>                    axios.get(url)<\/strong>\r\n<strong>                        .then(response =&gt; {<\/strong>\r\n\r\n<strong>                            this.users = response.data;<\/strong>\r\n\r\n<strong>                        });<\/strong>\r\n\r\n<strong>                }<\/strong>,\r\n                <strong>accept(userId, accepted) {<\/strong>\r\n\r\n<strong>                    if(confirm('\u627f\u8a8d\u72b6\u614b\u3092\u5909\u66f4\u3057\u307e\u3059\u3002\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f')) {<\/strong>\r\n\r\n<strong>                        const url = '\/admin\/ajax\/user_accept\/accept';<\/strong>\r\n<strong>                        const params = {<\/strong>\r\n<strong>                            user_id: userId,<\/strong>\r\n<strong>                            accept: accepted<\/strong>\r\n<strong>                        };<\/strong>\r\n<strong>                        axios.post(url, params)<\/strong>\r\n<strong>                            .then(response =&gt; {<\/strong>\r\n\r\n<strong>                                if(response.data.result) {<\/strong>\r\n\r\n<strong>                                    this.getUsers();<\/strong>\r\n\r\n<strong>                                }<\/strong>\r\n\r\n<strong>                            });<\/strong>\r\n\r\n<strong>                    }<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n            },\r\n            mounted() {\r\n\r\n                this.getUsers();\r\n\r\n            }\r\n        });\r\n\r\n    &lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u306f\u3001<code>getUsers()<\/code>\u3092\u4f7f\u3063\u3066\u30e6\u30fc\u30b6\u30fc\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001<code>accept()<\/code>\u3067\u627f\u8a8d\u306e\u6709\u7121\u3092\u5909\u66f4\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u53d6\u5f97\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306f<code>&lt;table&gt;&lt;\/table&gt;<\/code>\u30bf\u30b0\u3092\u4f7f\u3063\u3066\u4e00\u89a7\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u30c6\u30b9\u30c8\u306e\u305f\u3081\u691c\u7d22\u3084\u30da\u30fc\u30b8\u6a5f\u80fd\u306f\u7701\u7565\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u8868\u793a\u3057\u305f\u3082\u306e\u304c\u3053\u3061\u3089\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5007\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_4.png\" alt=\"\" width=\"617\" height=\"555\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_4.png 617w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_4-300x270.png 300w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/p>\n<p>\u203b \u306a\u304a\u3001\u540d\u524d\u3084E-Mail\u3060\u3051\u3067\u627f\u8a8d\uff0f\u975e\u627f\u8a8d\u3059\u308b\u3053\u3068\u306f\u3042\u307e\u308a\u306a\u3044\u3067\u3057\u3087\u3046\u3002\u5b9f\u969b\u306e\u904b\u7528\u3067\u306f\u4f8b\u3048\u3070\u3001URL\u3084\u30b3\u30e1\u30f3\u30c8\u306a\u3069\u304c\u3053\u3053\u306b\u8ffd\u52a0\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude0a\u2728<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u307e\u305a\u306f\u30da\u30fc\u30b8\u3092\u8868\u793a\u3057\u305f\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5011\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_5.png\" alt=\"\" width=\"617\" height=\"395\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_5.png 617w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_5-300x192.png 300w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/p>\n<p>\u592a\u90ce\u3055\u3093\u3092\u627f\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u627f\u8a8d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5010\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_6.png\" alt=\"\" width=\"640\" height=\"480\" \/><\/p>\n<p>\u3059\u308b\u3068\u78ba\u8a8d\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u304c\u3067\u308b\u306e\u3067\u300cOK\u300d\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5009\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_7.png\" alt=\"\" width=\"619\" height=\"344\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_7.png 619w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_7-300x167.png 300w\" sizes=\"auto, (max-width: 619px) 100vw, 619px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u592a\u90ce\u304c\u627f\u8a8d\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5008\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_8.png\" alt=\"\" width=\"617\" height=\"346\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_8.png 617w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/11\/admin_accept_8-300x168.png 300w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude0a\u2728<\/p>\n<h1>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/h1>\n<p>\u5b9f\u969b\u306b\u4eca\u56de\u958b\u767a\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e00\u5f0f\u3092\u4ee5\u4e0b\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u203b \u305f\u3060\u3057\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u306a\u3069\u306e\u5b9f\u884c\u306f\u3054\u81ea\u8eab\u3067\u304a\u3053\u306a\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/blog.capilano-fw.com?download=5015&amp;tmstv=1777496599\" rel=\"nofollow\" id=\"download-link-5015\" data-redirect=\"false\" >\n\t\u3010Laravel\u3011\u7ba1\u7406\u8005\u306e\u30e6\u30fc\u30b6\u30fc\u627f\u8a8d\u6a5f\u80fd\u3092\u3064\u304f\u308b<\/a>\n\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u524d\u56de\u306b\u5f15\u304d\u7d9a\u304d<code>Laravel<\/code>\u306e\u30ed\u30b0\u30a4\u30f3\u306b\u95a2\u9023\u3059\u308b\u5185\u5bb9\u3092\u304a\u5c4a\u3051\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u56de\u306f\u30c6\u30af\u30cb\u30c3\u30af\u306f\u30ed\u30b0\u30a4\u30f3\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u4f55\u304b\u5225\u306e\u6295\u7a3f\u3055\u308c\u305f\u3082\u306e\u3092\u627f\u8a8d\uff0f\u975e\u627f\u8a8d\u3059\u308b\u3068\u3044\u3046\u5fdc\u7528\u3082\u3067\u304d\u307e\u3059\u306e\u3067\u3001\u305c\u3072\u53c2\u8003\u306b\u3057\u3066\u3044\u305f\u3060\u3051\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u79c1\u304c\u500b\u4eba\u7684\u306b\uff08\u307b\u307c\u30dc\u30e9\u30f3\u30c6\u30a3\u30a2\u3068\u3057\u3066\uff09\u63d0\u4f9b\u3057\u3066\u3044\u308b<a href=\"https:\/\/www.prerele.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u30d7\u30ec\u30b9\u30ea\u30ea\u30fc\u30b9\u306e\u30b5\u30a4\u30c8<\/a>\u3082\u540c\u3058\u3088\u3046\u306a\u69cb\u6210\u3067\u5b9f\u88c5\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u3053\u3061\u3089\u3082\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\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-4445 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png\" alt=\"\" width=\"370\" height=\"310\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2-300x251.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u524d\u56de\u306f \u30ed\u30b0\u30a4\u30f3\u65e5\u6642\u306e\u7d71\u8a08\u3092\u3068\u3063\u3066\u68d2\u30b0\u30e9\u30d5\u306b\u3057\u3066\u307f\u308b \u3068\u3044\u3046\u8a18\u4e8b\u3092\u516c\u958b\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u3044\u308b\u6642\u306b\u3042\u308b\u6a5f\u80fd\u3092\u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u307e\u3060\u7d39\u4ecb\u3057\u3066\u3044\u306a\u3044 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=5002\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Laravel\u3011\u7ba1\u7406\u8005\u306e\u30e6\u30fc\u30b6\u30fc\u627f\u8a8d\u6a5f\u80fd\u3092\u3064\u304f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":5021,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,12,97],"tags":[58],"class_list":["post-5002","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","category-vue-js","category-97","tag-58"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5002","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=5002"}],"version-history":[{"count":4,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5002\/revisions"}],"predecessor-version":[{"id":5019,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5002\/revisions\/5019"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/5021"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5002"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5002"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}