Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hossam20520 opened this issue Mar 26, 2024 · 3 comments

Comments

@hossam20520
Copy link

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',

@adedejiibrahim7
Copy link

@hossam20520 I see you've closed this. How did you resolve this please

@hossam20520
Copy link
Author

@adedejiibrahim7
This error happens if you use "php artisan install:api --passport " multiple times
To resolve this issue just go to bootstrap\app.php and remove the duplicated line
api: DIR.'/../routes/api.php',

@Mustafa-Kadir
Copy link

@adedejiibrahim7 This error happens if you use "php artisan install:api --passport " multiple times To resolve this issue just go to bootstrap\app.php and remove the duplicated line api: DIR.'/../routes/api.php',

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants