Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PHP Fatal error: Uncaught Error: Named parameter $api overwrites previous argument #50769

Closed
@hossam20520

Description

@hossam20520

Laravel Version

11

PHP Version

8.2

Database Driver & Version

No response

Description

The error is shown when you try to use
php artisan serve

PHP Fatal error: Uncaught Error: Named parameter $api overwrites previous argument in D:\laravel_11\pos_system\bootstrap\app.php:11

Stack trace:
#0 D:\laravel_11\pos_system\artisan(12): require_once()
#1 {main}
thrown in D:\laravel_11\pos_system\bootstrap\app.php on line 11
This error happens if you used "php artisan install:api --passport " multiple times
To resolve this issues just go to bootstrap\app.php and remove duplicated line
api: DIR.'/../routes/api.php',

Steps To Reproduce

The error is shown when you try to use
php artisan serve

PHP Fatal error: Uncaught Error: Named parameter $api overwrites previous argument in D:\laravel_11\pos_system\bootstrap\app.php:11

Stack trace:
#0 D:\laravel_11\pos_system\artisan(12): require_once()
#1 {main}
thrown in D:\laravel_11\pos_system\bootstrap\app.php on line 11
This error happens if you used "php artisan install:api --passport " multiple times
To resolve this issues just go to bootstrap\app.php and remove duplicated line
api: DIR.'/../routes/api.php',

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions