Commit eefe64ec authored by Trung Lê Đình's avatar Trung Lê Đình

thay doi method cho ajax request

parent 5f2daa6d
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
Route::middleware(['auth'])->group(function() { Route::middleware(['auth'])->group(function() {
Route::resource('posts', PostController::class); Route::resource('posts', PostController::class);
Route::prefix('posts')->name('posts.')->group(function() { Route::prefix('posts')->name('posts.')->group(function() {
Route::post('ajax', [PostController::class, 'ajax'])->name('ajax'); Route::get('ajax', [PostController::class, 'ajax'])->name('ajax');
}); });
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home'); Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment