質問編集履歴

1

web.phpのコード内容を追加

2022/06/03 23:35

投稿

technical_mory
technical_mory

スコア32

test CHANGED
File without changes
test CHANGED
@@ -138,3 +138,36 @@
138
138
  </div>
139
139
  ```
140
140
 
141
+ web.php(質問内容の追加箇所)
142
+ ```
143
+ <?php
144
+
145
+ use App\Http\Controllers\StepController;
146
+ use App\Http\Controllers\ManualController;
147
+ use Illuminate\Support\Facades\Route;
148
+
149
+ /*
150
+ |--------------------------------------------------------------------------
151
+ | Web Routes
152
+ |--------------------------------------------------------------------------
153
+ |
154
+ | Here is where you can register web routes for your application. These
155
+ | routes are loaded by the RouteServiceProvider within a group which
156
+ | contains the "web" middleware group. Now create something great!
157
+ |
158
+ */
159
+
160
+ Route::get('/', function () {
161
+ return view('welcome');
162
+ });
163
+
164
+ Route::get('/dashboard', function () {
165
+ return view('dashboard');
166
+ })->middleware(['auth'])->name('dashboard');
167
+
168
+ Route::resource('step', StepController::class);
169
+ Route::resource('manual', ManualController::class);
170
+ Route::post('step', [StepController::class, 'complete'])->name('step.complete');
171
+
172
+ require __DIR__.'/auth.php';
173
+ ```