{"id":2971,"date":"2026-08-10T15:45:06","date_gmt":"2026-08-10T06:45:06","guid":{"rendered":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/?page_id=2971"},"modified":"2026-09-24T13:37:16","modified_gmt":"2026-09-24T04:37:16","slug":"laravel-06","status":"publish","type":"page","link":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/programming\/php\/laravel-06","title":{"rendered":"\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c"},"content":{"rendered":"<details>\n  <summary>\n    \u524d\u56de\u7d42\u4e86\u6642\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\n  <\/summary>\n  <p>Laravel\u3092\u4f7f\u3063\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n<div class='console'><pre>\n$ git clone https:\/\/kiku3.tsbio.info\/git\/study-laravel.git study_laravel\n<\/pre><\/div>\n\n<p>\u3053\u306e\u7ae0\u958b\u59cb\u6642\u70b9\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f chapt6 \u30d6\u30e9\u30f3\u30c1\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<div class='console'><pre>\n$ git switch chapt6\n<\/pre><\/div>\n\n<p>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u81ea\u5206\u3067\u66f8\u3044\u3066\u3044\u304f\u5834\u5408\u306f\u3001\u81ea\u5206\u7528\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u3064\u304f\u308b\u3068\u3088\u3044\u3067\u3059\u3002<\/p>\n<div class='console'><pre>\n$ git switch -c my6 chapt6\n<\/pre><\/div>\n\n<p>Laravel\u306e\u30b3\u30fc\u30c9\u306fsrc\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304b\u3089\u306e\u76f8\u5bfe\u30d1\u30b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n<h3>\u30a8\u30e9\u30fc\u3078\u306e\u5bfe\u51e6<\/h3>\n<ul>\n  <li>\n    <h4>Laravel\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u306a\u3044<\/h4>\n    <p>composer install \u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u958b\u767a\u6bb5\u968e\u306b\u5fdc\u3058\u3066\u4e0d\u8db3\u3059\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u3042\u308b\u3068\u304d\u306f\u3001\u518d\u5ea6 composer install \u304c\u5fc5\u8981\u306a\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n  <\/li>\n  <li>\n    <h4>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u304c\u6b63\u3057\u304f\u306a\u3044<\/h4>\n    <p>tempnam()\u304c\u5b9f\u884c\u3067\u304d\u306a\u3044\u306a\u3069\u306e\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u3068\u304d\u306f\u3001storage\u3068bootstrap\/cache\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u6240\u6709\u8005\u3068\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044(\u7b2c1\u7ae0\u3092\u53c2\u7167)<\/p>\n  <\/li>\n  <li>\n    <h4>Vite manifest not found <\/h4>\n    <p>\u958b\u767a\u4e2d\u306a\u3089 npm run dev\u3001\u672c\u756a\u74b0\u5883\u306a\u3089 npm run build\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n  <\/li>\n  <li>\n    <h4>npm run dev\u304c\u52d5\u304b\u306a\u3044<\/h4>\n    <p>npm install \u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n  <\/li>\n<\/ul>\n<\/details>\n\n\n<h2>\u8a8d\u8a3c\u306b\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h2>\n<p>\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c\u306b\u4f7f\u3046Laravel Breeze\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u7279\u306b\u8ffd\u52a0\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3082\u306e\u3067\u306f\u306a\u304f\u3001\u30eb\u30fc\u30c8\u306a\u3069\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n\u3053\u308c\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3001\u6b21\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u4e0a\u66f8\u304d\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u30b3\u30d4\u30fc\u3092\u3064\u304f\u3063\u3066\u304a\u304d\u307e\u3059\u3002(web.php\u306f\u306a\u3044\u3068\u30a8\u30e9\u30fc\u304c\u3067\u308b)<\/p>\n<ul>\n<li>app.css -&gt; lab.css<\/li>\n<li>app.js -&gt; lab.css<\/li>\n<li>app.blade.php -&gt; lab.blade.php<\/li>\n<li>web.php -&gt; oligo.php<\/li>\n<\/ul>\n<div class='console'><pre>\n# composer require laravel\/breeze --dev\n# artisan breeze:install blade\n<\/pre><\/div>\n<h3>breeze\u306b\u5909\u66f4\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u4fee\u6b63<\/h3>\n<p>resources\/views\/layouts\/app.blade.php \u3092 breeze.blade.php\u306b\u5909\u66f4\u3057\u307e\u3059\u3002\u3064\u3044\u3067\u3001app\/View\/Components\/AppLayout.php\n\u306e <code>return view('layouts.app');<\/code> \u3092 <code>return view('layouts.blade');<\/code> \u306b\u4fee\u6b63\u3057\u307e\u3059\u3002lab.blade.php\u3092app.blade.php\u306b\u623b\u3057\u307e\u3059\u3002<\/p>\n<p><\/p>\n<div class='code'>\n  <h5 class=\"source-file\">app\/View\/Components\/AppLayout.php<\/h5>\n<pre >\n&lt;?php\n \nnamespace App\\View\\Components;\n \nuse Illuminate\\View\\Component;\nuse Illuminate\\View\\View;\n \nclass AppLayout extends Component\n{\n    \/**\n     * Get the view \/ contents that represents the component.\n     *\/\n    public function render(): View\n    {\n        return view(&#039;layouts.breeze&#039;); \/\/ layouts\/app.blade.php\u306f\u81ea\u5206\u7528\u306b\n    }\n}\n<\/pre>\n<\/div>\n<p><\/p>\n<div class='code'>\n  <h5 class=\"source-file\">resources\/css\/app.css<\/h5>\n<pre >\n@import &#039;tailwindcss&#039;;\n \n@source &#039;..\/..\/vendor\/laravel\/framework\/src\/Illuminate\/Pagination\/resources\/views\/*.blade.php&#039;;\n@source &#039;..\/..\/storage\/framework\/views\/*.php&#039;;\n \n@theme {\n    --font-sans: &#039;Instrument Sans&#039;, ui-sans-serif, system-ui, sans-serif, &#039;Apple Color Emoji&#039;, &#039;Segoe UI Emoji&#039;,\n        &#039;Segoe UI Symbol&#039;, &#039;Noto Color Emoji&#039;;\n}\n \n@import &#039;lab.css&#039;;\n@import &#039;oligo.css&#039;;\n<\/pre>\n<\/div>\n<p><\/p>\n<div class='code'>\n  <h5 class=\"source-file\">resources\/css\/lab.css<\/h5>\n<pre >\n.module-tab {\n    @apply\n        border border-black \/* \u67a0\u7dda\u306e\u8a2d\u5b9a *\/\n        first:rounded-l  \/* first: \u306b\u3088\u3063\u3066\u3001\u6700\u521d\u306e\u8981\u7d20\u306b\u9650\u5b9a\u3059\u308b\u3002\u5de6\u5074(-l)\u306e\u307f\u4e38\u3081\u308b(rounded)\u3002 *\/\n        last:rounded-r  \/* \u540c\u69d8\u306b\u6700\u5f8c\u306e\u67a0\u7dda\u306e\u53f3\u5074(-r)\u3092\u4e38\u3081\u308b\u3002 *\/\n        font-sans font-bold \n        px-6 bg-white  \/* \u6587\u5b57\u306e\u5de6\u53f3\u306e\u4f59\u767d(padding x)\u30926px\u3001\u80cc\u666f\u8272\u3092\u767d\u306b\u8a2d\u5b9a *\/\n        hover:bg-blue-500 hover:text-white \/* \u30db\u30d0\u30fc\u6642\u306e\u80cc\u666f\u8272\u3092\u9752\u3001\u6587\u5b57\u8272\u3092\u767d\u306b\u8a2d\u5b9a *\/\n    ;\n}\n \n.feature-tabs {\n    @apply flex;\n}\n.feature-tab {\n    @apply border-t border-x border-black rounded-t-md mx-1 px-6 font-sans font-bold;\n}\n \n.features {\n    @apply bg-white p-2 min-h-screen;\n}\n \nbutton {\n    @apply border-2 py-[0.05em] px-2 rounded shadow-sm shadow-gray-400;\n}\nbutton:active {\n    @apply shadow-none translate-y-[0.05em] translate-x-[0.05em];\n}\n \ninput[type=checkbox] {\n    @apply w-4 h-4;\n}\n<\/pre>\n<\/div>\n<p>lab.js\u306f\u305d\u306e\u307e\u307eapp.js\u306b\u623b\u3059<\/p>\n<h2>\u30e6\u30fc\u30b6\u30fc\u306e\u767b\u9332<\/h2>\n<p>\/register\u3092\u4f7f\u3063\u305f\u30e6\u30fc\u30b6\u30fc\u306e\u767b\u9332\u306fLaravel\u304b\u3089\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u3001\u4eca\u56de\u306f\u30d1\u30b9\u3002<\/p>\n<p>\u4ee3\u308f\u308a\u306b\u3001Model\/User\u304b\u3089\u76f4\u63a5\u767b\u9332\u3059\u308b\u3002<\/p>\n<div class='console'><pre>\n# .\/artisan tinker\n> $user = User::create(['name' => 'test user', 'email' => 'test@example.com', 'password' => 'secret'])\n> exit\n<\/pre><\/div>\n<p>\u3053\u308c\u3067\/login\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<h3>\u30ed\u30b0\u30a4\u30f3\u306e\u3057\u304f\u307f<\/h3>\n<p>routes\/web.php\u3092\u898b\u3066\u307f\u308b\u3068\u6b21\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002\n<\/p>\n<div class='code'>\n  <h5 class=\"source-file\">routes\/web.php<\/h5>\n<pre >\n&lt;?php\n \nuse App\\Http\\Controllers\\ProfileController;\nuse Illuminate\\Support\\Facades\\Route;\n \nRoute::get(&#039;\/&#039;, function () {\n    return view(&#039;welcome&#039;);\n});\n \nRoute::get(&#039;\/dashboard&#039;, function () {\n    return view(&#039;dashboard&#039;);\n})-&gt;middleware([&#039;auth&#039;, &#039;verified&#039;])-&gt;name(&#039;dashboard&#039;);\n \nRoute::middleware(&#039;auth&#039;)-&gt;group(function () {\n    Route::get(&#039;\/profile&#039;, [ProfileController::class, &#039;edit&#039;])-&gt;name(&#039;profile.edit&#039;);\n    Route::patch(&#039;\/profile&#039;, [ProfileController::class, &#039;update&#039;])-&gt;name(&#039;profile.update&#039;);\n    Route::delete(&#039;\/profile&#039;, [ProfileController::class, &#039;destroy&#039;])-&gt;name(&#039;profile.destroy&#039;);\n});\n \nrequire __DIR__.&#039;\/auth.php&#039;;\n<\/pre>\n<\/div>\n<p><\/p>\n<div class='code'>\n  <h5 class=\"source-file\">routes\/auth.php<\/h5>\n<pre >\n&lt;?php\n \nuse App\\Http\\Controllers\\Auth\\AuthenticatedSessionController;\nuse App\\Http\\Controllers\\Auth\\ConfirmablePasswordController;\nuse App\\Http\\Controllers\\Auth\\EmailVerificationNotificationController;\nuse App\\Http\\Controllers\\Auth\\EmailVerificationPromptController;\nuse App\\Http\\Controllers\\Auth\\NewPasswordController;\nuse App\\Http\\Controllers\\Auth\\PasswordController;\nuse App\\Http\\Controllers\\Auth\\PasswordResetLinkController;\nuse App\\Http\\Controllers\\Auth\\RegisteredUserController;\nuse App\\Http\\Controllers\\Auth\\VerifyEmailController;\nuse Illuminate\\Support\\Facades\\Route;\n \nRoute::middleware(&#039;guest&#039;)-&gt;group(function () {\n    Route::get(&#039;register&#039;, [RegisteredUserController::class, &#039;create&#039;])\n        -&gt;name(&#039;register&#039;);\n \n    Route::post(&#039;register&#039;, [RegisteredUserController::class, &#039;store&#039;]);\n \n    Route::get(&#039;login&#039;, [AuthenticatedSessionController::class, &#039;create&#039;])\n        -&gt;name(&#039;login&#039;);\n \n    Route::post(&#039;login&#039;, [AuthenticatedSessionController::class, &#039;store&#039;]);\n \n    Route::get(&#039;forgot-password&#039;, [PasswordResetLinkController::class, &#039;create&#039;])\n        -&gt;name(&#039;password.request&#039;);\n \n    Route::post(&#039;forgot-password&#039;, [PasswordResetLinkController::class, &#039;store&#039;])\n        -&gt;name(&#039;password.email&#039;);\n \n    Route::get(&#039;reset-password\/{token}&#039;, [NewPasswordController::class, &#039;create&#039;])\n        -&gt;name(&#039;password.reset&#039;);\n \n    Route::post(&#039;reset-password&#039;, [NewPasswordController::class, &#039;store&#039;])\n        -&gt;name(&#039;password.store&#039;);\n});\n \nRoute::middleware(&#039;auth&#039;)-&gt;group(function () {\n    Route::get(&#039;verify-email&#039;, EmailVerificationPromptController::class)\n        -&gt;name(&#039;verification.notice&#039;);\n \n    Route::get(&#039;verify-email\/{id}\/{hash}&#039;, VerifyEmailController::class)\n        -&gt;middleware([&#039;signed&#039;, &#039;throttle:6,1&#039;])\n        -&gt;name(&#039;verification.verify&#039;);\n \n    Route::post(&#039;email\/verification-notification&#039;, [EmailVerificationNotificationController::class, &#039;store&#039;])\n        -&gt;middleware(&#039;throttle:6,1&#039;)\n        -&gt;name(&#039;verification.send&#039;);\n \n    Route::get(&#039;confirm-password&#039;, [ConfirmablePasswordController::class, &#039;show&#039;])\n        -&gt;name(&#039;password.confirm&#039;);\n \n    Route::post(&#039;confirm-password&#039;, [ConfirmablePasswordController::class, &#039;store&#039;]);\n \n    Route::put(&#039;password&#039;, [PasswordController::class, &#039;update&#039;])-&gt;name(&#039;password.update&#039;);\n \n    Route::post(&#039;logout&#039;, [AuthenticatedSessionController::class, &#039;destroy&#039;])\n        -&gt;name(&#039;logout&#039;);\n});\n<\/pre>\n<\/div>\n<p>\/login \u306f <code>routes\/auth.php<\/code> \u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u3002\u3053\u3053\u3067<\/p>\n<div class='code'>\n  <pre >\nRoute::middleware(&#039;guest&#039;)-&gt;group(function () {\n  Route::get(&#039;login&#039;, [AuthenticatedSessionController::class, &#039;create&#039;])\n    -&gt;name(&#039;login&#039;);\n});\n<\/pre>\n<\/div>\n\u3068\u306a\u3063\u3066\u3044\u308b\u3002middleware(&#8216;guest&#8217;)\u3068\u3059\u308b\u3053\u3068\u3067\u3001\/login\u306b\u5230\u9054\u3067\u304d\u308b\u306e\u306fguest (\u8a8d\u8a3c\u3055\u308c\u3066\u3044\u306a\u3044)\u306b\u9650\u3089\u308c\u308b\u3002\n<p>login\u306e\u60c5\u5831\u306f <code>app\/Http\/Controllers\/Auth\/AuthenticatedSessionController.php<\/code> \u306b\u9001\u3089\u308c\u308b\u3002\u3053\u306e\u4e2d\u306e store \u30e1\u30bd\u30c3\u30c9\u4e2d\u3067\u3001 LoginRequest $response-&gt;authenticate() \u304c\u8a8d\u8a3c\u3092\u884c\u3063\u3066\u3044\u308b\u3002<\/p>\n<p>\u3055\u3089\u306b\u4e2d\u8eab\u3092\u307f\u3066\u3044\u304f\u3068\n<code>src\/app\/Http\/Requests\/Auth\/LoginRequest.php<\/code> \u3067\u3001Auth::attempt($this-&gt;only(&#8216;email&#8217;, &#8216;password&#8217;) \u3068\u3044\u3046\u51e6\u7406\u304c\u3042\u308a\u3001\u3053\u3053\u3067\u8a8d\u8a3c\u304c\u884c\u308f\u308c\u308b\u3002<\/p>\n<p>\u30d2\u30f3\u30c8: \u30ed\u30b0\u30a4\u30f3\u306bemail\u3067\u306f\u306a\u304fname\u3092\u4f7f\u3044\u305f\u3044\u3068\u304d\u306f\u3001LoginRequest\u306erules\u3067name\u3092\u8a2d\u5b9a\u3057\u3001attempt\u3067\u305d\u308c\u3092\u6e21\u3059\u3088\u3046\u306b\u3059\u308b\u3002\u30e6\u30fc\u30b6\u30fc\u306bID\u3092\u8a2d\u5b9a\u3057\u305f\u3044\u3068\u304d\u306f\u3001migration\/create_users_table.php\u3092\u66f8\u304d\u63db\u3048\u3066\u3001users\u306buid\u306a\u3069\u306e\u30ab\u30e9\u30e0\u3092\u8ffd\u52a0\u3057\u3001\u305d\u308c\u3092LoginRequest\u3067\u53d7\u3051\u53d6\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<h2>\u8a8d\u8a3c\u6e08\u307f\u30e6\u30fc\u30b6\u30fc\u306b\u9650\u5b9a\u3059\u308b<\/h2>\n<p>\/oligo\u3078\u306e\u30a2\u30af\u30bb\u30b9\u306b\u8a8d\u8a3c\u3092\u5fc5\u8981\u3068\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u3059\u308b\u3002<\/p>\n<p><\/p>\n<div class='code'>\n  <h5 class=\"source-file\">routes\/oligo.php<\/h5>\n<pre >\n&lt;?php\n \nuse Illuminate\\Support\\Facades\\Route;\nuse App\\Http\\Controllers\\OligoController;\n \n\/\/ \u30aa\u30ea\u30b4DNA\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\nRoute::middleware([&#039;auth&#039;, &#039;verified&#039;]) \/\/ \n    \/* auth\u3068verified\u3068\u3044\u3046\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u901a\u904e\u3059\u308b\u3053\u3068\u3092\u8981\u6c42\n     * \u3053\u308c\u3089\u306e\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306f vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/ \u306b\u5b58\u5728\u3059\u308b\u3002\n     * auth -&gt; Authenticate.php\n     * verified -&gt; EnsureEmailIsVerified.php\n     *\/\n    -&gt;prefix(&#039;oligo&#039;)\n    -&gt;as(&#039;web.oligo.&#039;)\n    -&gt;group(function (){\n        Route::get(&#039;\/&#039;, [OligoController::class, &#039;index&#039;])-&gt;name(&#039;index&#039;);\n        Route::get(&#039;search&#039;, [OligoController::class, &#039;search&#039;])-&gt;name(&#039;search&#039;);\n        Route::get(&#039;create&#039;, [OligoController::class, &#039;create&#039;])-&gt;name(&#039;create&#039;);\n        Route::post(&#039;\/&#039;, [OligoController::class, &#039;store&#039;])-&gt;name(&#039;store&#039;);\n \n        \/\/ \u7de8\u96c6\u30d5\u30a9\u30fc\u30e0\u3068\u30c7\u30fc\u30bf\u66f4\u65b0\n        Route::get(&#039;edit&#039;, [OligoController::class, &#039;edit&#039;])-&gt;name(&#039;edit&#039;);\n        Route::put(&#039;\/{item}&#039;, [OligoController::class, &#039;update&#039;])-&gt;name(&#039;update&#039;);\n    });\n<\/pre>\n<\/div>\n<p>\u3053\u308c\u3092web.php\u3067\u8aad\u307f\u8fbc\u3080\u3088\u3046\u306b\u3059\u308b<\/p>\n<p><\/p>\n<div class='code'>\n  <h5 class=\"source-file\">routes\/web.php<\/h5>\n<pre >\n&lt;?php\n \nuse App\\Http\\Controllers\\ProfileController;\nuse Illuminate\\Support\\Facades\\Route;\n \nRoute::get(&#039;\/&#039;, function () {\n    return view(&#039;welcome&#039;);\n});\n \nRoute::get(&#039;\/dashboard&#039;, function () {\n    return view(&#039;dashboard&#039;);\n})-&gt;middleware([&#039;auth&#039;, &#039;verified&#039;])-&gt;name(&#039;dashboard&#039;);\n \nRoute::middleware(&#039;auth&#039;)-&gt;group(function () {\n    Route::get(&#039;\/profile&#039;, [ProfileController::class, &#039;edit&#039;])-&gt;name(&#039;profile.edit&#039;);\n    Route::patch(&#039;\/profile&#039;, [ProfileController::class, &#039;update&#039;])-&gt;name(&#039;profile.update&#039;);\n    Route::delete(&#039;\/profile&#039;, [ProfileController::class, &#039;destroy&#039;])-&gt;name(&#039;profile.destroy&#039;);\n});\n \nrequire __DIR__.&#039;\/auth.php&#039;;\nrequire __DIR__.&#039;\/oligo.php&#039;;\n<\/pre>\n<\/div>\n<p>\u8ab0\u304c\u627f\u8a8d\u3055\u308c\u3066\u3044\u308b\u306e\u304b\u308f\u304b\u308b\u3088\u3046\u306b\u30d8\u30c3\u30c0\u30fc\u90e8\u5206\u306b\u3044\u308c\u308b\u3002\u3064\u3044\u3067\u306b\u30ed\u30b0\u30a2\u30a6\u30c8\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<p><\/p>\n<div class='code'>\n  <h5 class=\"source-file\">resources\/views\/layouts\/app.blade.php<\/h5>\n<pre >\n@extends(&#039;layouts.html&#039;)\n \n@section(&#039;body&#039;)\n  &lt;header class=&#039;bg-blue-500 text-white py-2 px-2 flex justify-between items-start&#039;&gt;\n    &lt;h1 class=&#039;text-xl leading-none&#039;&gt;{{ config(&#039;app.name&#039;) }}&lt;\/h1&gt;\n    &lt;div class=&quot;flex items-baseline&quot;&gt;\n      @auth  {{-- @if(auth()-&gt;check()) \u3068\u540c\u3058\u3067\u3001\u8a8d\u8a3c\u6e08\u307f\u306e\u5834\u5408\u3060\u3051 @endauth \u307e\u3067\u304c\u8868\u793a\u3055\u308c\u308b\u3002 --}}\n        {{-- auth() \u3067\u8a8d\u8a3c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3059\u308b\u3002 -&gt;user() \u3067\u8a8d\u8a3c\u3055\u308c\u305f\u30e6\u30fc\u30b6\u30fc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3057\u3001\u305d\u306e name \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u53d6\u5f97\u3059\u308b --}}\n        &lt;span class=&#039;px-2 text-sm&#039;&gt;{{ auth()-&gt;user()-&gt;name }}&lt;\/span&gt;\n        &lt;form method=&quot;POST&quot; action=&quot;{{ route(&#039;logout&#039;) }}&quot; class=&quot;inline&quot;&gt;\n          @csrf\n          &lt;button type=&quot;submit&quot; class=&quot;text-sm text-black bg-gray-200 border-gray-400 px-2 hover:bg-gray-400 hover:text-white&quot;&gt;\n            \u30ed\u30b0\u30a2\u30a6\u30c8\n          &lt;\/button&gt;\n        &lt;\/form&gt;\n      @endauth\n \n      @guest  {{-- @if(! auth()-&gt;check()) \u3068\u540c\u3058\u3002 --}}\n        &lt;span class=&#039;px-2 text-sm&#039;&gt;\u30b2\u30b9\u30c8&lt;\/span&gt;\n        &lt;form method=&quot;GET&quot; action=&quot;{{ route(&#039;login&#039;) }}&quot; class=&quot;inline&quot;&gt;\n          &lt;button type=&quot;submit&quot; class=&quot;text-sm text-black bg-gray-200 border-gray-400 px-2 hover:bg-gray-400 hover:text-white&quot;&gt;\n            \u30ed\u30b0\u30a4\u30f3\n          &lt;\/button&gt;\n        &lt;\/form&gt;\n      @endguest\n    &lt;\/div&gt;\n  &lt;\/header&gt;\n \n  &lt;nav class=&#039;bg-yellow-100 py-2 px-2&#039;&gt;\n    &lt;ul id=&#039;module-tabs&#039; class=&#039;flex&#039;&gt;  {{-- \u30bf\u30d6\u304c\u6a2a\u4e26\u3073\u306b\u306a\u308b\u3088\u3046\u306bflex\u3092\u8ffd\u52a0 --}}\n      &lt;li class=&#039;module-tab&#039;&gt;&lt;a id=&#039;oligo-tab&#039; href=&#039;\/oligo&#039;&gt;\u30aa\u30ea\u30b4DNA&lt;\/a&gt;&lt;\/li&gt;\n      {{-- \u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u8907\u6570\u4e26\u3093\u3060\u3068\u304d\u306e\u69d8\u5b50\u304c\u308f\u304b\u308b\u3088\u3046\u306b\u30c0\u30df\u30fc\u3092\u8ffd\u52a0 --}}\n      &lt;li class=&#039;module-tab&#039;&gt;&lt;a id=&#039;dummy1-tab&#039; href=&#039;\/dummy1&#039;&gt;\u30c0\u30df\u30fc1&lt;\/a&gt;&lt;\/li&gt;\n      &lt;li class=&#039;module-tab&#039;&gt;&lt;a id=&#039;dummy2-tab&#039; href=&#039;\/dummy2&#039;&gt;\u30c0\u30df\u30fc2&lt;\/a&gt;&lt;\/li&gt;\n      &lt;li class=&#039;module-tab&#039;&gt;&lt;a id=&#039;dummy3-tab&#039; href=&#039;\/dummy3&#039;&gt;\u30c0\u30df\u30fc3&lt;\/a&gt;&lt;\/li&gt;\n    &lt;\/ul&gt;\n  &lt;\/nav&gt;\n \n  &lt;main id=&#039;modules&#039; class=&#039;bg-yellow-100 px-2 min-h-screen&#039;&gt;\n    @yield(&#039;module&#039;)\n  &lt;\/main&gt;\n@endsection\n<\/pre>\n<\/div>\n<p>\/login\u3092\u76f4\u63a5URL\u306b\u6307\u5b9a\u3057\u305f\u3068\u304d\u3001\u30ed\u30b0\u30a4\u30f3\u5f8c\u306b\/dashboard\u3078\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306fapp\/Http\/Controllers\/Auth\/AuthenticatedSessionController.php\u306b\u8a2d\u5b9a\u304c\u3042\u308a\u3001\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u5148\u3092\u5909\u66f4\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30ac\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a\u7bc4\u56f2\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u30ac\u30fc\u30c9(guard: \u5b88\u885b\u3001\u9580\u756a\u306e\u610f)\u306f\u8a8d\u8a3c\u65b9\u6cd5\u306b\u3088\u3063\u3066\u30e6\u30fc\u30b6\u30fc\u3092\u533a\u5225\u3059\u308b\u4ed5\u7d44\u307f\u3067\u3059\u3002\n\u3053\u3053\u3067\u306f\u30ed\u30b0\u30a4\u30f3\u306eURL\u3092\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u7528(\/login)\u3068\u7ba1\u7406\u8005\u7528(\/admin\/login)\u306b\u5206\u3051\u3066\u3001\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u30da\u30fc\u30b8\u3092\u5206\u3051\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u4eca\u306e\u3068\u3053\u308d\u8a8d\u8a3c\u304c\u540c\u3058\u306a\u306e\u3067\u3001\u30ed\u30b0\u30a4\u30f3URL\u3092\u77e5\u3063\u3066\u3044\u308c\u3070\u8ab0\u3067\u3082\u30ac\u30fc\u30c9\u3092\u901a\u904e\u3067\u304d\u307e\u3059\u3002\n\u5c06\u6765\u7684\u306b\u306fLDAP\u8a8d\u8a3c\u3068\u304b\u3001\u5185\u90e8\u5229\u7528\u8005\u7528\u306e\u30e6\u30fc\u30b6\u30fc\u30c6\u30fc\u30d6\u30eb\u3092\u7528\u610f\u3059\u308b\u3068\u304b\u3057\u3066\u3001\u30e6\u30fc\u30b6\u30fc\u3092\u5206\u96e2\u3059\u308b\u3088\u3046\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30ac\u30fc\u30c9\u3092\u8ffd\u52a0\u3059\u308b<\/h3>\n<p><code>config\/auth.php<\/code>\u306b\u65b0\u3057\u3044\u30ac\u30fc\u30c9 (admin) \u3092\u52a0\u3048\u307e\u3059\u3002<\/p>\n<div class='code'>\n  <pre >\n&#039;guards&#039; =&gt; [\n    &#039;web&#039; =&gt; [\n        &#039;driver&#039; =&gt; &#039;session&#039;,\n        &#039;provider&#039; =&gt; &#039;users&#039;,\n    ],\n    &#039;admin&#039; =&gt; [                \/\/ \u30ac\u30fc\u30c9\u306e\u540d\u524d\n        &#039;driver&#039; =&gt; &#039;session&#039;,  \/\/ web\u3068\u540c\u3058\u304f\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u4f7f\u3046\n        &#039;provider&#039; =&gt; &#039;users&#039;,  \/\/ web\u3068\u540c\u3058\u304fusers\u30c6\u30fc\u30d6\u30eb(User\u30e2\u30c7\u30eb)\u3092\u4f7f\u3046\n    ],\n],\n<\/pre>\n<\/div>\n<h3>\u65b0\u3057\u3044\u30ac\u30fc\u30c9\u3092\u4f7f\u3046\u30da\u30fc\u30b8(\u30eb\u30fc\u30c8)\u3092\u3064\u304f\u308b<\/h3>\n<h4>\u30eb\u30fc\u30c8\u306e\u8a2d\u5b9a<\/h4>\n<p>admin\u30ac\u30fc\u30c9\u3092\u4f7f\u3046\u305f\u3081\u306b\u5fc5\u8981\u306a\u4ee5\u4e0b\u306e\u30eb\u30fc\u30c8\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>\/admin\/login \u3067\u30ed\u30b0\u30a4\u30f3\u7528\u306e\u30d5\u30a9\u30fc\u30e0\u3092\u8868\u793a<\/li>\n<li>\/admin \u306badmin\u5c02\u7528\u30da\u30fc\u30b8\u3092\u8868\u793a<\/li>\n<li>POST \/admin\/logout \u3067\u30ed\u30b0\u30a2\u30a6\u30c8<\/li>\n<\/ul>\n<p><\/p>\n<div class='code'>\n  <h5 class=\"source-file\">routes\/admin.php<\/h5>\n<pre >\n&lt;?php\n \nuse App\\Http\\Controllers\\Auth\\AdminSessionController as Controller;\nuse Illuminate\\Support\\Facades\\Route;\n \nRoute::prefix(&#039;admin&#039;)  \/\/ \u3053\u306e\u540d\u524d\u306f\u5225\u306b\u30ac\u30fc\u30c9\u540d\u3068\u306f\u95a2\u4fc2\u306a\u3044\n    -&gt;as(&#039;admin.&#039;)\n    -&gt;group(function () {\n        Route::middleware(&#039;guest:admin&#039;)  \/\/ \u30df\u30c9\u30eb\u30a6\u30a7\u30a2guest\u306badmin\u30ac\u30fc\u30c9\u306b\u3088\u308b\u8a8d\u8a3c\u3092\u4f7f\u308f\u305b\u308b\n            -&gt;group(function ()\n            {\n                Route::get(&#039;login&#039;, [Controller::class, &#039;create&#039;])\n                    -&gt;name(&#039;login&#039;);\n \n                Route::post(&#039;login&#039;, [Controller::class, &#039;store&#039;]);\n            });\n \n        Route::middleware(&#039;auth:admin&#039;)  \/\/ \u30df\u30c9\u30eb\u30a6\u30a7\u30a2auth\u306badmin\u30ac\u30fc\u30c9\u306b\u3088\u308b\u8a8d\u8a3c\u3092\u4f7f\u308f\u305b\u308b\n            -&gt;group(function ()\n            {\n                Route::post(&#039;logout&#039;, [Controller::class, &#039;destroy&#039;])\n                -&gt;name(&#039;logout&#039;);\n \n                Route::get(&#039;\/&#039;, function (){\n                    return view(&#039;layouts.app&#039;); \/\/ \u3068\u308a\u3042\u3048\u305a\u4e2d\u8eab\u306e\u306a\u3044\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u8868\u793a\u3055\u305b\u308b\u3002\n                })-&gt;name(&#039;index&#039;);\n            });\n    });\n<\/pre>\n<\/div>\n<p>\u3053\u308c\u3092 routes\/web.php \u3067require\u3057\u307e\u3059\u3002<\/p>\n<h4>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u4f5c\u6210<\/h4>\n<p>\u7d9a\u3044\u3066\u5bfe\u5fdc\u3059\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc <code>app\/Http\/Controllers\/Auth\/AdminSessionController.php<\/code> \u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n(app\/Http\/Controllers\/Auth\/AuthenticatedSessionController.php \u3092\u5143\u306b\u4f5c\u6210)<\/p>\n<div class='code'>\n  <h5 class=\"source-file\">app\/Http\/Controllers\/Auth\/AdminSessionController.php<\/h5>\n<pre >\n&lt;?php\n \nnamespace App\\Http\\Controllers\\Auth;\n \nuse App\\Http\\Controllers\\Controller;\nuse App\\Http\\Requests\\Auth\\LoginRequest;\nuse Illuminate\\Http\\RedirectResponse;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Facades\\Auth;\nuse Illuminate\\View\\View;\n \nclass AdminSessionController extends Controller\n{\n    \/**\n     * Display the login view.\n     *\/\n    public function create(): View\n    {\n        return view(&#039;auth.login&#039;, [&#039;guard&#039; =&gt; &#039;admin&#039;]); \/\/ \u4fee\u6b63\u3002\u4eca\u306e\u3068\u3053\u308d$guard\u306f\u30d3\u30e5\u30fc\u3067\u4f7f\u7528\u3057\u3066\u3044\u306a\u3044\n    }\n \n    \/**\n     * Handle an incoming authentication request.\n     *\/\n    public function store(LoginRequest $request): RedirectResponse\n    {\n        $request-&gt;authenticate(&#039;admin&#039;);  \/\/ \u4fee\u6b63\n \n        $request-&gt;session()-&gt;regenerate();\n \n        return redirect()-&gt;intended(route(&#039;admin.index&#039;, absolute: false)); \/\/ \u3053\u308c\u306f\u4eca\u5f8c\u306e\u691c\u8a0e\n    }\n \n    \/**\n     * Destroy an authenticated session.\n     *\/\n    public function destroy(Request $request): RedirectResponse\n    {\n        Auth::guard(&#039;admin&#039;)-&gt;logout();\n \n        # $request-&gt;session()-&gt;invalidate(); \/\/ \u4ed6\u306e\u30ac\u30fc\u30c9\u306e\u30ed\u30b0\u30a4\u30f3\u3082\u6d88\u3048\u3066\u3057\u307e\u3046\u306e\u3067\u524a\u9664\n \n        $request-&gt;session()-&gt;regenerateToken();\n \n        return redirect(&#039;admin.login&#039;);  \/\/ \u4fee\u6b63\n    }\n}\n<\/pre>\n<\/div>\n<h4>\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u4f5c\u6210<\/h4>\n<p><code>src\/app\/Http\/Requests\/Auth\/LoginRequest.php<\/code> \u3092\u4fee\u6b63\u3057\u3066\u3001\u30ac\u30fc\u30c9\u3092\u8a2d\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<div class='code'>\n  <pre >\n--- a\/src\/app\/Http\/Requests\/Auth\/LoginRequest.php\n+++ b\/src\/app\/Http\/Requests\/Auth\/LoginRequest.php\n@@ -38,11 +38,13 @@ public function rules(): array\n      *\n      * @throws ValidationException\n      *\/\n -    public function authenticate(): void\n +    public function authenticate(string $guard = &#039;web&#039;): void \/\/ \u5f15\u6570\u3092\u3064\u304f\u308b\n     {\n         $this-&gt;ensureIsNotRateLimited();\n\n -        if (! Auth::attempt($this-&gt;only(&#039;email&#039;, &#039;password&#039;), $this-&gt;boolean(&#039;remember&#039;))) {\n +        if (! Auth::guard($guard)  \/\/ \u8a8d\u8a3c\u306b\u4f7f\u7528\u3059\u308b\u30ac\u30fc\u30c9\u3092\u6307\u5b9a\u3059\u308b\n +            -&gt;attempt($this-&gt;only(&#039;email&#039;, &#039;password&#039;), $this-&gt;boolean(&#039;remember&#039;))\n +        ) {\n             RateLimiter::hit($this-&gt;throttleKey());\n\n             throw ValidationException::withMessages([\n<\/pre>\n<\/div>\n<h4>\u30d3\u30e5\u30fc\u306e\u4f5c\u6210<\/h4>\n<p><code>resources\/views\/auth\/login.blade.php<\/code> \u3092\u4fee\u6b63\u3057\u3066\u3001\u8a8d\u8a3c\u60c5\u5831\u306e\u9001\u308a\u5148\u3092 \/admin\/login \u306b\u3059\u308b\u3002<\/p>\n<div class='code'>\n  <pre >\n--- a\/src\/resources\/views\/auth\/login.blade.php\n+++ b\/src\/resources\/views\/auth\/login.blade.php\n@@ -2,7 +2,7 @@\n     &lt;!-- Session Status --&gt;\n     &lt;x-auth-session-status class=&quot;mb-4&quot; :status=&quot;session(&#039;status&#039;)&quot; \/&gt;\n \n-    &lt;form method=&quot;POST&quot; action=&quot;{{ route(&#039;login&#039;) }}&quot;&gt;\n+    &lt;form method=&quot;POST&quot; action=&quot;{{ route( $guard ?? null == &#039;admin&#039; ? &#039;admin.login&#039; : &#039;login&#039;) }}&quot;&gt;\n         @csrf\n \n         &lt;!-- Email Address --&gt;\n<\/pre>\n<\/div>\n<p><code>resources\/views\/layouts\/app.blade.php<\/code> \u3092\u4fee\u6b63\u3057\u3066\u3001admin\u30ac\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u308f\u304b\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<div class='code'>\n  <pre >\n--- a\/src\/resources\/views\/layouts\/app.blade.php\n+++ b\/src\/resources\/views\/layouts\/app.blade.php\n@@ -1,7 +1,15 @@\n @extends(&#039;layouts.html&#039;)\n \n @section(&#039;body&#039;)\n-  &lt;header class=&#039;bg-blue-500 text-white py-2 px-2 flex justify-between items-start&#039;&gt;\n+  @php\n+    if(auth(&#039;admin&#039;)-&gt;check()){\n+      $color = &#039;bg-rose-500&#039;;\n+    }else{\n+      $color = &#039;bg-blue-500&#039;;\n+    }\n+  @endphp\n+\n+  &lt;header class=&#039;{{ $color }} text-white py-2 px-2 flex justify-between items-start&#039;&gt;\n     &lt;h1 class=&#039;text-xl leading-none&#039;&gt;{{ config(&#039;app.name&#039;) }}&lt;\/h1&gt;\n     &lt;div class=&quot;flex items-baseline&quot;&gt;\n       @auth  {{-- @if(auth()-&gt;check()) \u3068\u540c\u3058\u3067\u3001\u8a8d\u8a3c\u6e08\u307f\u306e\u5834\u5408\u3060\u3051 @endauth \u307e\u3067\u304c\u8868\u793a\u3055\u308c\u308b\u3002 --}}\n<\/pre>\n<\/div>\n<h2>\u958b\u767a\u7528\u306e\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3<\/h2>\n<p>\u8a8d\u8a3c\u6a5f\u80fd\u3092\u3044\u308c\u3066\u3057\u307e\u3046\u3068\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u958b\u767a\u30fb\u52d5\u4f5c\u78ba\u8a8d\u304c\u9762\u5012\u306b\u306a\u308a\u307e\u3059\u3002\n\u305d\u3053\u3067\u3001\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u306e\u6a5f\u80fd\u3092\u4f5c\u308a\u307e\u3057\u305f\u3002\n\u5f53\u7136\u3067\u3059\u304c\u3001\u672c\u756a\u74b0\u5883\u3067\u306f\u7121\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li>.env\u306eAPP_ENV\u3092test\u304bproduction\u306b\u3059\u308b\u3002<\/li>\n<li>routes\u3067auto.login\u306e\u5f15\u6570\u3092\u7a7a\u306b\u3059\u308b(\u30e6\u30fc\u30b6\u30fc\u540d\u304cnull\u306b\u306a\u3063\u3066\u3001\u8a8d\u8a3c\u3092\u3068\u3070\u3055\u308c\u308b)<\/li>\n<li>DevAutoLogin\u306ereturn $next($request); \u3092\u6700\u521d\u306b\u6301\u3063\u3066\u304f\u308b\u3002<\/li>\n<\/ul>\n<p><\/p>\n<div class='code'>\n  <h5 class=\"source-file\">app\/Http\/Middleware\/DevAutoLogin.php<\/h5>\n<pre >\n&lt;?php\n \nnamespace App\\Http\\Middleware;\n \nuse Closure;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Facades\\Auth;\n \n\/*\n * \u7279\u5b9a\u30e6\u30fc\u30b6\u30fc\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u30c6\u30b9\u30c8\u3059\u308b\n *\/\nclass DevAutoLogin\n{\n    public function handle(Request $request, Closure $next, ?string $name = null, ?string $guard = &#039;web&#039;)\n    {\n        if(app()-&gt;environment(&#039;local&#039;) &amp;&amp; Auth::guard($guard)-&gt;guest()){\n            if($name){\n                $user = \\App\\Models\\User::where(&#039;name&#039;, $name)-&gt;first();\n                if ($user) {\n                    logger(sprintf(&quot;%s at %d: name = &#039;%s&#039; guard = &#039;%s&#039;&quot;, __CLASS__, __LINE__, $name, $guard));\n                    Auth::guard($guard)-&gt;login($user);\n                }\n            }\n        }\n \n        return $next($request);\n    }\n}\n<\/pre>\n<\/div>\n<p>\u4f5c\u6210\u3057\u305f\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li>auto.login\u3068\u3044\u3046\u540d\u524d\u3092\u3064\u3051\u308b\u3002\u3053\u308c\u3092\u3057\u306a\u3044\u5834\u5408\u306f\u3001\u30eb\u30fc\u30c8\u306b\u9577\u3044\u30af\u30e9\u30b9\u540d\u3092\u3044\u308c\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<li>\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u512a\u5148\u9806\u4f4d(priority)\u3092\u8a2d\u5b9a\u3059\u308b\u3002\u3053\u308c\u3092\u3057\u306a\u3044\u3068\u3001Authenticate\u304c\u5fc5\u305a\u5148\u306b\u5b9f\u884c\u3055\u308c\u3066\u3057\u307e\u3046\u3002<\/li>\n<\/ol>\n<p><\/p>\n<div class='code'>\n  <h5 class=\"source-file\">bootstrap\/app.php<\/h5>\n<pre >\n&lt;?php\n \nuse Illuminate\\Foundation\\Application;\nuse Illuminate\\Foundation\\Configuration\\Exceptions;\nuse Illuminate\\Foundation\\Configuration\\Middleware;\nuse Illuminate\\Http\\Request;\n \nreturn Application::configure(basePath: dirname(__DIR__))\n    -&gt;withRouting(\n        web: __DIR__.&#039;\/..\/routes\/web.php&#039;,\n        commands: __DIR__.&#039;\/..\/routes\/console.php&#039;,\n        health: &#039;\/up&#039;,\n    )\n    -&gt;withMiddleware(function (Middleware $middleware): void {\n        \/\/ \u30eb\u30fc\u30c8\u3067\u30af\u30e9\u30b9\u540d\u3092\u7c21\u5358\u306b\u66f8\u304f\u305f\u3081\u306e\u8a2d\u5b9a\n        $middleware-&gt;alias([\n            &#039;auto.login&#039; =&gt; \\App\\Http\\Middleware\\DevAutoLogin::class,\n        ]);\n \n        \/* \u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u5b9f\u884c\u9806\u306f vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php \u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u3002\n         * DevAutoLogin\u3092Authenticate\u306e\u524d\u306b\u6301\u3063\u3066\u3053\u306a\u3044\u3068\u610f\u5473\u304c\u306a\u3044\u3002\n         *\/\n        $middleware-&gt;priority([\n            \\App\\Http\\Middleware\\DevAutoLogin::class,\n            \\Illuminate\\Auth\\Middleware\\Authenticate::class,\n            \\Illuminate\\Auth\\Middleware\\EnsureEmailIsVerified::class\n        ]);\n    })\n    -&gt;withExceptions(function (Exceptions $exceptions): void {\n        $exceptions-&gt;shouldRenderJsonWhen(\n            fn (Request $request) =&gt; $request-&gt;is(&#039;api\/*&#039;) || $request-&gt;expectsJson(),\n        );\n    })-&gt;create();\n<\/pre>\n<\/div>\n<p>middleware\u306bauto.login\u3092\u8ffd\u52a0\u3057\u305f\u3002\n\u30c6\u30b9\u30c8\u7528\u306e\u30e6\u30fc\u30b6\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<div class='code'>\n  <h5 class=\"source-file\">routes\/oligo.php<\/h5>\n<pre >\n&lt;?php\n \nuse Illuminate\\Support\\Facades\\Route;\nuse App\\Http\\Controllers\\OligoController;\n \n\/\/ \u30aa\u30ea\u30b4DNA\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\nRoute::middleware([&#039;auth&#039;, &#039;verified&#039;, &#039;auto.login:test user&#039;])\n    \/\/ auto.login\u3068\u3044\u3046\u540d\u524d\u306f DevAutoLogin \u306e\u5225\u540d\u3068\u3057\u3066 bootstrap\/app.php \u3067\u8a2d\u5b9a\u3057\u3066\u3042\u308b\u3002\n    -&gt;prefix(&#039;oligo&#039;)\n    -&gt;as(&#039;web.oligo.&#039;)\n    -&gt;group(function (){\n        Route::get(&#039;\/&#039;, [OligoController::class, &#039;index&#039;])-&gt;name(&#039;index&#039;);\n        Route::get(&#039;search&#039;, [OligoController::class, &#039;search&#039;])-&gt;name(&#039;search&#039;);\n        Route::get(&#039;create&#039;, [OligoController::class, &#039;create&#039;])-&gt;name(&#039;create&#039;);\n        Route::post(&#039;\/&#039;, [OligoController::class, &#039;store&#039;])-&gt;name(&#039;store&#039;);\n \n        \/\/ \u7de8\u96c6\u30d5\u30a9\u30fc\u30e0\u3068\u30c7\u30fc\u30bf\u66f4\u65b0\n        Route::get(&#039;edit&#039;, [OligoController::class, &#039;edit&#039;])-&gt;name(&#039;edit&#039;);\n        Route::put(&#039;\/{item}&#039;, [OligoController::class, &#039;update&#039;])-&gt;name(&#039;update&#039;);\n    });\n<\/pre>\n<\/div>\n<h2>\u30e6\u30fc\u30b6\u30fc\u306e\u4e00\u89a7\u3001\u8ffd\u52a0\u3001\u7de8\u96c6\u3001\u524a\u9664<\/h2>\n<p><strong>\u4ee5\u4e0b\u306f\u7b2c7\u7ae0\u3001\u7b2c8\u7ae0\u306e\u5f8c\u306b\u66f8\u3044\u3066\u3044\u307e\u3059\u3002<\/strong><\/p>\n<h3>\u30eb\u30fc\u30c8\u306e\u8a2d\u5b9a<\/h3>\n<p><code>routes\/user.php<\/code> \u306b\u30e6\u30fc\u30b6\u30fc\u8a2d\u5b9a\u3067\u4f7f\u7528\u3059\u308b\u30eb\u30fc\u30c8\u3092\u66f8\u304d\u307e\u3059\u3002<\/p>\n<div class='code'>\n  <h5 class=\"source-file\">routes\/user.php<\/h5>\n<pre >\n&lt;?php\n \nuse Illuminate\\Support\\Facades\\Route;\nuse App\\Http\\Controllers\\UserController as Controller;\n \n\/\/ \u30e6\u30fc\u30b6\u30fc\u7ba1\u7406\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\n$module = &#039;user&#039;;\nRoute::prefix($module)\n    -&gt;middleware([&quot;can:$module.read&quot;])\n    -&gt;as(&quot;$module.&quot;)\n    -&gt;group(function (){\n        Route::get(&#039;\/&#039;, [Controller::class, &#039;index&#039;])-&gt;name(&#039;index&#039;);\n \n        \/\/ \u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a\u306e\u305f\u3081\u306e\u30d5\u30a9\u30fc\u30e0\n        foreach([&#039;search&#039;, &#039;create&#039;, &#039;edit&#039;, &#039;password&#039;] as $name){\n            Route::get($name, [Controller::class, $name])-&gt;name($name);\n        }\n \n        \/\/ \u7de8\u96c6\u30d5\u30a9\u30fc\u30e0\u3068\u30c7\u30fc\u30bf\u66f4\u65b0\n        Route::post(&#039;\/&#039;, [Controller::class, &#039;store&#039;])-&gt;name(&#039;store&#039;);\n        Route::post(&#039;password&#039;, [Controller::class, &#039;issuePasswordResetUrl&#039;])-&gt;name(&#039;password.issue&#039;);\n        Route::put(&#039;\/{item}&#039;, [Controller::class, &#039;update&#039;])-&gt;name(&#039;update&#039;);\n    });\n<\/pre>\n<\/div>\n<p>\u4f5c\u6210\u3057\u305f\u3082\u306e\u3092<code>routes\/admin.php<\/code>\u3092\u901a\u3058\u3066\u8aad\u307f\u8fbc\u307e\u305b\u307e\u3059\u3002<\/p>\n<div class='code'>\n  <h5 class=\"source-file\">routes\/admin.php<\/h5>\n<pre >\n&lt;?php\n \nuse App\\Http\\Controllers\\Auth\\AdminSessionController as Controller;\nuse Illuminate\\Support\\Facades\\Route;\n \nRoute::prefix(&#039;admin&#039;)\n    -&gt;as(&#039;admin.&#039;)\n    -&gt;group(function () {\n        Route::middleware(&#039;guest:admin&#039;)\n            -&gt;group(function ()\n            {\n                Route::get(&#039;login&#039;, [Controller::class, &#039;create&#039;])\n                    -&gt;name(&#039;login&#039;);\n \n                Route::post(&#039;login&#039;, [Controller::class, &#039;store&#039;]);\n            });\n \n        Route::middleware([&#039;auth:admin&#039;, &#039;verified&#039;, &#039;auto.login:test admin,admin&#039;])\n            -&gt;group(function ()\n            {\n                require __DIR__.&#039;\/user.php&#039;;\n                Route::post(&#039;logout&#039;, [Controller::class, &#039;destroy&#039;])\n                -&gt;name(&#039;logout&#039;);\n \n                Route::get(&#039;\/&#039;, function (){\n                    return view(&#039;layouts.app&#039;);\n                })-&gt;name(&#039;index&#039;);\n            });\n    });\n<\/pre>\n<\/div>\n<h3>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u4f5c\u6210<\/h3>\n<p>MaterialController.php\u3092\u7d99\u627f\u3059\u308b\u3082\u306e\u304b\u3089\u9069\u5f53\u306b\u30b3\u30d4\u30fc\u3057\u3066\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<div class='code'>\n  <h5 class=\"source-file\">app\/Http\/Controllers\/UserController.php<\/h5>\n<pre >\n&lt;?php\n \nnamespace App\\Http\\Controllers;\n \nuse App\\Models\\User;\nuse App\\Services\\UserService;\nuse App\\Http\\Requests\\UserRequest;\nuse App\\Http\\Requests\\UserSearchRequest;\nuse App\\Http\\Requests\\UsersRequest;\nuse App\\Http\\Requests\\BulkItemIdsRequest;\nuse Illuminate\\Support\\Facades\\Password;\nuse Illuminate\\Foundation\\Http\\FormRequest;\n \nclass UserController extends MaterialController\n{\n    protected string $singleRequest = UserRequest::class;\n    protected string $multiRequest = UsersRequest::class;\n    protected string $queryRequest = UserSearchRequest::class;\n \n    public function __construct(\n        protected UserService $service,\n        protected User $model\n    ) {}\n \n    public function password(){\n        return $this-&gt;respond();\n    }\n \n    public function issuePasswordResetUrl(BulkItemIdsRequest $request){\n        $ids = $request-&gt;validated(&#039;id&#039;);\n        try{\n            return $this-&gt;service-&gt;issuePasswordResetUrl($ids);\n        }catch(\\Throwable $e){\n            return $this-&gt;json([&#039;message&#039; =&gt; $e-&gt;getMessage()], 400);\n        }\n    }\n}\n<\/pre>\n<\/div>\n<h3>\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u4f5c\u6210<\/h3>\n<p>8\u7ae0\u3067SeedRequest\u306a\u3069\u3092\u3064\u304f\u3063\u305f\u306e\u3068\u540c\u3058\u3002<\/p>\n<h3>\u30b5\u30fc\u30d3\u30b9\u306e\u4f5c\u6210<\/h3>\n<p>\u30e6\u30fc\u30b6\u30fc\u3092\u8ffd\u52a0\u3059\u308b\u3068\u304d\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u5fc5\u8981\u306b\u306a\u308b\u306e\u3067\u3001\u9069\u5f53\u306a\u30e9\u30f3\u30c0\u30e0\u306a\u6587\u5b57\u5217\u3092\u3064\u304f\u3063\u3066\u3044\u308c\u3066\u3044\u308b\u3002\n\u30e6\u30fc\u30b6\u30fc\u306b\u9023\u7d61\u3059\u308b\u3068\u304d\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u767a\u884c\u306e\u305f\u3081\u306eURL\u3092\u751f\u6210\u3057\u3001\u305d\u308c\u3092\u30e1\u30fc\u30eb\u3067\u9001\u308b\u306e\u304c\u3088\u3044\u3002<\/p>\n<div class='code'>\n  <h5 class=\"source-file\">app\/Services\/UserService.php<\/h5>\n<pre >\n&lt;?php\n \nnamespace App\\Services;\n \nuse App\\Models\\User;\nuse App\\TableDefinitions\\UserTableDefinition;\nuse App\\TableSearch\\SearchFactory;\nuse Illuminate\\Support\\Facades\\DB;\nuse Illuminate\\Support\\Str;\nuse Illuminate\\Support\\Facades\\Password;\n \nclass UserService extends MaterialService\n{\n    public function __construct(\n        protected User $model,\n        public UserTableDefinition $table,\n        protected SearchFactory $searchFactory\n    ){}\n \n    public function create(array $users)\n    {\n        $users = array_map(function ($user) {\n            $user[&#039;password&#039;] = Str::random(32);\n            return $user;\n        }, $users);\n        return parent::create($users);\n    }\n \n    public function issuePasswordResetUrl(array $user_ids){\n    \treturn [&#039;users&#039; =&gt; DB::transaction(function () use ($user_ids){\n            $users = [];\n            foreach($user_ids as $id){\n                $user = User::findOrFail($id);\n                $token = Password::broker()-&gt;createToken($user);\n                $user-&gt;url = route(&#039;password.reset&#039;, [\n                    &#039;token&#039; =&gt; $token,\n                    &#039;email&#039; =&gt; $user-&gt;email,\n                ]);\n                $users[] = $user;\n            }\n            return $users;\n        })];\n    }\n}\n<\/pre>\n<\/div>\n<h3>\u30d3\u30e5\u30fc\u306e\u4f5c\u6210<\/h3>\n<p>\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30bf\u30d6\u3067\u306f\u3053\u308c\u307e\u3067 <code>route('web.oligo.index')<\/code>\u306a\u3069\u3057\u3066\u3044\u305f\u3002\n\u3053\u3053\u306b <code>route('admin.user.index')<\/code> \u3092\u52a0\u3048\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u3054\u3068\u306b\u30ac\u30fc\u30c9\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u3002\n\u3069\u306e\u30ac\u30fc\u30c9\u3092\u901a\u308b\u306e\u304b\u306froutes\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u308c\u3068\u4e0d\u6574\u5408\u306b\u306a\u308b\u3053\u3068\u306f\u907f\u3051\u305f\u3044\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u540d\u3092\u542b\u3080\u30eb\u30fc\u30c8\u540d\u304b\u3089\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308b module_route\u95a2\u6570\u3092\u3064\u304f\u308b\u3002\n\u3053\u308c\u306f\u30d3\u30e5\u30fc\u4ee5\u5916\u3067\u3082\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001app\/helpers.php\u306b\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<div class='code'>\n  <h5 class=\"source-file\">app\/helpers.php<\/h5>\n<pre >\n&lt;?php\n \nuse Illuminate\\Support\\Facades\\Route;\n \nif(! function_exists(&#039;module_route&#039;)){\n    function module_route($module, $feature = &#039;index&#039;) {\n        static $routes;\n        if(is_null($routes)){\n            $routes = collect(Route::getRoutes())\n                -&gt;map(fn ($route) =&gt; $route-&gt;getName())\n                -&gt;filter()\n                -&gt;all();\n        }\n \n        $target = &quot;{$module}.{$feature}&quot;;\n \n        foreach($routes as $route){\n            if($route === $target || str_ends_with($route, &quot;.$target&quot;)){\n                return route($route);\n            }\n        }\n        return &#039;#&#039;;\n    }\n}\n<\/pre>\n<\/div>\n<p>\u3053\u308c\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u3001autoload\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3002\n<\/p>\n<div class='code'>\n  <h5 class=\"source-file\">composer.json<\/h5>\n<pre >\n&quot;autoload&quot;: {\n  &quot;psr-4&quot;: {\n    &quot;App\\\\&quot;: &quot;app\/&quot;,\n    &quot;Database\\\\Factories\\\\&quot;: &quot;database\/factories\/&quot;,\n    &quot;Database\\\\Seeders\\\\&quot;: &quot;database\/seeders\/&quot;\n  },\n  &quot;files&quot;:[            \/* autoload\u306bfiles\u3092\u8ffd\u52a0\u3059\u308b *\/\n    &quot;app\/helpers.php&quot;\n  ]\n},\n<\/pre>\n<\/div>\n<p>composer.json \u3092\u66f8\u304d\u63db\u3048\u305f\u3042\u3068\u306f composer dump-autoload\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<div class='console'><pre >\n# composer dump-autoload\nGenerating optimized autoload files\n&gt; Illuminate\\Foundation\\ComposerScripts::postAutoloadDump\n&gt; @php artisan package:discover --ansi\n(\u4ee5\u4e0b\u7701\u7565)\n<\/pre>\n<\/div>\n<p>\u3053\u308c\u307e\u3067route()\u3092\u4f7f\u3063\u3066\u3044\u305f\u3068\u3053\u308d\u3092module_route\u306b\u7f6e\u304d\u63db\u3048\u308b\u3002\u4e3b\u306a\u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3002<\/p>\n<ul>\n<li>components\/module-nav.blade.php<\/li>\n<li>layouts\/app.blade.php<\/li>\n<li>oligo,plant,seed\/module.blade.php<\/li>\n<li>components\/material\/edit.blade.php<\/li>\n<\/ul>\n<p><\/p>\n<div class='code'>\n  <h5 class=\"source-file\">resources\/views\/layouts\/app.blade.php<\/h5>\n<pre >\n@extends(&#039;layouts.html&#039;)\n \n@section(&#039;body&#039;)\n  @php\n    if(! isset($module_id)) $module_id = &#039;&#039;;\n  @endphp\n  &lt;header class=&#039;bg-blue-500 text-white py-2 px-2 flex justify-between items-start&#039;&gt;\n    &lt;h1 class=&#039;text-xl leading-none&#039;&gt;{{ config(&#039;app.name&#039;) }}&lt;\/h1&gt;\n    &lt;div class=&quot;flex items-baseline&quot;&gt;\n      @auth\n        &lt;span class=&#039;px-2 text-sm&#039;&gt;{{ auth()-&gt;user()-&gt;name }}&lt;\/span&gt;\n        &lt;form method=&quot;POST&quot; action=&quot;{{ route(&#039;logout&#039;) }}&quot; class=&quot;inline&quot;&gt;\n          @csrf\n          &lt;button type=&quot;submit&quot; class=&quot;text-sm text-black bg-gray-200 border-gray-400 px-2 hover:bg-gray-400 hover:text-white&quot;&gt;\n            {{ __(&#039;\u30ed\u30b0\u30a2\u30a6\u30c8&#039;) }}\n          &lt;\/button&gt;\n        &lt;\/form&gt;\n      @endauth\n      @guest\n        &lt;span class=&#039;px-2 text-sm&#039;&gt;\u30b2\u30b9\u30c8&lt;\/span&gt;\n        &lt;form method=&quot;GET&quot; action=&quot;{{ route(&#039;login&#039;) }}&quot; class=&quot;inline&quot;&gt;\n          &lt;button type=&quot;submit&quot; class=&quot;text-sm text-black bg-gray-200 border-gray-400 px-2 hover:bg-gray-400 hover:text-white&quot;&gt;\n            {{ __(&#039;\u30ed\u30b0\u30a4\u30f3&#039;) }}\n          &lt;\/button&gt;\n        &lt;\/form&gt;\n      @endguest\n    &lt;\/div&gt;\n  &lt;\/header&gt;\n \n  &lt;main id=&#039;modules&#039; class=&#039;bg-yellow-100 px-2 min-h-screen&#039;\n    x-data=&quot;{\n      activeModule: &#039;{{ $module_id }}&#039;,\n \n      \/* activeModule\u306e\u5024\u3092\u5909\u66f4\u3057\u3001\u305d\u306eHTML\u8981\u7d20\u304c\u306a\u3044\u3068\u304d\u306b\u53d6\u5f97\u3059\u308b *\/\n      selectModule(moduleId){\n        \/* \u30bf\u30d6\u306ehref\u5c5e\u6027\u304b\u3089url\u3092\u53d6\u5f97\u3059\u308b *\/\n        const tab = document.getElementById(`${moduleId}-tab`);\n        if(!tab) return;\n        const url = tab.href;\n \n        \/* URL\u3092\u5909\u66f4\u3059\u308b\u3002\u3053\u308c\u306b\u3088\u3063\u3066\u30d6\u30e9\u30a6\u30b6\u30fc\u306e\u30ea\u30ed\u30fc\u30c9\u3092\u3057\u3066\u3082\u3001\u4ee5\u524d\u306e\u30da\u30fc\u30b8\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b *\/\n        history.pushState({}, &#039;&#039;, url);\n \n        \/* activeModule\u306bid\u3092\u8a2d\u5b9a *\/\n        this.activeModule = moduleId;\n \n        return new Promise((resolve) =&gt; {\n          \/* id\u3067\u8981\u7d20\u3092\u53d6\u5f97 *\/\n          const panel = document.getElementById(moduleId);\n \n          \/* \u8981\u7d20\u3092\u53d6\u5f97\u3067\u304d\u305f\u3068\u304d\u306f resolve() \u3092\u547c\u3073\u51fa\u3059 -&gt; then\u306b\u9032\u3080 *\/\n          if(panel !== null) {\n            resolve();\n            return;\n          }\n \n          \/* \u8981\u7d20\u3092\u53d6\u5f97\u3067\u304d\u306a\u304b\u3063\u305f\u3068\u304d\u306bhtmx\u3067\u90e8\u5206HTML\u3092\u53d6\u5f97\u3059\u308b *\/\n          \n          \/\/ \u5947\u5999\u306b\u898b\u3048\u308b\u304c\u3053\u308c\u306fhander\u3068\u3044\u3046\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u3002handler\u306frevolve()\u3092\u3059\u308b\u3060\u3051\u3002\n          const handler = () =&gt; {console.log(&#039;handler was called&#039;); resolve()};\n          \n          \/\/ htmx\u306e\u7f6e\u304d\u63db\u3048\u304c\u7d42\u308f\u3063\u305f\u3089\u3001handler\u304c\u547c\u3070\u308c\u308b(=&gt; revolve()\u3092\u5b9f\u884c\u3059\u308b)\u3002\n          document.body.addEventListener(&#039;htmx:afterSettle&#039;, handler, { once: true });\n          \n          htmx.ajax(&#039;GET&#039;, url, {\n            target:&#039;main&#039;, \/* \u53d6\u5f97\u3057\u305fHTML\u306e\u7f6e\u304d\u63db\u3048\u5834\u6240 *\/\n            swap: &#039;beforeend&#039;,  \/* \u4eca\u56de\u306fdiv.features\u306e\u5b50\u8981\u7d20\u3068\u3057\u3066\u8ffd\u52a0\u3059\u308b\u306e\u3067beforeend *\/\n            headers: {\n              &#039;HX-Target&#039;: &#039;module-&#039; + moduleId,\n            }\n          });\n        })  \/\/ return new Promise\u306e\u7d42\u308f\u308a\n      } \/\/ selectModule\u306e\u7d42\u308f\u308a\n    }&quot;\n  &gt;\n    &lt;nav class=&#039;py-2 px-2&#039;&gt;\n      &lt;ul id=&#039;module-tabs&#039; class=&#039;flex&#039;&gt;\n        @foreach([\n          &#039;seed&#039; =&gt; [&#039;label&#039; =&gt; &#039;\u7a2e\u5b50&#039;, &#039;active&#039; =&gt; &#039;bg-seed&#039;, &#039;inactive&#039; =&gt; &#039;hover:bg-seed-light&#039;],\n          &#039;plant&#039; =&gt; [&#039;label&#039; =&gt; &#039;\u690d\u7269&#039;, &#039;active&#039; =&gt; &#039;bg-plant&#039;, &#039;inactive&#039; =&gt; &#039;hover:bg-plant-light&#039;],\n          &#039;oligo&#039; =&gt; [&#039;label&#039; =&gt; &#039;\u30aa\u30ea\u30b4DNA&#039;, &#039;active&#039; =&gt; &#039;bg-oligo&#039;, &#039;inactive&#039; =&gt; &#039;hover:bg-oligo-light&#039;],\n          &#039;user&#039; =&gt; [&#039;label&#039; =&gt; &#039;\u30e6\u30fc\u30b6\u30fc&#039;, &#039;active&#039; =&gt; &#039;bg-user&#039;, &#039;inactive&#039; =&gt; &#039;hover:bg-user-light&#039;],\n        ] as $module =&gt; $info)\n          @can(&quot;$module.read&quot;)\n            &lt;li class=&#039;module-tab&#039;\n              :class=&quot;{\n                &#039;{{ $info[&#039;active&#039;] }} text-white&#039;: activeModule === &#039;{{ $module }}&#039;,\n                &#039;{{ $info[&#039;inactive&#039;] }} bg-white text-gray-600&#039; : activeModule !== &#039;{{ $module }}&#039;\n              }&quot;\n            &gt;\n              &lt;a id=&#039;{{ $module }}-tab&#039; role=&#039;tab&#039;\n                href=&#039;{{ module_route($module) }}&#039;\n                @click.prevent=&quot;selectModule(&#039;{{ $module }}&#039;, event)&quot;\n              &gt;\n                {{ $info[&#039;label&#039;] }}\n              &lt;\/a&gt;\n            &lt;\/li&gt;\n          @endcan\n        @endforeach\n        &lt;li x-text=&quot;activeModule&quot; class=&#039;module-tab bg-gray-400&#039;&gt;&lt;\/li&gt;\n      &lt;\/ul&gt;\n    &lt;\/nav&gt;\n    @yield(&#039;module&#039;)\n  &lt;\/main&gt;\n@endsection\n<\/pre>\n<\/div>\n<p>resources\/views\/oligo \u3092 user\u306b\u30b3\u30d4\u30fc\u3057\u3066\u3001\u9069\u5b9c\u4fee\u6b63<\/p>\n<p>\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a\u7528URL\u3092\u751f\u6210\u3059\u308b\u30da\u30fc\u30b8\u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<p><\/p>\n<div class='code'>\n  <h5 class=\"source-file\">resources\/views\/user\/password.blade.php<\/h5>\n<pre >\n@extends(&#039;user.module&#039;)\n \n@section(&#039;feature&#039;)\n&lt;x-feature id=&#039;user-password&#039;\n  x-data=&quot;{\n    tokens: &#039;&#039;  \/\/ \u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u8a2d\u5b9a\u7528\u306eURL\u3002\u4e00\u756a\u4e0b\u306etextarea\u3067\u63d0\u793a\u3059\u308b\u3002\n  }&quot;\n&gt;\n \n  &lt;p x-show=&quot;!hasChecked&quot; class=&quot;pb-10 pl-4&quot;\n    @if(1) {{-- \u30c7\u30d0\u30c3\u30b0\u7528\u30b3\u30fc\u30c9 --}}\n      x-init=&quot;\n        query.name.value=&#039;test&#039;; \n        search().then(() =&gt; {\n          items.map(item =&gt; item.checked=true)\n        });\n      &quot;\n      x-text=&quot;&#039;Query: &#039; + JSON.stringify(query)&quot;\n    @endif\n  &gt;\n    &lt;a\n      href=&quot;{{ module_route($module_id) }}&quot;\n      @click.prevent=&quot;selectFeature(&#039;{{ &quot;${module_id}-index&quot; }}&#039;, event)&quot;\n    &gt;\n      \u5148\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a\u304c\u5fc5\u8981\u306a\u30e6\u30fc\u30b6\u30fc\u306b\u30c1\u30a7\u30c3\u30af\u3092\u3044\u308c\u3066\u304f\u3060\u3055\u3044\u3002\n    &lt;\/a&gt;\n  &lt;\/p&gt;\n \n  &lt;table class=&#039;material-list border-cyan-600 border-b-2 border-t-2 w-full my-2&#039;\n    x-show=&quot;hasChecked&quot;\n  &gt;\n    &lt;thead&gt;\n      &lt;tr&gt;\n        &lt;th class=&#039;w-4&#039;&gt;&lt;\/th&gt;\n        @foreach($table-&gt;columns(&#039;index&#039;) as $col)\n          &lt;x-material.table-th :column=$col \/&gt;\n        @endforeach\n      &lt;\/tr&gt;\n    &lt;\/thead&gt;\n \n    &lt;tbody&gt;\n      &lt;!-- \u691c\u7d22\u7d50\u679c --&gt;\n      &lt;template x-for=&quot;item in checkedItems&quot; :key=&quot;item.id&quot;&gt;\n        &lt;tr&gt;\n          &lt;td&gt;&lt;input x-model=&quot;item.checked&quot; type=&#039;checkbox&#039;&gt;&lt;\/td&gt;\n          @foreach($table-&gt;columns(&#039;index&#039;) as $key =&gt; $col)\n            &lt;td x-text=&quot;item.{{ $key }}&quot; class=&quot;{{ $col[&#039;class&#039;] }}&quot;&gt;&lt;\/td&gt;\n          @endforeach\n        &lt;\/tr&gt;\n      &lt;\/template&gt;\n    &lt;\/tbody&gt;\n  &lt;\/table&gt;\n  \n  &lt;p class=&quot;py-2 pl-4&quot;&gt;\n    &lt;button type=&quot;submit&quot; :disabled=&quot;checkedItems.length &lt;= 1&quot;\n      title=&#039;\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u8a2d\u5b9a\u306e\u305f\u3081\u306eURL\u3092\u767a\u884c\u3057\u307e\u3059&#039;\n \n      {{-- \u30c1\u30a7\u30c3\u30af\u306e\u5165\u3063\u305f\u30e6\u30fc\u30b6\u30fc\u306eid\u3092\u914d\u5217\u306b\u3057\u3066POST\u3059\u308b\u3002\n        -- \u30b5\u30fc\u30d0\u30fc\u5074\u3067\u306fBulkItemIdsRequest\u3067\u53d7\u3051\u53d6\u308b\u306e\u3067\u3001\u30ad\u30fc\u3092items\u306b\u3059\u308b\n        --}}\n      @click=&quot;api.post(&#039;{{ module_route($module_id, &quot;password.issue&quot;) }}&#039;,\n        {\n            items: checkedItems.map(item =&gt; item.id),\n        }\n      ).then((response) =&gt; {\n        {{-- \u53d7\u3051\u53d6\u3063\u305f\u30c7\u30fc\u30bf\u304b\u3089\u540d\u524d\u3001\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3001URL\u3092\u30bf\u30d6\u533a\u5207\u308a\u306e\u6587\u5b57\u5217\u306b\u3057\u3066\u3001\n          -- textarea (=tokens)\u306b\u5165\u308c\u308b\n          --}}\n        tokens = response.users.map(user =&gt; [user.name, user.email, user.url].join(&#039;\\t&#039;)).join(&#039;\\n&#039;);\n      })\n      &quot;\n    &gt;\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u8a2d\u5b9a&lt;\/button&gt;\n  &lt;\/p&gt;\n \n  &lt;textarea x-model=&quot;tokens&quot; class=&quot;border-1 w-full h-[10em]&quot;\n    x-show=&quot;tokens&quot;\n  &gt;\n  &lt;\/textarea&gt;\n&lt;\/x-feature&gt;\n@endsection\n<\/pre>\n<\/div>\n\n\n\n<div style='display: flex; justify-content: center; gap: 4rem;\n  background-color: #ffefd5;\n  '\n>\n  <a href='laravel-05'>\u524d\u3078<\/a>\n\n<a href='.\/'>PHP\u306e\u5b66\u7fd2 \u76ee\u6b21<\/a>\n\n  <a href='laravel-07'>\u6b21\u3078<\/a>\n<\/div>\n","protected":false},"excerpt":{"rendered":"\u524d\u56de\u7d42\u4e86\u6642\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9 Laravel\u3092\u4f7f\u3063\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 $ git clone https:\/\/kiku3.tsbio.info\/git\/st [&hellip;]","protected":false},"author":2,"featured_media":0,"parent":2658,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"page-programming.php","meta":{"footnotes":""},"class_list":["post-2971","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/pages\/2971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/comments?post=2971"}],"version-history":[{"count":67,"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/pages\/2971\/revisions"}],"predecessor-version":[{"id":3457,"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/pages\/2971\/revisions\/3457"}],"up":[{"embeddable":true,"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/pages\/2658"}],"wp:attachment":[{"href":"https:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/media?parent=2971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}