Files
karudhaas/routes/api.php
2020-08-10 18:36:20 +05:00

29 lines
1.1 KiB
PHP

<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\ArticlesController;
use App\Http\Controllers\SourcesController;
use App\Http\Controllers\TopicsController;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::get('today', \TodaysPick::class)->name('today');
Route::get('recent', \RecentArticles::class)->name('recent');
Route::get('topics', [TopicsController::class, 'index'])->name('topics.index');
Route::get('topic/{topic:slug}', [TopicsController::class, 'show'])->name('topics.show');
Route::get('sources', [SourcesController::class, 'index'])->name('sources.index');
Route::get('source/{source:slug}',[SourcesController::class, 'show'])->name('sources.show');
Route::get('article/{article:id}', [ArticlesController::class, 'show'])->name('article.show');