artisan

Artisan::call() outside the Laravel framework

旧时模样 提交于 2019-12-12 07:19:01
问题 I want to create a cron job for Laravel 5.2 My shared host (on OVH), only allows me to point to the full path of a file, and I am not able to use the recommended Cron entry from Laravel's docs, ie : * * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1 Therefore, I have to call the Artisan command from a .php file, outside of the Laravel framework. Here is what my public/cron.php file looks like so far: <?php require __DIR__.'/../bootstrap/autoload.php'; use Illuminate\Support\Facades

Laravel - Pass arguments to php artisan down

旧街凉风 提交于 2019-12-12 04:53:01
问题 I've got an interesting problem I'd like to try and solve. Laravel has a built in "Maintenance Mode", which can be activated by calling php artisan down in the root folder of the application. There's a setting in app/start/global.php where you can assign the view or response it makes. In my application, I have it doing this: App::down(function() { // ETA Format: YYYY-MM-DD HH-MM-SS. Leave as "" to pass indeterminate time. return View::make("maintenance", array("code" => 503, "message" =>

Laravel locally run artisan commands effect VM environment

点点圈 提交于 2019-12-12 01:56:16
问题 I am looking for a solution that will allow me to run artisan commands from my local machine and for them to take effect on my homestead VM. For example, when running php artisan migrate the command is run using the information stored in the .env file points to the VM, but my terminal is trying to run them locally. The majority of the commands run successfully because they do not need drivers from the remote machine. Running php artisan route:list works fine. How can I run artisan commands

PHP Fatal Error on 'php artisan migrate' on remote AWS EB instance: laravel.log: Permission denied

只愿长相守 提交于 2019-12-11 17:27:28
问题 When I SSH into my AWS EB instance to run php artisan migrate , I get the following error message: Link to bigger size of picture below I am completely confused. First, I don't get this error on the local server. Second, what does a simple log file have to do with migrations anyway? They are ignored by git by default, so no log files are uploaded. Sigh... Any ideas on how I can be allowed to run my php artisan migrate ? 回答1: It's always the storage folder. Blank pages or permission denied, it

PHP can not perform soap call from laravel command

不打扰是莪最后的温柔 提交于 2019-12-11 17:19:05
问题 I have made a Laravel command that I try to run with a cronjob every minute. In the command there is some logic that does a soap call. When I run the command through a route that I created everything works fine. like this: Route::get('test-command', function() { Artisan::call('updateRegisterLogs'); }); Now when I try to do the same thing in my command on the server like this: php artisan updateRegisterLogs I get the following error: Class 'SoapClient' not found Now I searched on the internet

Running artisan queue:work with additional arguments

天大地大妈咪最大 提交于 2019-12-11 13:30:36
问题 I am trying to run queued jobs, and pass additional parameters through the command line. My use case is this: I have 4 running queue:work processes through supervisor. The jobs in my queue all require access to a proxy server, through which i can only have 4 processes running at any given time. When I start up a queued job, I have to find a process number (1 through 4) that is not currently being used, then run my command through that process. I have been using a database table to store the

laravel artisan commands colors not showing

ε祈祈猫儿з 提交于 2019-12-11 12:37:45
问题 When using laravel artisan commands, I don't get the expected color output. If you look at http://laravel.com/docs/4.2/commands , it says "To send output to the console, you may use the info, comment, question and error methods. Each of these methods will use the appropriate ANSI colors for their purpose." But using terminals mintty or cmd, I don't get those colors. For instance, $this->error('Something went wrong!'); should output the text with a red background. What is missing so that I get

How do I “fix” php artisan?

久未见 提交于 2019-12-11 11:56:37
问题 I'm using Laravel 5. Whenever I type php artisan tinker I get the expected output preceded by a letter c: cPsy Shell v0.5.2 (PHP 5.6.10-1+deb.sury.org~trusty+1 — cli) by Justin Hileman Same happens when I type php artisan The first line I get is the following: cLaravel Framework version 5.1.16 (LTS) Somehow that letter is displaying on all the views I have, so is messing up my project. When I click on "View Page Source" I see the letter 'c' before the " <!DOCTYPE html> " but I can't find it

Laravel 5.4 RuntimeException] Directory name must not be empty

有些话、适合烂在心里 提交于 2019-12-11 05:38:29
问题 I'm just learning Laravel 5 and I am loving it. I have an issue though, my php artisan command just stopped working all of a sudden. It shows this error [RuntimeException] Directory name must not be empty. I am running on a windows10 pc . Thanks 回答1: I think you need to update your composer like: composer update OR composer update --no-scripts after you can clear the cache php artisan config:cache php artisan config:clear php artisan cache:clear 来源: https://stackoverflow.com/questions

laravel : php artisan suddenly stop working

谁说我不能喝 提交于 2019-12-11 02:38:11
问题 I know that there bunch of questions out there but mine doesn't seems fit in any. I am working on laravel. php artisan was working fine an hour before. After that i just created a controller, a model and few views blade. Now artisan simply won't work and no error at all . Even php artisan --version won't show anything. I DIDN'T do any major changes like composer install, or update or install any new package. Neither any server configuration. It was just basic coding on controller , model and