swooletw / laravel-swoole

High performance HTTP server based on Swoole. Speed up your Laravel or Lumen applications.
MIT License
4.05k stars 390 forks source link

PHP Fatal error for Laravel Nova #222

Closed phoenixg closed 5 years ago

phoenixg commented 5 years ago
  1. Please provide your PHP and Swoole version. (php -v and php --ri swoole)

swoole: v4.2 php: 7.2.7

  1. Please provide your Laravel/Lumen version.

laravel: v5.7.26 Nova: 1.3.2

  1. Which release version of this package are you using?

latest laravel-swoole, ig. v2.6.4

  1. What did you do? If possible, provide a recipe for reproducing the error.
→ php artisan swoole:http start
Starting swoole http server...
Swoole http server started: <http://127.0.0.1:1215>
  1. What did you expect to see?

Successfully running via laravel-swoole http artisan command

  1. What did you see instead?
PHP Fatal error:  Cannot declare class App\Nova\Metrics\EarnedAmountPerDay, because the name is already in use in /Users/pig/mine/projects/php/pig-nova/app/Nova/Metrics/PayOrder/EarnedAmountPerDay.php on line 62
albertcht commented 5 years ago

Please read Issues Guideline before you open an issue.

sahilkumar00 commented 3 years ago

@phoenixg to override this issue do these changes in composer.json -in the classmap array enter the folder

"classmap": [
            "database/seeds",
            "database/factories",
            "app/pathnametofolder"

        ]

-then composer composer dump-autoload