$a = [1, 2, 3, 4, 5,6,7,8,9,];
function sum($var)
{
return $var + $var;
}
$b = array_map('sum', $a);
Route::get('/posts', [PostController::class, 'index'])->name('post.index');
Route::get('/posts/show/{id}', [PostController::class, 'show'])->name('post.show');
Route::post('/posts', [PostController::class, 'store'])->name('post.store');
Route::patch('/posts/update', [PostController::class, 'update'])->name('post.update');
Route::delete('/posts/{id}',[PostController::class, 'destroy'])->name('post.destroy');