1
votes

php artisan make:controller StudViewController --resource --model=studView

And the answer is

Controller already exists!

I've tried

  1. php artisan config:clear

  2. php artisan cache:clear

  3. composer dump-autoload

    Any help guys ? thanks in advance

2

2 Answers

1
votes

That means controller with the name StudViewController in Http/Controllers folder already exists. Double check if there really exists controller with this name.

0
votes

Try running the command,

composer update –no-scripts

and then create the controller. It worked in exactly the same situation vis-a-vis displayed "Controller already exists!" but actually not available in the the workspace Controllers folder.