{"id":1422,"date":"2023-02-21T16:19:56","date_gmt":"2023-02-21T07:19:56","guid":{"rendered":"https:\/\/trend-appsweb.com\/myportfolio\/?p=1422"},"modified":"2024-02-11T18:18:07","modified_gmt":"2024-02-11T09:18:07","slug":"laravel%e3%81%a7%e3%83%95%e3%82%a9%e3%83%ad%e3%83%bc%e3%83%95%e3%82%a9%e3%83%ad%e3%83%af%e3%83%bc%e6%a9%9f%e8%83%bd%e3%82%92%e5%ae%9f%e8%a3%85%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b","status":"publish","type":"post","link":"https:\/\/trend-appsweb.com\/myportfolio\/?p=1422","title":{"rendered":"Laravel\u3067\u30d5\u30a9\u30ed\u30fc\u6a5f\u80fd\u3092\u5b9f\u88c5\u3057\u3066\u307f\u308b"},"content":{"rendered":"<h3 class=\"midashi\">\u30c6\u30fc\u30de<\/h3>\n<p>\u3069\u3046\u3082\uff01\uff01naoto555\u3067\u3059\u3002<br \/>\n<span style=\"color: #0000ff;\"><span style=\"color: #000000;\">\u4eca\u56de\u306f\u3001Laravel\u3092\u7528\u3044\u3066\u6628\u4eca\u306eSNS\u3067\u306f\u5f53\u305f\u308a\u524d\u306b\u306a\u3063\u305f\u30d5\u30a9\u30ed\u30fc\u6a5f\u80fd\u30d5\u30a9\u30ed\u30ef\u30fc\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/span><\/span><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">Users\u30c6\u30fc\u30d6\u30eb\u306e\u8a73\u7d30\u3084\u767b\u9332\u3057\u3066\u3044\u308bUsers\u30c7\u30fc\u30bf\u306e\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u306e\u4f5c\u308a\u65b9\u306b\u95a2\u3057\u307e\u3057\u3066\u306f\u3001\u300cSeeder\u3067\u65e5\u672c\u8a9e\u306e\u30c0\u30df\u30fc\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3059\u308b(<a href=\"https:\/\/trend-appsweb.com\/myportfolio\/?p=1361\">\u3053\u3061\u3089\u306e\u8a18\u4e8b<\/a>)\u300d\u3092\u3054\u53c2\u8003\u306b\u3057\u3066\u9802\u3051\u308b\u3068\u5e78\u3044\u3067\u3059\u3002<br \/>\n<\/span><\/span><span style=\"color: #0000ff;\">(2024.2\u8a18\u8f09)<\/span><\/p>\n<h3 class=\"midashi\">\u958b\u767a\u74b0\u5883<\/h3>\n<div>\n<table style=\"border-collapse: collapse; width: 52.5389%;\">\n<tbody>\n<tr>\n<td style=\"width: 28.9191%;\">\u7d71\u5408\u958b\u767a\u74b0\u5883<\/td>\n<td style=\"width: 29.3499%;\">aws cloud9<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.9191%;\">PHP<\/td>\n<td style=\"width: 29.3499%;\">8.1.16<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.9191%;\">Laravel<\/td>\n<td style=\"width: 29.3499%;\">9.52<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.9191%;\">login\u6a5f\u80fd<\/td>\n<td style=\"width: 29.3499%;\">Laravel\/jetstream(livewire)<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.9191%;\">Database<\/td>\n<td style=\"width: 29.3499%;\">SQlite(version 3.7.17)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 class=\"midashi\">\u89e3\u8aac<\/h3>\n<h4 class=\"tejun\">\u2460Follow\u30e2\u30c7\u30eb\u3068\u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210<\/h4>\n<p>\u307e\u305a\u306f\u3001\u8ab0\u304c\u8ab0\u3092\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u304b\u3092\u793a\u3059\u30c6\u30fc\u30d6\u30eb\u3092\u30e2\u30c7\u30eb\u3067\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>php artisan make:model Follow --all<\/code><\/pre>\n<\/div>\n<p class=\"file_name\"><em><br \/>\ndatabase\/migrations\/2023_XX_XX_XXXXXX_create_follows_table.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0 0 20px 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>\/\/\u4e00\u90e8\u629c\u7c8b\r\npublic function up()\r\n{\r\n    Schema::table('follows', function (Blueprint $table) {\r\n        $table-&gt;id();\r\n        $table-&gt;bigInteger('user_id')-&gt;unsigned();      \/\/\u81ea\u5206\u306eID\r\n        $table-&gt;bigInteger('follow_id')-&gt;unsigned();    \/\/\u53cb\u9054\u306eID\r\n        $table-&gt;timestamps();\r\n        \r\n        \r\n        \/\/\u5916\u90e8\u30ad\u30fc\u306e\u5236\u7d04\r\n        $table-&gt;foreign('user_id')-&gt;references('id')-&gt;on('users')-&gt;onDelete('cascade');\r\n        $table-&gt;foreign('follow_id')-&gt;references('id')-&gt;on('users')-&gt;onDelete('cascade');\r\n\r\n        \/\/user_id\u3068follow_id\u306e\u91cd\u8907\u3059\u308b\u7d44\u307f\u5408\u308f\u305b\u306f\u8a31\u3055\u306a\u3044\r\n        $table-&gt;unique(['user_id', 'follow_id']);\r\n    });\r\n}<\/code><\/pre>\n<\/div>\n<p><span style=\"background-color: #d3d3d3;\"><code>$table-&gt;foreign('user_id')-&gt;references('id')-&gt;on('users')-&gt;onDelete('cascade');<\/code><\/span>\u306e\u610f\u5473\u3068\u3057\u3066\u306f\u3001follows\u30c6\u30fc\u30d6\u30eb\u306euser_id\u30ab\u30e9\u30e0\u306f\u3001Users\u30c6\u30fc\u30d6\u30eb\u3092\u89aa\u30c6\u30fc\u30d6\u30eb\u3068\u3057\u3066\u3044\u3066User\u30c6\u30fc\u30d6\u30eb\u306eID\u3092\u53c2\u7167\u3057\u3066\u30c6\u30fc\u30d6\u30eb\u306b\u30ec\u30b3\u30fc\u30c9\u3057\u306a\u3055\u3044\u3002\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002<br \/>\n<span>\u307e\u305f\u3001\u201donDelete(&#8216;cascade&#8217;)\u201d\u3092\u66f8\u304f\u3053\u3068\u3067\u3001\u89aa\u30c6\u30fc\u30d6\u30eb(Users\u30c6\u30fc\u30d6\u30eb)\u306e\u30ec\u30b3\u30fc\u30c9\u304c\u524a\u9664\u3055\u308c\u305f\u5834\u5408\u306b\u3001\u305d\u308c\u306b\u95a2\u9023\u3059\u308b\u5b50\u30c6\u30fc\u30d6\u30eb(follows\u30c6\u30fc\u30d6\u30eb)\u306e\u30ec\u30b3\u30fc\u30c9\u3082\u81ea\u52d5\u7684\u306b\u524a\u9664\u3059\u308b\u8a2d\u5b9a\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001<span style=\"background-color: #d3d3d3;\"><code>$table-&gt;unique(['user_id', follow_id]);<\/code><\/span>\u3092\u66f8\u304f\u3053\u3068\u3067\u91cd\u8907\u3057\u305f&#8221;user_id&#8221;\u3068&#8221;follow_id&#8221;\u306e\u7d44\u307f\u5408\u308f\u305b\u304c\u767b\u9332\u3055\u308c\u308b\u3053\u3068\u3092\u9632\u3050\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n<\/span><\/p>\n<p>\u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u4e0b\u56f3\u306e\u3088\u3046\u306b\u3001\u4f8b\u3048\u3070user(id=1)\u304cuser(id=2)\u3092\u30d5\u30a9\u30ed\u30fc\u3057\u305f\u3068\u304d\u306b\u3001\u305d\u308c\u305e\u308c\u306eID\u304cfollows\u30c6\u30fc\u30d6\u30eb\u306b\u66f8\u304d\u8fbc\u307e\u308c\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/follow.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/follow.png\" alt=\"\" width=\"530\" height=\"120\" class=\"alignnone size-full wp-image-1426\" style=\"border: solid 3px gray;\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/follow.png 530w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/follow-300x68.png 300w\" sizes=\"(max-width: 530px) 100vw, 530px\" \/><\/a><\/p>\n<p>\u6700\u5f8c\u306b\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u3001\u8ffd\u52a0\u3057\u305f\u30ab\u30e9\u30e0\u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u53cd\u6620\u3055\u305b\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>php artisan migrate<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h4 class=\"tejun\">\u2461Users\u30e2\u30c7\u30eb\u306b\u95a2\u6570\u30e1\u30bd\u30c3\u30c9\u3092\u8a18\u8f09<\/h4>\n<p>\u7d9a\u3044\u3066\u3001Users\u30e2\u30c7\u30eb\u306b\u95a2\u6570\u30e1\u30bd\u30c3\u30c9\u3092\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p class=\"file_name\"><em>app\/Modeles\/User.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>use Illuminate\\Support\\Facades\\Auth;    \/\/\u8ffd\u52a0\r\n\r\n\/\/---------------------------- \u4e2d\u7565 ----------------------------\r\n\r\n\/\/user_id\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u3001\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc(ID:follow_id)\u3092\u62bd\u51fa\r\npublic function follows()\r\n{\r\n    return $this-&gt;belongsToMany(User::class, 'follows', 'user_id', 'follow_id');\r\n}\r\n\r\n\/\/\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc(Auth::user())\u3068\u306e\u95a2\u4fc2\u6027\u3092\u8fd4\u3059\r\n\/\/0:\u3069\u3061\u3089\u3082\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u306a\u3044\u30001\uff1a\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u304c\u76f8\u624b\u3092\u30d5\u30a9\u30ed\u30fc\u30002\uff1a\u76f8\u624b\u304c\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u3092\u30d5\u30a9\u30ed\u30fc\u30003\uff1a\u304a\u4e92\u3044\u306b\u30d5\u30a9\u30ed\u30fc\r\npublic function relation()\r\n{\r\n    $id = $this-&gt;id;\r\n\r\n    \/\/\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u304c\u5bfe\u8c61\u30e6\u30fc\u30b6\u30fc\u3092\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u304b\uff1f\u3092true\/false\u3067\u8fd4\u3059\r\n    $follow = (boolean) Auth::user()-&gt;follows()-&gt;where('follow_id', $id)-&gt;first();\r\n\r\n    \/\/\u5bfe\u8c61User\u304c\u81ea\u5206\u3092\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u304b\uff1f\u3092true\/false\u3067\u8fd4\u3059\r\n    $follower = (boolean) $this-&gt;follows()-&gt;where('follow_id', Auth::user()-&gt;id)-&gt;first();\r\n\r\n    if(!($follow) &amp;&amp; !($follower)){ \/\/0:\u3069\u3061\u3089\u3082\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u306a\u3044\r\n        $result = 0;\r\n    }elseif($follow &amp;&amp; !($follower)){ \/\/1\uff1a\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u304c\u76f8\u624b\u3092\u30d5\u30a9\u30ed\u30fc\r\n        $result = 1;\r\n    }elseif(!($follow) &amp;&amp; $follower){ \/\/2\uff1a\u76f8\u624b\u304c\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u3092\u30d5\u30a9\u30ed\u30fc\r\n        $result = 2;\r\n    }else{ \/\/3\uff1a\u304a\u4e92\u3044\u306b\u30d5\u30a9\u30ed\u30fc\r\n        $result = 3;\r\n    }\r\n\r\n    return $result;\r\n}\r\n\r\n\/\/\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u306f\u3001\u5bfe\u8c61\u30e6\u30fc\u30b6\u30fc\u3092\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u304b\uff1f\r\npublic function isFollow()\r\n{\r\n    $id = $this-&gt;id;\r\n    $isFollow = (boolean) Auth::user()-&gt;follows()-&gt;where('follow_id',$id)-&gt;first();\r\n\r\n    return $isFollow;\r\n}<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h4 class=\"tejun\">\u2462\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u7de8\u96c6<\/h4>\n<p>\u7d9a\u3044\u3066\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u7de8\u96c6\u3057\u3066\u3001index\u6a5f\u80fd\uff0cfollow\u6a5f\u80fd\u306e\u8ffd\u52a0\u3092\u884c\u3044\u307e\u3059\u3002User\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u672a\u4f5c\u6210\u306e\u5834\u5408\u306f\u3001\u307e\u305a\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067User\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>php artisan make:controller UserController --model=User<\/code><\/pre>\n<\/div>\n<p class=\"file_name\"><em>app\/Http\/Controllers\/UserController.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>use Illuminate\\Support\\Facades\\Auth;    \/\/\u8ffd\u52a0\r\nuse App\\Models\\Follow;                  \/\/\u8ffd\u52a0\r\n\r\n\/\/---------------------\u3000\u4e2d\u7565\u3000---------------------\r\n\r\npublic function index()\r\n{\r\n    $users = User::where('id','!=',Auth::user()-&gt;id)-&gt;get();\r\n    return view('users.index', compact('users'));\r\n}\r\n\r\npublic function follow(Request $request)\r\n{\r\n    $follow_id = $request-&gt;follow_id;\r\n    \r\n    \/\/\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u304c\u5bfe\u8c61\u306e\u30e6\u30fc\u30b6\u30fc\u3092\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u304b\uff1f \r\n    $isFollow = (boolean) Follow::where('user_id', Auth::user()-&gt;id)-&gt;where('follow_id', $follow_id)-&gt;first();\r\n\r\n    if($isFollow){\r\n        $unfollow = Follow::where('user_id', Auth::user()-&gt;id)-&gt;where('follow_id', $follow_id);\r\n        $unfollow-&gt;delete();\r\n    }else{\r\n        $follow = new follow();\r\n        $follow-&gt;user_id = Auth::user()-&gt;id;\r\n        $follow-&gt;follow_id = $follow_id;\r\n        $follow-&gt;save();\r\n    }\r\n\r\n    return back();\r\n}<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h4 class=\"tejun\">\u2463\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u7de8\u96c6<\/h4>\n<p class=\"file_name\"><em><br \/>\nroutes\/web.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>use App\\Http\\Controllers\\UserController;    \/\/\u8ffd\u52a0\r\n\r\n\/\/--------------------------\u3000\u4e2d\u7565\u3000--------------------------\r\n\r\nRoute::get('\/users\/index',[UserController::class,'index'])-&gt;name('users.index');\r\nRoute::post('\/users\/follow',[UserController::class,'follow'])-&gt;name('users.follow');\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h4 class=\"tejun\">\u2464\u30d3\u30e5\u30fc\u306e\u7de8\u96c6<\/h4>\n<p class=\"file_name\"><em><span>\u7d9a\u3044\u3066\u3001\u30d3\u30e5\u30fc\u306e\u7de8\u96c6\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u30d3\u30e5\u30fc\u30d5\u30a1\u30a4\u30eb\u672a\u4f5c\u6210\u306e\u5834\u5408\u306f\u3001\u307e\u305a\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30d3\u30e5\u30fc\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n<\/span><\/em><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>#\u30d5\u30a9\u30eb\u30c0\u3068\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\r\nmkdir resources\/views\/users\r\ntouch resources\/views\/users\/index.blade.php<\/code><\/pre>\n<\/div>\n<p class=\"file_name\"><em><br \/>\nresources\/views\/users\/index.blade.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\"><code>&lt;div style=\"margin:30px\"&gt;\r\n    &lt;table border=\"1\"&gt;\r\n        &lt;tr&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;ID&lt;\/th&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;\u540d\u524d(name)&lt;\/th&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9(email)&lt;\/th&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;\u95a2\u4fc2\u6027&lt;\/th&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;\u30d5\u30a9\u30ed\u30fc\u30dc\u30bf\u30f3&lt;\/th&gt;\r\n        &lt;\/tr&gt;\r\n        @foreach($users as $user)\r\n        &lt;tr style=\"padding:10px;\"&gt;\r\n            &lt;td style=\"padding:10px;\"&gt;{{ $user-&gt;id }}&lt;\/td&gt;\r\n            &lt;td style=\"padding:10px;\"&gt;{{ $user-&gt;name }}&lt;\/td&gt;\r\n            &lt;td style=\"padding:10px;\"&gt;{{ $user-&gt;email }}&lt;\/td&gt;\r\n            &lt;td style=\"padding:10px;\"&gt;\r\n                @switch($user-&gt;relation())\r\n                    @case(0) &lt;span&gt;N\/A&lt;\/span&gt; @break\r\n                    @case(1) &lt;span&gt;\u3042\u306a\u305f\u304c\u30d5\u30a9\u30ed\u30fc&lt;\/span&gt; @break\r\n                    @case(2) &lt;span&gt;\u3042\u306a\u305f\u3092\u30d5\u30a9\u30ed\u30fc&lt;\/span&gt; @break\r\n                    @case(3) &lt;span&gt;\u76f8\u4e92\u30d5\u30a9\u30ed\u30fc&lt;\/span&gt; @break\r\n                    @default &lt;span&gt;N\/A&lt;\/span&gt;\r\n                @endswitch\r\n            &lt;\/td&gt;\r\n            &lt;td style=\"padding:10px; justify-content:center;\"&gt;\r\n                &lt;form method=\"POST\" action=\"{{ route('users.follow') }}\"&gt;\r\n                    @csrf\r\n                    &lt;input name=\"follow_id\" type=\"hidden\" value=\"{{ $user-&gt;id }}\" \/&gt;\r\n                    @if($user-&gt;isFollow())\r\n                        &lt;button type=\"submit\" style=\"background-color: #efc9d2;\"&gt;\r\n                            \u30d5\u30a9\u30ed\u30fc\u89e3\u9664\r\n                        &lt;\/button&gt;\r\n                    @else\r\n                        &lt;button type=\"submit\" style=\"background-color: #ccffcc;\"&gt;\r\n                            \u30d5\u30a9\u30ed\u30fc\u3059\u308b\r\n                        &lt;\/button&gt;\r\n                    @endif\r\n                &lt;\/form&gt;\r\n            &lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        @endforeach\r\n    &lt;\/table&gt;\r\n&lt;\/div&gt;<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h4 class=\"tejun\">\u2465Seeder\u3092\u5b9f\u884c\u3057\u3066\u30e6\u30fc\u30b6\u30fc\u30c7\u30fc\u30bf\u3092\u633f\u5165\u3057\u3066\u307f\u308b<\/h4>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30e6\u30fc\u30b6\u30fc\u30c7\u30fc\u30bf\u3092\u30ea\u30bb\u30c3\u30c8\u3057\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3061\u30c0\u30df\u30fc\u30e6\u30fc\u30b6\u30fc10\u4ef6\u3092\u633f\u5165\u3059\u308b\u3002<br \/>\n\u30e6\u30fc\u30b6\u30fc\u306e\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u306e\u633f\u5165\u3059\u308b\u65b9\u6cd5\u306f\u3001<a href=\"https:\/\/trend-appsweb.com\/myportfolio\/?p=1361\">\u3053\u3061\u3089\u306e\u8a18\u4e8b<\/a>\u306b\u307e\u3068\u3081\u3066\u3042\u308b\u306e\u3067\u3054\u53c2\u7167\u4e0b\u3055\u3044\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>#tinker\u8d77\u52d5\r\nphp artisan tinker\r\n\r\n#Users\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u3092\u30af\u30ea\u30a2\r\n&gt; User::truncate();\r\n\r\n#tinker\u7d42\u4e86\r\n&gt; quit\r\n\r\n#\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u306e\u633f\u5165\r\nphp artisan db:seed --class=UserSeeder<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h4 class=\"tejun\">\u2466\u30ed\u30b0\u30a4\u30f3\u7528\u306e\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u3092\u767b\u9332<\/h4>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u9806\u306b\u6253\u3061\u3001\u30ed\u30b0\u30a4\u30f3\u7528\u306e\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u3092\u767b\u9332<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>#tinker\u306e\u8d77\u52d5\r\nphp artisan tinker\r\n\r\n#\u8d77\u52d5\u5f8c\u3001\u4ee5\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3063\u3066\u3044\u304f\r\n&gt; $user=new User();\r\n&gt; $user-&gt;name = \"test_user\";\r\n&gt; $user-&gt;email = \"test@mail.example\";\r\n&gt; $user-&gt;password = Hash::make('password');\r\n&gt; $user-&gt;save(); \r\n\r\n#tinker\u306e\u7d42\u4e86\r\n&gt; quit<\/code><\/pre>\n<\/div>\n<p>\u3053\u308c\u3067\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u3067Users\u30c6\u30fc\u30d6\u30eb\u306b\u60c5\u5831\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 38.1163%;\">\n<tbody>\n<tr>\n<td style=\"width: 15.8301%;\">name<\/td>\n<td style=\"width: 13.3402%;\">test_user<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 15.8301%;\">email<\/td>\n<td style=\"width: 13.3402%;\">test@mail.example<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 15.8301%;\">password<\/td>\n<td style=\"width: 13.3402%;\">password<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>users\/index\u306e\u30d3\u30e5\u30fc\u3092\u307f\u3066\u307f\u308b\u3068\u4e0b\u8a18\u306e\u3088\u3046\u306a\u8868\u793a\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u8868\u793a\u306f\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u304c\u3001ID\uff1d11\u306b\u30ed\u30b0\u30a4\u30f3\u7528\u306e\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/table.png\"><img decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/table.png\" alt=\"\" width=\"554\" height=\"628\" class=\"alignnone size-full wp-image-1475\" style=\"border: solid 3px gray;\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/table.png 554w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/table-265x300.png 265w\" sizes=\"(max-width: 554px) 100vw, 554px\" \/><\/a><\/p>\n<h4 class=\"tejun\">\u2467Follow\u30c6\u30fc\u30d6\u30eb\u306bSeeder\u30c7\u30fc\u30bf\u3092\u633f\u5165<\/h4>\n<p>\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc(ID\uff1d11)\u3068\u5404\u30e6\u30fc\u30b6\u30fc\u304c\u3001\u4ee5\u4e0b\u306e\u95a2\u4fc2\u6027\u306b\u306a\u308b\u3088\u3046\u306bSeeder\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>ID\uff1d1~3\u306f\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u3068\u76f8\u4e92\u30d5\u30a9\u30ed\u30fc<br \/>\nID\uff1d4~6\u306f\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u306e\u307f\u30d5\u30a9\u30ed\u30fc<br \/>\nID\uff1d7~9\u306f\u76f8\u624b\u306e\u307f\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u3092\u30d5\u30a9\u30ed\u30fc<br \/>\nID\uff1d10\u306f\u304a\u4e92\u3044\u306b\u30d5\u30a9\u30ed\u30fc\u306a\u3057<\/p>\n<p>FollowSeeder.php\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<p class=\"file_name\"><em>database\/seeders\/FollowSeeder.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>use App\\Models\\User; \/\/\u8ffd\u52a0\r\nuse App\\Models\\Follow; \/\/\u8ffd\u52a0\r\n\r\nclass FollowSeeder extends Seeder\r\n{\r\n\r\n    public function run()\r\n    {\r\n        $data = [\r\n            \/\/ID1~3\u306f\u3001\u76f8\u4e92\u30d5\u30a9\u30ed\u30fc\r\n            [1, 11],[2, 11],[3, 11],[11, 1],[11, 2],[11, 3],\r\n\r\n            \/\/ID4~6\u306f\u3001\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u304c\u30d5\u30a9\u30ed\u30fc\r\n            [11, 4],[11, 5],[11, 6],\r\n\r\n            \/\/ID7~9\u306f\u3001\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u3092\u30d5\u30a9\u30ed\u30fc\r\n            [7, 11],[8, 11],[9, 11]\r\n        ];\r\n\r\n        foreach($data as $record){\r\n            Follow::create([\r\n                'user_id' =&gt; $record[0],\r\n                'follow_id' =&gt; $record[1],\r\n            ]);\r\n        }\r\n    }\r\n}<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001\u30b7\u30fc\u30c0\u30fc\u3092\u633f\u5165\u3057\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>php artisan db:seed --class=FollowSeeder<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h3 class=\"midashi\">\u5b8c\u6210\u56f3<\/h3>\n<p>\u4f5c\u6210\u3057\u305f\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u30d3\u30e5\u30fc\u3092\u307f\u3066\u307f\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u6253\u3061\u3001\u30ed\u30b0\u30a4\u30f3\u3057\u3066users\/index\u30da\u30fc\u30b8\u3092\u958b\u3044\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>php artisan serve --port=8080<\/code><\/pre>\n<\/div>\n<p><span style=\"color: #0000ff;\"><span style=\"color: #000000;\"><a href=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/index.png\"><img decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/index-1024x624.png\" alt=\"\" width=\"924\" height=\"563\" class=\"alignnone wp-image-1479\" style=\"border: solid 3px gray;\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/index-1024x624.png 1024w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/index-300x183.png 300w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/index-768x468.png 768w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/index.png 1057w\" sizes=\"(max-width: 924px) 100vw, 924px\" \/><\/a><\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<p>Index\u30da\u30fc\u30b8\u306b\u3001\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u3068\u306e\u95a2\u9023\u6027\u3068\u30d5\u30a9\u30ed\u30fc\u30dc\u30bf\u30f3\u304c\u8a2d\u7f6e\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/followtable.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/followtable.png\" alt=\"\" width=\"660\" height=\"649\" class=\"alignnone wp-image-1478\" style=\"border: solid 3px gray;\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/followtable.png 742w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/followtable-300x295.png 300w\" sizes=\"(max-width: 660px) 100vw, 660px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/follow.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/follow.gif\" alt=\"\" width=\"378\" height=\"375\" class=\"alignnone size-full wp-image-1481\" \/><\/a><\/p>\n<p>\u2191\u30dc\u30bf\u30f3\u306e\u307b\u3046\u3082\u304d\u3061\u3093\u3068\u6a5f\u80fd\u3057\u307e\u3057\u305f\u3002<\/p>\n<h3 class=\"midashi\">\u307e\u3068\u3081&amp;\u88dc\u8db3<\/h3>\n<p>\u4eca\u56de\u306f\u3001\u4e2d\u9593\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u305b\u305a\u306b\u5c02\u7528\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u7528\u610f\u3057\u307e\u3057\u305f\u3002<br \/>\n\u3053\u306e\u3088\u3046\u306b\u4f5c\u6210\u3059\u308b\u3068\u3001\u4f8b\u3048\u3070\u81ea\u5206\u304c\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u4eba\u3001\u81ea\u5206\u306e\u30d5\u30a9\u30ed\u30ef\u30fc\u3001\u76f8\u4e92\u30d5\u30a9\u30ed\u30ef\u30fc\u3092\u30ea\u30b9\u30c8\u8868\u793a\u3057\u305f\u3044\u5834\u5408\u306b\u3068\u3066\u3082\u7c21\u5358\u306a\u306e\u3067\u5c02\u7528\u30c6\u30fc\u30d6\u30eb\u3092\u7528\u610f\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u30ea\u30b9\u30c8\u3092\u8868\u793a\u65b9\u6cd5\u3082\u4ee5\u4e0b\u306b\u793a\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n\u307e\u305a\u306f\u30ea\u30b9\u30c8\u8868\u793a\u3059\u308b\u30da\u30fc\u30b8\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002User\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306eList\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u3068\u3067\u3082\u547d\u540d\u3057\u307e\u3059\u3002<\/p>\n<p class=\"file_name\"><em>routes\/web.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>use App\\Http\\Controllers\\UserController;    \/\/\u8ffd\u52a0\r\n\r\n\/\/------------------- \u4e2d\u7565 -------------------\r\n\r\nRoute::get('\/users\/list',[UserController::class,'list'])-&gt;name('users.list');  \/\/\u8ffd\u52a0\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u7d9a\u3044\u3066\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u7de8\u96c6\u3057\u3066list\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\nFollow\u30e2\u30c7\u30eb\u3092\u4f5c\u6210\u3057\u305f\u3053\u3068\u3067\u3001&#8221;<code>use App\\Models\\Follow;<\/code>&#8220;\u3092\u5ba3\u8a00\u3059\u308b\u3053\u3068\u3067\u3001User\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u5185\u3067\u76f4\u63a5Follow\u30c6\u30fc\u30d6\u30eb\u306e\u64cd\u4f5c\u304c\u3067\u304d\u308b\u306e\u3067\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p class=\"file_name\"><em>app\/Http\/Controllers\/UserController.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>use App\\Models\\Follow; \/\/\u8ffd\u52a0\r\n\r\n\/\/------------------------ \u4e2d\u7565 ------------------------\r\n\r\npublic function list(){\r\n    \/\/\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u304c\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u306eID\u3092$follow_id\u306bArray\u3067\u683c\u7d0d\r\n    $follow_id = Follow::where('user_id', Auth::user()-&gt;id)-&gt;pluck('follow_id')-&gt;toArray();\r\n\r\n    \/\/\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u3092\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u306eID\u3092$follower_id\u306bArray\u3067\u683c\u7d0d\r\n    $follower_id = Follow::where('follow_id', Auth::user()-&gt;id)-&gt;pluck('user_id')-&gt;toArray();\r\n\r\n    \/\/\u76f8\u4e92\u30d5\u30a9\u30ed\u30fc\u30e6\u30fc\u30b6\u30fc\u306eID\u3092$follow_each\u306b\u683c\u7d0d\r\n    $follow_each_id = array_intersect($follow_id, $follower_id);\r\n\r\n    \/\/\u76f8\u4e92\u30d5\u30a9\u30ed\u30fc\u30e6\u30fc\u30b6\u30fc\r\n    $follow_eachs = User::whereIn('id', $follow_each_id)-&gt;get();\r\n\r\n    \/\/\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u306e\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc(\u76f8\u4e92\u30d5\u30a9\u30ed\u30fc\u30e6\u30fc\u30b6\u30fc\u3092\u9664\u304f)\r\n    $follows = User::whereIn('id',$follow_id)-&gt;whereNotIn('id',$follow_each_id)-&gt;get();\r\n\r\n    \/\/\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u3092\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc(\u76f8\u4e92\u30d5\u30a9\u30ed\u30fc\u30e6\u30fc\u30b6\u30fc\u3092\u9664\u304f)\r\n    $followers = User::whereIn('id',$follower_id)-&gt;whereNotIn('id',$follow_each_id)-&gt;get();\r\n\r\n\r\n    return view('users.list', compact('follows','followers','follow_eachs'));\r\n}\r\n\r\n<\/code><\/pre>\n<\/div>\n<p>\u30d3\u30e5\u30fc\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u3092\u7de8\u96c6\u3057\u3066\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u304b\u3089\u53d7\u3051\u53d6\u3063\u305f$follows, $followers, $follow_eachs\u3092\u8868\u793a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>#Linux\u30b3\u30de\u30f3\u30c9\u3067\u3001list.blade.php\u3092\u4f5c\u6210\r\ntouch resources\/views\/users\/list.blade.php<\/code><\/pre>\n<\/div>\n<p class=\"file_name\"><em>resources\/views\/list.blade.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\"><code>&lt;div style=\"margin:30px;\"&gt;\r\n    &lt;h3&gt;\u76f8\u4e92\u30d5\u30a9\u30ed\u30fc&lt;\/h3&gt;\r\n    &lt;table border=\"1\"&gt;\r\n        &lt;tr&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;ID&lt;\/th&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;\u540d\u524d&lt;\/th&gt;\r\n        &lt;\/tr&gt;\r\n\r\n        @foreach($follow_eachs as $follow_each)\r\n        &lt;tr&gt;\r\n            &lt;td style=\"padding:10px;\"&gt;\r\n                {{ $follow_each-&gt;id }}\r\n            &lt;\/td&gt;\r\n            &lt;td style=\"padding:10px;\"&gt;\r\n                {{ $follow_each-&gt;name }}\r\n            &lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        @endforeach\r\n    &lt;\/table&gt;\r\n\r\n    &lt;h3&gt;\u3042\u306a\u305f\u304c\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc&lt;\/h3&gt;\r\n    &lt;table border=\"1\"&gt;\r\n        &lt;tr&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;ID&lt;\/th&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;\u540d\u524d&lt;\/th&gt;\r\n        &lt;\/tr&gt;\r\n\r\n         @foreach($follows as $follow)\r\n         &lt;tr&gt;\r\n             &lt;td style=\"padding:10px;\"&gt;\r\n                 {{ $follow-&gt;id }}\r\n             &lt;\/td&gt;\r\n             &lt;td style=\"padding:10px;\"&gt;\r\n                 {{ $follow-&gt;name }}\r\n             &lt;\/td&gt;\r\n         &lt;\/tr&gt;\r\n         @endforeach\r\n    &lt;\/table&gt;\r\n\r\n    &lt;h3&gt;\u3042\u306a\u305f\u3092\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc&lt;\/h3&gt;\r\n    &lt;table border=\"1\"&gt;\r\n        &lt;tr&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;ID&lt;\/th&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;\u540d\u524d&lt;\/th&gt;\r\n        &lt;\/tr&gt;\r\n\r\n        @foreach($followers as $follower)\r\n        &lt;tr&gt;\r\n            &lt;td style=\"padding:10px;\"&gt;\r\n                {{ $follower-&gt;id }}\r\n            &lt;\/td&gt;\r\n            &lt;td style=\"padding:10px;\"&gt;\r\n                {{ $follower-&gt;name }}\r\n            &lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        @endforeach\r\n    &lt;\/table&gt;\r\n&lt;\/div&gt;\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\/users\/list\u3092\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/follow_each.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/follow_each.png\" alt=\"\" width=\"1016\" height=\"296\" class=\"alignnone size-full wp-image-1498\" style=\"border: solid 3px gray;\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/follow_each.png 1016w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/follow_each-300x87.png 300w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/follow_each-768x224.png 768w\" sizes=\"(max-width: 1016px) 100vw, 1016px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30c6\u30fc\u30de \u3069\u3046\u3082\uff01\uff01naoto555\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001Laravel\u3092\u7528\u3044\u3066\u6628\u4eca\u306eSNS\u3067\u306f\u5f53\u305f\u308a\u524d\u306b\u306a\u3063\u305f\u30d5\u30a9\u30ed\u30fc\u6a5f\u80fd\u30d5\u30a9\u30ed\u30ef\u30fc\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002Users\u30c6\u30fc\u30d6\u30eb\u306e\u8a73\u7d30\u3084\u767b\u9332\u3057\u3066\u3044\u308bUsers\u30c7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13],"tags":[],"class_list":["post-1422","post","type-post","status-publish","format-standard","hentry","category-laravelphp"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts\/1422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1422"}],"version-history":[{"count":72,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts\/1422\/revisions"}],"predecessor-version":[{"id":2183,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts\/1422\/revisions\/2183"}],"wp:attachment":[{"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}