{"id":1842,"date":"2023-03-29T19:06:45","date_gmt":"2023-03-29T10:06:45","guid":{"rendered":"https:\/\/trend-appsweb.com\/myportfolio\/?p=1842"},"modified":"2024-02-11T18:20:15","modified_gmt":"2024-02-11T09:20:15","slug":"laravel%e3%81%a7%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e5%89%8d%e5%be%8c%e3%81%ae%e7%94%bb%e9%9d%a2%e9%81%b7%e7%a7%bb%e3%82%92%e8%87%aa%e7%94%b1%e3%81%ab%e8%a8%ad%e5%ae%9a%e3%81%97%e3%81%a6%e3%81%bf","status":"publish","type":"post","link":"https:\/\/trend-appsweb.com\/myportfolio\/?p=1842","title":{"rendered":"Laravel\u3067\u30ed\u30b0\u30a4\u30f3\u524d\u5f8c\u306e\u753b\u9762\u9077\u79fb\u3092\u81ea\u7531\u306b\u8a2d\u5b9a\u3057\u3066\u307f\u308b"},"content":{"rendered":"<h3 class=\"midashi\">\u30c6\u30fc\u30de<\/h3>\n<p>\u3053\u3093\u306b\u3061\u306f\uff01naoto555\u3067\u3059\u3002<br \/>\n<span style=\"color: #000000;\">\u672c\u8a18\u4e8b\u3067\u306f\u3001Laravel\u3067\u30ed\u30b0\u30a4\u30f3\u524d\u5f8c\u306e\u753b\u9762\u9077\u79fb\u5148\u3092\u81ea\u7531\u306b\u8a2d\u5b9a\u3057\u3066\u307f\u308b\u65b9\u6cd5\u306b\u95a2\u3057\u3066\u8aac\u660e\u3057\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u66f4\u306b\u5fdc\u7528\u3068\u3057\u3066\u3001\u7279\u5b9a\u306e\u30e6\u30fc\u30b6\u30fc\u306e\u307f\u5165\u308c\u308b\u30da\u30fc\u30b8\u3092\u4f5c\u3063\u3066\u307f\u308b\u65b9\u6cd5\u3082\u89e3\u8aac\u3057\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u662f\u975e\u6700\u5f8c\u307e\u3067\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/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%; height: 230px;\">\n<tbody>\n<tr style=\"height: 46px;\">\n<td style=\"width: 28.9191%; height: 46px;\">\u7d71\u5408\u958b\u767a\u74b0\u5883<\/td>\n<td style=\"width: 29.3499%; height: 46px;\">aws cloud9<\/td>\n<\/tr>\n<tr style=\"height: 46px;\">\n<td style=\"width: 28.9191%; height: 46px;\">PHP<\/td>\n<td style=\"width: 29.3499%; height: 46px;\">8.1.17<\/td>\n<\/tr>\n<tr style=\"height: 46px;\">\n<td style=\"width: 28.9191%; height: 46px;\">Laravel<\/td>\n<td style=\"width: 29.3499%; height: 46px;\">9.52.4<\/td>\n<\/tr>\n<tr style=\"height: 46px;\">\n<td style=\"width: 28.9191%; height: 46px;\">login\u6a5f\u80fd<\/td>\n<td style=\"width: 29.3499%; height: 46px;\">Laravel\/jetstream(livewire)<\/td>\n<\/tr>\n<tr style=\"height: 46px;\">\n<td style=\"width: 28.9191%; height: 46px;\">Database<\/td>\n<td style=\"width: 29.3499%; height: 46px;\">SQlite(version 3.7.17)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 class=\"midashi\">Laravel\/JetStream\u5c0e\u5165\u76f4\u5f8c\u306eHOME, \u30da\u30fc\u30b8\u9077\u79fb<\/h3>\n<p>Laravel\/JetStream\u5c0e\u5165\u76f4\u5f8c\u306e\u30da\u30fc\u30b8\u9077\u79fb\u56f3\u306f\u4ee5\u4e0b\u306e\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\nHOME\u53f3\u4e0a\u306b\u3001\u30ed\u30b0\u30a4\u30f3\u30da\u30fc\u30b8\u3068\u767b\u9332\u30da\u30fc\u30b8\u3078\u306e\u30ea\u30f3\u30af\u304c\u3042\u308a\u30ed\u30b0\u30a4\u30f3\u5f8c\u306fHOME\u306eURL\u672b\u5c3e\u306b&#8221;\/dashboard&#8221;\u3092\u8ffd\u52a0\u3057\u305f\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u30da\u30fc\u30b8\u3078\u3068\u9077\u79fb\u3057\u307e\u3059\u3002\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u30da\u30fc\u30b8\u3078\u306f\u30ed\u30b0\u30a4\u30f3\u72b6\u614b\u3067\u306a\u3044\u3068\u5165\u308c\u306a\u304f\u3001\u624b\u52d5\u3067&#8221;\/dashboard&#8221;\u3068\u76f4\u63a5URL\u3092\u5165\u529b\u3059\u308b\u3068\u30ed\u30b0\u30a4\u30f3\u30da\u30fc\u30b8\u306b\u81ea\u52d5\u3067\u98db\u3070\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002Laravel\/JetStream\u306e\u5c0e\u5165\u306b\u95a2\u3057\u3066<span>\u306f\u3001<\/span><a href=\"https:\/\/trend-appsweb.com\/myportfolio\/?page_id=573\">\u3053\u3061\u3089\u306e\u8a18\u4e8b<\/a>\u3067\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u306e\u3067<span>\u3001\u3054\u53c2\u7167\u4e0b\u3055\u3044\u3002<\/span><\/p>\n<p><a href=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/03\/laravel.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/03\/laravel-1024x886.png\" alt=\"\" width=\"1024\" height=\"886\" class=\"alignnone size-large wp-image-1849\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/03\/laravel-1024x886.png 1024w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/03\/laravel-300x260.png 300w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/03\/laravel-768x664.png 768w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/03\/laravel.png 1201w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<h3 class=\"midashi\">\u30db\u30fc\u30e0\u753b\u9762\u306e\u8a2d\u5b9a\u65b9\u6cd5\u306e\u89e3\u8aac<\/h3>\n<h4 class=\"tejun\">\u2460Laravel\u5c0e\u5165\u76f4\u5f8c\u306e\u30db\u30fc\u30e0\u753b\u9762\u8a2d\u5b9a<\/h4>\n<p>\u300c<em>route\/web.php<\/em>\u300d\u306b\u8a18\u8f09\u306e\u3042\u308b\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3067\u30db\u30fc\u30e0\u306e\u8a2d\u5b9a\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002Laravel\u306e\u521d\u671f\u8a2d\u5b9a\u3067\u306f\u3001\u30eb\u30fc\u30c8\u30d1\u30b9(\/)\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u5834\u5408\u306b\u8868\u793a\u3055\u308c\u308b\u30da\u30fc\u30b8\u3068\u3057\u3066\u3001<code>\"<span style=\"background-color: lightgray;\">return view('welcome');<\/span>\"<\/code>\u3001\u3064\u307e\u308a\u3001resources\/views\/welcome.blade.php \u3068\u3044\u3046\u30d3\u30e5\u30fc\u30d5\u30a1\u30a4\u30eb\u3092\u8868\u793a\u3059\u308b\u8a18\u8ff0\u304c\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p class=\"file_name\"><em>route\/web.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>Route::get('\/', function () {\r\n    return view('welcome');\r\n});<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h4 class=\"tejun\">\u2461\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u8a2d\u5b9a\u65b9\u6cd5\u3068\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u306e\u30da\u30fc\u30b8\u306e\u8868\u793a\u65b9\u6cd5<\/h4>\n<p>HOME\u753b\u9762\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u304f\u524d\u306b\u3001\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u8a2d\u5b9a\u65b9\u6cd5\u3068\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3067\u306e\u30da\u30fc\u30b8\u306e\u8868\u793a\u65b9\u6cd5\u306b\u95a2\u3057\u3066\u7c21\u5358\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u8a2d\u5b9a\u65b9\u6cd5\u306e\u57fa\u672c\u7684\u306a\u8a18\u8ff0\u306f\u4ee5\u4e0b\u306b\u793a\u3059\u8a18\u8ff0\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p class=\"file_name\"><em>route\/web.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>Route::get('\/test', function () { return view('samples.test');});<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u300cweb.php\u300d\u306b\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u3001HOME\u306eURL\u306e\u672b\u5c3e\u306b\u201d\/test\u201d\u3068\u3044\u3046\u5165\u529b\u3092\u3059\u308b\u3068\u3001<code>\"<span style=\"background-color: lightgray;\">resources\/views\/samples\/test.blade.php<\/span>\"<\/code>\u3092\u958b\u304f\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<span style=\"color: #3366ff;\">\u203b<code>\"<span style=\"background-color: lightgray;\">resources\/views\/samples<\/span>\"<\/code>\u30d5\u30a9\u30eb\u30c0\u3068<code>\"<span style=\"background-color: lightgray;\">resources\/views\/samples\/test.blade.php<\/span>\"<\/code>\u30d5\u30a1\u30a4\u30eb\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u7b49\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u7528\u3044\u305f\u308a\u3001UI\u306b\u3066\u624b\u52d5\u3067\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>mkdir resources\/views\/samples\r\ntouch resources\/views\/samples\/test.blade.php\r\n<\/code><\/pre>\n<\/div>\n<p>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3067\u30d3\u30e5\u30fc\u3092\u8868\u793a\u3059\u308b\u3068\u304d\u306b\u3082\u540c\u3058\u3088\u3046\u306a\u8a18\u8ff0\u3092\u884c\u3044\u307e\u3059\u3002\u4e0b\u8a18\u3067\u306f\u3001TestController\u306etest()\u3068\u3044\u3046\u6a5f\u80fd\u3092\u4f7f\u7528\u3057\u305f\u3068\u304d\u3001<code>\"<span style=\"background-color: lightgray;\">resources\/views\/samples\/test.blade.php<\/span>\"<\/code>\u3092\u8868\u793a\u3057\u306a\u3055\u3044\u3068\u3044\u3046\u8a18\u8ff0\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>class TestController extends Controller\r\n{\r\n\u00a0 \u00a0 public function test()\r\n\u00a0 \u00a0 {\r\n        return view('sample.test');\r\n    }\r\n}<\/code><\/pre>\n<\/div>\n<p>\u3057\u304b\u3057\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u8a18\u8ff0\u3060\u3051\u3067\u306fURL\u306e\u8a2d\u5b9a\u306f\u3067\u304d\u307e\u305b\u3093\u306e\u3067\u3001\u4e0a\u8a18\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306efunction\u3068URL\u3092\u7d10\u3065\u3051\u3059\u308b\u305f\u3081\u306b&#8221;web.php&#8221;\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8a18\u8ff0\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p class=\"file_name\"><em>route\/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\\TestController;\r\n\r\n\/\/--------------------------\u4e2d\u7565--------------------------\r\n\r\nRoute::get('\/test', [TestController::class, 'test'])-&gt;name('test');\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h4 class=\"tejun\">\u2463HOME\u753b\u9762(\u30ed\u30b0\u30a4\u30f3\u524d)\u306e\u8a2d\u5b9a<\/h4>\n<p>\u30ed\u30b0\u30a4\u30f3\u524d\u306eHOME\u753b\u9762\u306e\u8a2d\u5b9a\u306f\u3001web.php\u306e\u4ee5\u4e0b\u306e\u90e8\u5206\u3067\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u305d\u308c\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3059\u308c\u3070\u3001HOME\u753b\u9762(\u30ed\u30b0\u30a4\u30f3\u524d)\u304c\u3001<br \/>\n<code>\"<span style=\"background-color: lightgray;\">resources\/views\/welcome.blade.php<\/span>\"<\/code>\u2192<code>\"<span style=\"background-color: lightgray;\">resources\/views\/samples\/test.blade.php<\/span>\"<\/code>\u306b\u5909\u66f4\u3055\u308c\u307e\u3059\u3002<\/p>\n<p class=\"file_name\"><em>route\/web.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>Route::get('\/', function () { return view('welcome'); });<\/code><\/pre>\n<\/div>\n<div style=\"display: flex; justify-content: center; margin-top: -20px;\"><img decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2022\/12\/arrow.png\" alt=\"\" width=\"188\" height=\"54\" class=\"alignnone size-full wp-image-1049\" style=\"margin: 0 auto;\" \/><\/div>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>Route::get('\/', function () { return view('samples.test'); });<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u7d4c\u7531\u3057\u3066\u3001<code>\"<span style=\"background-color: lightgray;\">resources\/views\/samples\/test.blade.php<\/span>\"<\/code>\u3092\u8868\u793a\u3057\u305f\u3044\u5834\u5408\u306f\u2462\u3067\u7d39\u4ecb\u3057\u305f\u624b\u9806\u306b\u5f93\u3044\u3001TestController\u3092\u4f5c\u6210\u3057\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u3002<\/p>\n<p class=\"file_name\"><em>route\/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\\TestController;\r\n\r\n\/\/--------------------------\u4e2d\u7565--------------------------\r\n\r\nRoute::get('\/', [TestController::class, 'test'])-&gt;name('test');<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h4 class=\"tejun\">\u2464\u30ed\u30b0\u30a4\u30f3\u5f8c\u306e\u9077\u79fb\u5148\u306e\u8a2d\u5b9a<\/h4>\n<p>\u7d9a\u3044\u3066\u3001\u30ed\u30b0\u30a4\u30f3\u5f8c\u306b\u3069\u306e\u753b\u9762\u306b\u9077\u79fb\u3055\u305b\u308b\u304b\u3092\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<br \/>\n\u30ed\u30b0\u30a4\u30f3\u524d\u306f\u5148\u306b\u8a2d\u5b9a\u3057\u305f<code>\"<span style=\"background-color: lightgray;\">resources\/views\/samples\/test.blade.php<\/span>\"<\/code>\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3001\u30ed\u30b0\u30a4\u30f3\u5f8c\u306f<code>\"<span style=\"background-color: lightgray;\">resources\/views\/products\/index.blade.php<\/span>\"<\/code>\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3044\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8a18\u8ff0\u3092\u3057\u307e\u3059\u3002<br \/>\n\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u5f8c\u306eURL\u306f\u3001&#8217;\/product&#8217;\u306b\u306a\u308a\u307e\u3059\u304c\u3001\u624b\u5165\u529b\u3067\u2019product\u2019\u3092\u524a\u9664\u3057\u3066&#8217;\/&#8217;\u3068\u5165\u529b\u3057\u3066\u3082\u3001&#8217;\/product&#8217;\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<table style=\"width: 93.0832%; border-collapse: collapse; background-color: #c4e1f2;\">\n<tbody>\n<tr>\n<td style=\"width: 22.299%;\">\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c<\/td>\n<td style=\"width: 35.9131%;\">URL<\/td>\n<td style=\"width: 40.4528%;\">\u8868\u793a\u30d3\u30e5\u30fc<\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td style=\"width: 22.299%;\">\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u524d<\/td>\n<td style=\"width: 35.9131%;\">https:\/\/&#8230;&#8230;amazonaws.com<\/td>\n<td style=\"width: 40.4528%;\">resources\/views\/samples\/test.blade.php<\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td style=\"width: 22.299%;\">\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u5f8c<\/td>\n<td style=\"width: 35.9131%;\">https:\/\/&#8230;&#8230;amazonaws.com(\/product)<\/td>\n<td style=\"width: 40.4528%;\">resources\/views\/products\/index.blade.php<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"file_name\"><em>route\/web.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>\/\/\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u524d\u306e\u8868\u793a\u30d3\u30e5\u30fc\r\nRoute::middleware(['guest'])-&gt;group(function () {\r\n    Route::get('\/', function () {\r\n        return view('samples.test');\r\n    });\r\n});\r\n\r\n\/\/\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u5f8c\u306e\u8868\u793a\u30d3\u30e5\u30fc\r\nRoute::middleware([\r\n    'auth:sanctum',\r\n    config('jetstream.auth_session'),\r\n    'verified'\r\n])-&gt;group(function () {\r\n    Route::get('\/product', function () {\r\n        return view('products.index');\r\n    })-&gt;name('products.index');\r\n});<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p class=\"file_name\"><em>app\/Providers\/RouteServiceProvider.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>\/\/public const HOME = '\/dashboard';\r\npublic const HOME = '\/product';<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u300cweb.php\u300d\u3067\u306f\u3001\u30ed\u30b0\u30a4\u30f3\u524d\u306b&#8221;\/&#8221;\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u5834\u5408\u3001&#8217;guest&#8217;\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u305d\u3057\u3066&#8217;guest&#8217;\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u304c\u5b9f\u884c\u3055\u308c\u305f\u5f8c\u3001Route::get(&#8216;\/&#8217;, function(){&#8230;.})\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u304c\u5b9f\u884c\u3055\u308c\u3001samples.test\u30d3\u30e5\u30fc\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u5f8c\u306f\u3001&#8221;<em>app\/Providers\/RouteServiceProvider.php<\/em>&#8220;\u3067&#8221;\/project&#8221;\u3092HOME\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u201d\/\u201d\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3068\u304d\u306fHOME\u753b\u9762\u306b\u9077\u79fb\u3057\u307e\u3059\u3002<br \/>\nweb.php\u3067\u306f\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u306a\u3044\u72b6\u614b\u3067\u3001\u624b\u5165\u529b\u3067&#8221;\/product&#8221;\u3092\u5165\u529b\u3057\u305f\u5834\u5408\u306b\u30ed\u30b0\u30a4\u30f3\u30da\u30fc\u30b8\u306b\u98db\u3070\u3059\u51e6\u7406\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u3067\u4f7f\u7528\u3057\u3066\u3044\u308b\u3001\u5404\u30df\u30c9\u30eb\u306e\u6a5f\u80fd\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p><strong><span style=\"font-size: 14pt;\">auth:sanctum<\/span><br \/>\n<\/strong>\u8a8d\u8a3c\u306b\u5fc5\u8981\u306a\u51e6\u7406\u3092\u884c\u3046\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3067\u3001Sanctum\u3068\u3044\u3046\u8a8d\u8a3c\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u304c\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u3001\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u3066\u30ed\u30b0\u30a4\u30f3\u30da\u30fc\u30b8\u306b\u9077\u79fb\u3055\u305b\u307e\u3059\u3002<strong><br \/>\n<\/strong><\/p>\n<p><span><span style=\"font-size: 14pt;\"><strong>config(&#8216;jetstream.auth_session&#8217;)<\/strong><\/span><br \/>\n\u8a8d\u8a3c\u306e\u305f\u3081\u306e\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3067\u3059\u3002\u8a8d\u8a3c\u304c\u5fc5\u8981\u306a\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u3001\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u8a8d\u8a3c\u304c\u901a\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u30ed\u30b0\u30a4\u30f3\u30da\u30fc\u30b8\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><strong><span style=\"font-size: 14pt;\">verified<\/span><br \/>\n<\/strong>\u30e6\u30fc\u30b6\u30fc\u304c\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u78ba\u8a8d\u3092\u6e08\u307e\u305b\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306e\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3067\u3059\u3002<br \/>\n\u30e1\u30fc\u30eb\u78ba\u8a8d\u304c\u6e08\u3093\u3067\u3044\u306a\u3044\u5834\u5408\u306f\u3001\u30e1\u30fc\u30eb\u78ba\u8a8d\u753b\u9762\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u307e\u3059\u3002\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u30aa\u30d5\u306a\u306e\u3067\u6709\u52b9\u306b\u3057\u306a\u3044\u9650\u308a\u6a5f\u80fd\u3057\u307e\u305b\u3093\u3002)<strong><\/strong><\/p>\n<h4 class=\"tejun\">\u2465\u7279\u5b9a\u306e\u30e6\u30fc\u30b6\u30fc\u306e\u307f\u5165\u308c\u308b\u30da\u30fc\u30b8\u3092\u4f5c\u3063\u3066\u307f\u3088\u3046<\/h4>\n<p class=\"file_name\"><em>\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u4f7f\u3046\u3053\u3068\u3067\u7279\u5b9a\u306e\u30e6\u30fc\u30b6\u30fc\u306e\u307f\u304c\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u30da\u30fc\u30b8\u3092\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001User\u306eID\u304c3\u4ee5\u4e0b\u3067\u306a\u3044\u3068\u5165\u308c\u306a\u3044\u3088\u3046\u306a\u30da\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/em><\/p>\n<p class=\"file_name\"><strong><span style=\"font-size: 14pt;\">\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u4f5c\u6210<\/span><br \/>\n<\/strong>\u307e\u305a\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u306b\u6253\u3063\u3066\u3001UserCheck\u3068\u3044\u3046\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u4f5c\u6210\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># app\/Http\/Middleware\/UserCheck.php\u3092\u4f5c\u6210\r\nphp artisan make:middleware UserCheck<\/code><\/pre>\n<\/div>\n<p><span style=\"font-size: 14pt;\"><strong>\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u7de8\u96c6<\/strong><\/span><br \/>\n\u4f5c\u6210\u3055\u308c\u305f\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7de8\u96c6\u3057\u3066\u3044\u304d\u307e\u3059\u3002&#8217;\/admin&#8217;\u306b\u30a2\u30af\u30bb\u30b9\u6642\u306e\u6319\u52d5\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6761\u4ef6\u5206\u5c90\u3055\u305b\u307e\u3059\u3002<br \/>\n\u30fb\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u3057\u3066\u3044\u306a\u3044\u30e6\u30fc\u30b6\u30fc\u306f\u3001<code>\"<span style=\"background-color: lightgray;\">resources\/views\/samples\/test.blade.php<\/span>\"<\/code>\u3092\u8868\u793a\u3055\u305b\u307e\u3059\u3002<br \/>\n\u30fb\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u3057\u3066\u3044\u3066\u3001\u30e6\u30fc\u30b6\u30fc\u306eID\u304c3\u4ee5\u4e0b\u306e\u30e6\u30fc\u30b6\u30fc\u306f\u3001<code>\"<span style=\"background-color: lightgray;\">resources\/views\/admins\/admin.blade.php<\/span>\"<\/code>\u3092\u8868\u793a\u3055\u305b\u307e\u3059\u3002<br \/>\n\u30fb\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u3057\u3066\u3044\u3066\u3001\u30e6\u30fc\u30b6\u30fc\u306eID\u304c4\u4ee5\u4e0a\u306e\u30e6\u30fc\u30b6\u30fc\u306f\u3001<code>\"<span style=\"background-color: lightgray;\">resources\/views\/products\/index.blade.php<\/span>\"<\/code>\u3092\u8868\u793a\u3055\u305b\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306f\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u51e6\u7406\u3059\u308b\u6bb5\u968e\u3067\u5b9f\u884c\u3055\u308c\u308b\u305f\u3081\u3001\u30d3\u30e5\u30fc\u3092\u76f4\u63a5\u8fd4\u3059\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081\u300cweb.php\u300d\u3067\u66f8\u3044\u305f\u3088\u3046\u306a<code>\"<span style=\"background-color: lightgray;\">return view('sample.test')<\/span>\"<\/code>\u307f\u305f\u3044\u306a\u66f8\u304d\u65b9\u306f\u3067\u304d\u306a\u304f\u3001\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3092\u4f7f\u7528\u3057\u3066\u30eb\u30fc\u30c8\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u4ecb\u3057\u3066\u30d3\u30e5\u30fc\u3092\u8fd4\u3059\u5fc5\u8981\u304c\u3042\u308a\u3001<code>\"<span style=\"background-color: lightgray;\">return redirect()-&gt;route('sample.test')<\/span>\"<\/code>\u3068\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p class=\"file_name\"><em>app\/Http\/Middlewere\/UserCheck.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>namespace App\\Http\\Middleware;\r\n\r\nuse Closure;\r\nuse Illuminate\\Http\\Request;\r\nuse Illuminate\\Support\\Facades\\Auth;  \/\/\u8ffd\u52a0\r\n\r\nclass UserCheck\r\n{   \r\n    public function handle(Request $request, Closure $next)\r\n    {\r\n        \/\/-------------------------\u8ffd\u52a0\uff08\u3053\u3053\u304b\u3089\uff09-------------------------\r\n        if(Auth::check()){\r\n            \/\/\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u306e\u60c5\u5831\u3092\u53d6\u5f97\r\n            $user = Auth::user();\r\n            if($user-&gt;id &lt;= 3){\r\n                return $next($request);\r\n            }else{\r\n                return redirect()-&gt;route('products.index');\r\n            }\r\n        }else{\r\n            return redirect()-&gt;route('samples.test');\r\n        }\r\n        \/\/-------------------------\u8ffd\u52a0\uff08\u3053\u3053\u307e\u3067\uff09-------------------------\r\n    }\r\n}<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"font-size: 14pt;\">\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u30ab\u30fc\u30cd\u30eb\u306b\u767b\u9332<\/span><br \/>\n<\/strong>\u4f5c\u6210\u3057\u305f\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u30ab\u30fc\u30cd\u30eb\u306b\u767b\u9332\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p class=\"file_name\"><em>app\/Http\/Middlewere\/Kernel.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>protected $routeMiddleware = [\r\n    'auth' =&gt; \\App\\Http\\Middleware\\Authenticate::class,\r\n    'auth.basic' =&gt; \\Illuminate\\Auth\\Middleware\\AuthenticateWithBasicAuth::class,\r\n    'auth.session' =&gt; \\Illuminate\\Session\\Middleware\\AuthenticateSession::class,\r\n    'cache.headers' =&gt; \\Illuminate\\Http\\Middleware\\SetCacheHeaders::class,\r\n    'can' =&gt; \\Illuminate\\Auth\\Middleware\\Authorize::class,\r\n    'guest' =&gt; \\App\\Http\\Middleware\\RedirectIfAuthenticated::class,\r\n    'password.confirm' =&gt; \\Illuminate\\Auth\\Middleware\\RequirePassword::class,\r\n    'signed' =&gt; \\App\\Http\\Middleware\\ValidateSignature::class,\r\n    'throttle' =&gt; \\Illuminate\\Routing\\Middleware\\ThrottleRequests::class,\r\n    'verified' =&gt; \\Illuminate\\Auth\\Middleware\\EnsureEmailIsVerified::class,\r\n    'usercheck' =&gt; \\App\\Http\\Middleware\\UserCheck::class, \/\/\u8ffd\u52a0\r\n];<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"font-size: 14pt;\">\u4f5c\u6210\u3057\u305f\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u4f7f\u3063\u305f\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u8a2d\u5b9a<\/span><br \/>\n<\/strong>\u4f5c\u6210\u3057\u305f\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092web.php\u306b\u767b\u9332\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u30ab\u30fc\u30cd\u30eb\u306b\u767b\u9332\u3057\u305f&#8217;usercheck&#8217;\u3092\u4f7f\u3063\u3066\u3001Route::middleware([&#8216;usercheck&#8217;])-&gt;group(function(){&#8230;.});\u3068\u8a18\u8ff0\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u30e6\u30fc\u30b6\u30fcID\uff1d1~3\u306a\u3089\u3001&#8217;\/admin&#8217;\u3068URL\u3092\u76f4\u63a5\u5165\u529b\u3057\u305f\u3068\u304d\u306b<code>\"<span style=\"background-color: lightgray;\">resources\/views\/admins\/admin.blade.php<\/span>\"<\/code>\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u305d\u308c\u4ee5\u5916\u306a\u3089\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30c3\u30bb\u30fc\u30b8\u3068\u3068\u3082\u306b<code>\"<span style=\"background-color: lightgray;\">resources\/views\/products\/index.blade.php<\/span>\"<\/code>\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p class=\"file_name\"><em>route\/web.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>\/\/\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u524d\u306e\u8868\u793a\u30d3\u30e5\u30fc\r\nRoute::middleware(['guest'])-&gt;group(function () {\r\n    Route::get('\/', function () {\r\n        return view('samples.test');\r\n    })-&gt;name('samples.test');\r\n});\r\n\r\n\/\/\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u5f8c\u306e\u8868\u793a\u30d3\u30e5\u30fc\r\nRoute::middleware([\r\n    'auth:sanctum',\r\n    config('jetstream.auth_session'),\r\n    'verified'\r\n])-&gt;group(function () {\r\n    Route::get('\/product', function () {\r\n        return view('products.index');\r\n    })-&gt;name('products.index');\r\n});\r\n\r\n\/\/------------------------------\u8ffd\u52a0(\u3053\u3053\u304b\u3089)------------------------------\r\n\/\/\u7279\u5b9a\u30e6\u30fc\u30b6\u30fc(ID\u304c3\u4ee5\u4e0b)\u306e\u307f\u5165\u308c\u308b\u30da\u30fc\u30b8\r\nRoute::middleware(['usercheck'])-&gt;group(function(){\r\n    Route::get('\/admin', function () {\r\n        return view('admins.admin');\r\n    })-&gt;name('admins.admin');   \r\n});\r\n\/\/------------------------------\u8ffd\u52a0(\u3053\u3053\u307e\u3067)------------------------------<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h4 class=\"tejun\">\u2466\u30d3\u30e5\u30fc\u3092\u4f5c\u6210\u3057\u3066\u52d5\u304d\u3092\u307f\u3066\u307f\u307e\u3057\u3087\u3046<\/h4>\n<p>\u4ee5\u4e0b\u30b3\u30de\u30f3\u30c9\u3067\u5404\u7a2e\u30d3\u30e5\u30fc\u3092\u4f5c\u3063\u3066\u3044\u304d\u3001\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>#samples\/test\u30d3\u30e5\u30fc\u3092\u4f5c\u6210(\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u524d)\r\nmkdir resources\/views\/samples\r\ntouch resources\/views\/samples\/test.blade.php\r\n\r\n#products\/index\u30d3\u30e5\u30fc\u3092\u4f5c\u6210(\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u5f8c)\r\nmkdir resources\/views\/products\r\ntouch resources\/views\/products\/index.blade.php\r\n\r\n#admins\/admin\u30d3\u30e5\u30fc\u3092\u4f5c\u6210(\u7279\u5b9a\u30e6\u30fc\u30b6\u30fc\u3001ID\u304c3\u4ee5\u4e0b)\r\nmkdir resources\/views\/admins\r\ntouch resources\/views\/admins\/admin.blade.php\r\n<\/code><\/pre>\n<\/div>\n<p class=\"file_name\"><em>resources\/views\/samples\/test.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;h1&gt;\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u524d\u306e\u30da\u30fc\u30b8&lt;\/h1&gt;<\/code><\/pre>\n<\/div>\n<p class=\"file_name\"><em><br \/>\nresources\/views\/products\/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;h1&gt;\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u5f8c\u306e\u30da\u30fc\u30b8&lt;\/h1&gt;<\/code><\/pre>\n<\/div>\n<p class=\"file_name\"><em>resources\/views\/admins\/admin.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;h1&gt;Admin\u30da\u30fc\u30b8&lt;\/h1&gt;\r\n&lt;p&gt;\u3042\u306a\u305f\u306e\u30e6\u30fc\u30b6\u30fcID\u306f3\u4ee5\u4e0b\u3067\u3059\u3002&lt;\/p&gt;<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u5404URL\u3067\u306e\u8868\u793a\u3092\u8868\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/03\/table2.png\"><img decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/03\/table2-1024x574.png\" alt=\"\" width=\"1024\" height=\"574\" class=\"alignnone size-large wp-image-1895\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/03\/table2-1024x574.png 1024w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/03\/table2-300x168.png 300w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/03\/table2-768x431.png 768w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/03\/table2.png 1264w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>\u6a29\u9650\u30e6\u30fc\u30b6\u30fc\u4ee5\u5916\u3001&#8217;\/admin&#8217;\u306b\u306f\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306e\u4f8b\u3067\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u306eID\u304c3\u4ee5\u4e0b\u306e\u30e6\u30fc\u30b6\u30fc\u306e\u307f&#8217;\/admin&#8217;\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001User\u30c6\u30fc\u30d6\u30eb\u306badmin\u30ab\u30e9\u30e0\u3092\u8ffd\u52a0\u3057\u3066admin\u30ab\u30e9\u30e0\u304ctrue\u306e\u3068\u304d\u3060\u3051\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u306a\u3069\u3001\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306eif\u6587\u306e\u6761\u4ef6\u3092\u5909\u3048\u308c\u3070\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u3042\u3063\u305f\u5236\u9650\u30da\u30fc\u30b8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h3 class=\"midashi\">\u307e\u3068\u3081<\/h3>\n<p>\u8981\u70b9\u3092\u307e\u3068\u3081\u308b\u3068\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><span style=\"font-size: 14pt;\"><strong>\u30ed\u30b0\u30a4\u30f3\u524d\u306eHOME\u8a2d\u5b9a<\/strong><\/span><\/p>\n<p class=\"file_name\">\u2460\u300cweb.php\u300d\u306b\u4ee5\u4e0b\u3092\u8a18\u5165<\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>Route::middleware(['guest'])-&gt;group(function(){Route::get('\/',function(){...});<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 14pt;\"><strong>\u30ed\u30b0\u30a4\u30f3\u5f8c\u306eHOME\u8a2d\u5b9a<\/strong><\/span><\/p>\n<p class=\"file_name\">\u2460\u300cweb.php\u300d\u306b\u4ee5\u4e0b\u3092\u8a18\u5165<\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>Route::middleware([\r\n    'auth:sanctum',\r\n    config('jetstream.auth_session'),\r\n    'verified'\r\n])-&gt;group(function () {\r\n    Route::get('\/XXXX', function () {\r\n        ....\r\n    })-&gt;name('YYYY');\r\n});<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p class=\"file_name\">\u2461\u300cRouteServiceProvider.php\u300d\u306b\u4ee5\u4e0b\u3092\u8a18\u8f09(\/XXXX\u306fHOME\u306b\u8a2d\u5b9a\u3057\u305f\u3044URL)<\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>public const HOME = '\/XXXX';<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 14pt;\"><strong>\u7279\u5b9a\u306e\u30e6\u30fc\u30b6\u30fc\u306e\u307f\u5165\u308c\u308b\u30da\u30fc\u30b8\u3092\u4f5c\u6210\u3059\u308b<\/strong><\/span><\/p>\n<p class=\"file_name\">\u2460\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u4f5c\u6210(XXXX\uff1a\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u540d)<\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>php artisan make:middleware XXXX<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p class=\"file_name\">\u2461\u4f5c\u6210\u3057\u305f\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u7de8\u96c6(\u6761\u4ef6\uff1a\u30da\u30fc\u30b8\u95b2\u89a7\u306e\u6761\u4ef6)<\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>if(Auth::check()){\r\n    $user = Auth::user();\r\n    if(\u6761\u4ef6){\r\n        return $next($request);\r\n    }else{\r\n        \/\/return redirect()-&gt;route('\u95b2\u89a7\u6a29\u9650\u306a\u3057\u30e6\u30fc\u30b6\u30fc\u306e\u9077\u79fb\u5148');\r\n    }\r\n}else{\r\n    \/\/return redirect()-&gt;route('\u975e\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u306e\u9077\u79fb\u5148');\r\n}<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p class=\"file_name\">\u2462\u4f5c\u6210\u3057\u305f\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u300cKernel.php\u300d\u306b\u767b\u9332(XXXX\uff1a\u4f5c\u6210\u3057\u305f\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u540d, YYYY\uff1a\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3067\u547c\u3073\u51fa\u3059\u3068\u304d\u306e\u540d\u524d)<\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>protected $routeMiddleware = [ \r\n    'YYYY' =&gt; \\App\\Http\\Middleware\\XXXX::class,\r\n];<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p class=\"file_name\">\u2463\u300cweb.php\u300d\u306b\u4f5c\u6210\u3057\u305f\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u8a2d\u5b9a(XXXX\uff1a\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u540d\uff0cYYYY\uff1aURL\uff0cZZZZ\uff1a\u30d3\u30e5\u30fc\u3067\u306e\u540d\u524d)<\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>Route::middleware(['XXXX'])-&gt;group(function(){\r\n    Route::get('\/YYYY', function(){....})-&gt;name('ZZZZ'); \r\n});<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u30c6\u30fc\u30de \u3053\u3093\u306b\u3061\u306f\uff01naoto555\u3067\u3059\u3002 \u672c\u8a18\u4e8b\u3067\u306f\u3001Laravel\u3067\u30ed\u30b0\u30a4\u30f3\u524d\u5f8c\u306e\u753b\u9762\u9077\u79fb\u5148\u3092\u81ea\u7531\u306b\u8a2d\u5b9a\u3057\u3066\u307f\u308b\u65b9\u6cd5\u306b\u95a2\u3057\u3066\u8aac\u660e\u3057\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002 \u66f4\u306b\u5fdc\u7528\u3068\u3057\u3066\u3001\u7279\u5b9a\u306e\u30e6\u30fc\u30b6\u30fc\u306e\u307f\u5165\u308c\u308b\u30da\u30fc\u30b8\u3092\u4f5c\u3063\u3066\u307f\u308b\u65b9\u6cd5\u3082 [&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-1842","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\/1842","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=1842"}],"version-history":[{"count":72,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts\/1842\/revisions"}],"predecessor-version":[{"id":2189,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts\/1842\/revisions\/2189"}],"wp:attachment":[{"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}