Fix minor issue with redirect on SchoolController after edit
This commit is contained in:
parent
a9cb8ca584
commit
01fc9fc901
|
|
@ -97,8 +97,7 @@ class SchoolController extends Controller
|
||||||
'zip' => request('zip'),
|
'zip' => request('zip'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// TODO Handle redirect after updating school more elegantly
|
return redirect()->route('schools.show', $school->id)->with('success', 'School details updated');
|
||||||
return redirect('/schools/'.$school->id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function my_school()
|
public function my_school()
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,6 @@ Route::middleware(['auth', 'verified'])->controller(SchoolController::class)->gr
|
||||||
Route::get('/schools/create', 'create');
|
Route::get('/schools/create', 'create');
|
||||||
Route::post('/schools', 'store');
|
Route::post('/schools', 'store');
|
||||||
Route::get('/schools/{school}/edit', 'edit');
|
Route::get('/schools/{school}/edit', 'edit');
|
||||||
Route::get('/schools/{school}', 'show');
|
Route::get('/schools/{school}', 'show')->name('schools.show');
|
||||||
Route::patch('/schools/{school}', 'update');
|
Route::patch('/schools/{school}', 'update');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue