20 lines
637 B
PHP
20 lines
637 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::get('/', function () {
|
|
return view('welcome');
|
|
});
|
|
|
|
use App\Http\Controllers\Api\ArticleController;
|
|
|
|
Route::get('articles', [ArticleController::class, 'index']);
|
|
Route::get('/', function () {
|
|
$articles = (new ArticleController())->index();
|
|
return view('welcome', ['articles' => $articles]);
|
|
});
|
|
// Route::post('articles', [ArticleController::class, 'store']);
|
|
// Route::get('articles/{id}', [ArticleController::class, 'show']);
|
|
// Route::put('articles/{id}', [ArticleController::class, 'update']);
|
|
// Route::delete('articles/{id}', [ArticleController::class, 'destroy']);
|