1

Hello guys I'm trying to run the make controller command but it throwing me an error. Here is the error

[ErrorException]                                                             
  Use of undefined constant CURLE_COULDNT_RESOLVE_HOST - assumed 'CURLE_COULD  
  NT_RESOLVE_HOST'

and here is the command that I'm trying to run

php artisan make controller PetsController --resource

I have googled this issue what I got were solution for php Amazon sdk. Please tell me why am I facing this issue

4
  • 1
    Use : in command, like php artisan make:controller PetsController --resource Commented Sep 8, 2016 at 9:02
  • Is it solved??? Commented Sep 8, 2016 at 9:04
  • Are you running your website through Vagrant or similar? Make sure you run your php artisan commands in the context of your server. That is, if you're using vagrant, SSH into your server first using vagrant ssh and then run your commands. Also, you're missing : between make and controller, it should be php artisan make:controller PetsController --resource Commented Sep 8, 2016 at 9:48
  • @HirenGohel Sorry for the late reply. but I have also tried the code that you suggested but that is not working also Commented Sep 8, 2016 at 9:49

2 Answers 2

3

if you are using Linux version, try to use

sudo php artisan make:controller PetsController --resource

In windows, run CMD as Administrator.then execute

php artisan make:controller PetsController --resource

And make sure you are not having any errors in your route.php

Sign up to request clarification or add additional context in comments.

5 Comments

@Garden , I think you should try this, this seems to be more perfect
Sorry for the late reply. But this is also not working and @Nil I have trued this this is not working also
I keep getting the same error. Can't understand why am I getting this error
are you running laravel server?
no I'm not running a laravel server. I running my project in homestead/laravel
-1

Try this to fix :

php artisan controller:make YourController

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.