Files
karudhaas/routes/api.php
2020-08-08 23:30:20 +05:00

30 lines
1.2 KiB
PHP

<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\ArticlesController;
use App\Http\Controllers\SourceController;
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('latest', \LatestArticles::class)->name('latest');
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');