artisan

Cannot run artisan command in Laravel Homestead

廉价感情. 提交于 2020-01-06 07:28:47
问题 After setting up Homestead for 1 specific project only, I want to run the Artisan CLI for database migrations. I tried to follow this tutorial and I keep getting this error: Could not open input file: artisan I set up the project by running these commands (Windows): composer require laravel/homestead --dev vendor\\bin\\homestead make vagrant up And then I made sure to be in the root project directory and then run php artisan list , which gives the error above. I also tried to ssh into the

“php artisan key:generate” gives a “No application encryption key has been specified.” error

你。 提交于 2020-01-06 03:45:08
问题 I have a cloned laravel application but when I try to generate a APP_KEY via php artisan key:generate it gives me an error: In EncryptionServiceProvider.php line 42: No application encryption key has been specified. Which is obvious because that is exactly what I'm trying to create. Does anybody know how to debug this command? update: Kind of fixed it with this post laravel 4: key not being generated with artisan If I fill APP_KEY in my .env file php artisan key:generate works. But a newly

Lumen - Missing commands

安稳与你 提交于 2020-01-05 17:00:50
问题 I have a problem with running Lumen's Artisan. There are most of the commands missing. For an example if I write php artisan routes , I get following error: Command "routes" is not defined. Below is an example of output that I get by typing php artisan. Laravel Framework version Lumen (5.2.5) (Laravel Components 5.2.*) Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi

“SQLSTATE[HY000] [2002] No such file or directory” error when migrating table in Laravel

痞子三分冷 提交于 2020-01-01 19:47:07
问题 I am getting the following error when I try to migrate a table in Laravel 5 using the "php artisan migrate" command: 'SQLSTATE[HY000] [2002] No such file or directory' in . . . /vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:47 My .env file includes the default settings as follows: DB_HOST=localhost DB_DATABASE=homestead DB_USERNAME=homestead DB_PASSWORD=secret My database.php file lists mysql as the default database connection, homestead is listed as the database

Getting Undefined index: REQUEST_URI - When Run Artisan Commands in Laravel

最后都变了- 提交于 2019-12-30 10:57:11
问题 I keep getting the error below every time I try to run an artisan command on Laravel, I'm on the project directory. For example, I run this command: php artisan make:migration create_stats_table And I get this error: [ErrorException] Undefined index: REQUEST_URI No matter what command I run, I get the same error, even php artisan --version returns this error. How can I solve this problem? 回答1: Your code expects to have this index, but you're running PHP in CLI mode. REQUEST_URI variable of $

laravel cannot run scheduled command, while queue:listen run schedule() periodically

∥☆過路亽.° 提交于 2019-12-29 08:25:11
问题 Note: My question has nothing to do with Command schedule in Laravel which schedule not work. But in my question the scheduling works, but it cannot call the artisan command. I use laravel scheduling artisan command. I run the command directly from the console like this sudo -u www-data /var/www/market/artisan command:printer-serving 281H28 . I know it works because, I've Log::info('Working') at the entry of the handle() function of the command. While when I use laravel's scheduling. And the

Guzzle Cannot make GET request to the localhost (port: 80, 8000, 8080, etc )

时光怂恿深爱的人放手 提交于 2019-12-29 08:23:26
问题 Currently using Laravel 5.5 and Guzzle that comes together with the laravel installer. I am trying to make GET request (error occur with other HTTP requests as well) but don't seem work. This code does not work: public function callback(Request $request) { $code = $request->code; $client = new Client(['exceptions' => false]); try { $response = $client->request('GET', 'http://localhost/api/tests'); // $response = $http->request('POST', Config::get('app.url') . '/oauth/token', [ // 'form_params

Could not open input file: artisan

▼魔方 西西 提交于 2019-12-28 03:19:12
问题 When trying to create a new laravel project, The following error appears on the CLI: Could not open input file: artisan Script php artisan clear-compiled handling the post-install-cmd event returned with an error I am using the latest version of XAMPP v3.2.1 with PHP 5.5.15 and with mcrypt enabled (made sure of that by issuing the command php -m). And I am running windows 8.1 回答1: You need to first create Laravel project and if you already have one you need to go to this project dir using cd

Laravel migration can't create foreign key

人盡茶涼 提交于 2019-12-24 20:46:46
问题 I'm trying to create a foreign key, artisan does not show me any errors, just does not create my foreign key, it's probably my code: 1° table: Schema::create('cooperados', function (Blueprint $table) { $table->bigIncrements('id'); $table->timestamps(); $table->string('nameCoop', 255); $table->integer('numCoop'); $table->string('cpfCoop', 11); $table->date('dtCad'); $table->date('dtDem')->nullable(); $table->text('description')->nullable(); $table->decimal('subscritas', 6, 2); $table->decimal(

artisan - SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1'

馋奶兔 提交于 2019-12-24 13:46:24
问题 I ran the command: "php artisan migrate" and got the error message displayed below: [PDOException] SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (111) What's the problem and how do I fix it? 回答1: there could be following possibilities - you haven't set the right credentials for mysql access in your .env file which is located at the root of your application. Solution - Open .env file in your preferred editor and check if all the mysql access credentials are correct. its