Skip to content

Commit

Permalink
feat: add some post api
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Jul 12, 2024
1 parent 97b8ba8 commit 4ed078a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions routes/blog-api.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Botble\Blog\Http\Controllers\API\PostController;
use Illuminate\Support\Facades\Route;

/*
Expand All @@ -17,4 +18,16 @@

Route::prefix($routePrefix)->name("$routePrefix.")->middleware('api')->group(function () {
Route::get('/', fn() => response()->json(['message' => 'Welcome to Blog API']));

Route::get('search', [PostController::class, 'getSearch']);

Check failure on line 22 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.1

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 22 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.2

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 22 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.3

Class Botble\Blog\Http\Controllers\API\PostController not found.

Route::group(['prefix' => 'posts'], function () {
Route::get('/', [PostController::class, 'index']);

Check failure on line 25 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.1

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 25 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.2

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 25 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.3

Class Botble\Blog\Http\Controllers\API\PostController not found.
Route::get('filters', [PostController::class, 'getFilters']);

Check failure on line 26 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.1

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 26 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.2

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 26 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.3

Class Botble\Blog\Http\Controllers\API\PostController not found.
Route::get('{slug}', [PostController::class, 'findBySlug']);

Check failure on line 27 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.1

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 27 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.2

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 27 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.3

Class Botble\Blog\Http\Controllers\API\PostController not found.
});
Route::get('posts', [PostController::class, 'index']);

Check failure on line 29 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.1

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 29 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.2

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 29 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.3

Class Botble\Blog\Http\Controllers\API\PostController not found.

Route::get('posts/filters', [PostController::class, 'getFilters']);

Check failure on line 31 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.1

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 31 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.2

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 31 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.3

Class Botble\Blog\Http\Controllers\API\PostController not found.
Route::get('posts/{slug}', [PostController::class, 'findBySlug']);

Check failure on line 32 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.1

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 32 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.2

Class Botble\Blog\Http\Controllers\API\PostController not found.

Check failure on line 32 in routes/blog-api.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.3

Class Botble\Blog\Http\Controllers\API\PostController not found.
});

0 comments on commit 4ed078a

Please sign in to comment.