Skip to content

Commit

Permalink
feat: create base post controller for api package
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Jul 13, 2024
1 parent 8d73205 commit 9d7c9f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
5 changes: 3 additions & 2 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
parameters:
ignoreErrors:
- message: '#Class .+ not found#'

- message: '#Parameter \#1 \$prefix of static method Illuminate\\Support\\Facades\\Route::prefix\(\) expects string, mixed given\.#'
path: routes/blog-api.php

- message: '#Part \$routePrefix \(mixed\) of encapsed string cannot be cast to string\.#'
path: routes/blog-api.php

excludePaths:
- src/Http/Controllers/Base/BasePostController.php
9 changes: 9 additions & 0 deletions src/Http/Controllers/Base/BasePostController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace CSlant\BlogApi\Http\Controllers\Base;

use Botble\Blog\Http\Controllers\API\PostController as BotblePostController;

class BasePostController extends BotblePostController
{
}
2 changes: 1 addition & 1 deletion src/Http/Controllers/PostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace CSlant\BlogApi\Http\Controllers;

use Botble\Blog\Http\Controllers\API\PostController as BasePostController;
use CSlant\BlogApi\Http\Controllers\Base\BasePostController;

class PostController extends BasePostController
{
Expand Down

0 comments on commit 9d7c9f5

Please sign in to comment.