Category : command

I create new own command in laravel, which updates some rows in mysql (in this case minecraft servers): public function handle() { $serversList = [ ‘cubegame.pl’, ‘dermc.pl’, ‘feerko.pl’, ‘skyup.pl’, ‘mcosada.pl’, ‘dragon-craft.pl’, ‘gc2.pl’ ]; foreach ($serversList as $server) { $req = Http::get("https://api.mcsrvstat.us/2/$server"); if($req->ok()) { $status = $req->json(); echo( $status[‘motd’][‘html’][0] ); // $serv = Server::updateOrCreate( // [ ..

Read more

When I run below command. I take this error. How can I solve this problem? sudo php artisan key:generate PHP Warning: require(/var/www/html/cms/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/cms/artisan on line 18 PHP Fatal error: require(): Failed opening required ‘/var/www/html/cms/vendor/autoload.php’ (include_path=’.:/usr/share/php’) in /var/www/html/cms/artisan on line 18 Sourc..

Read more

I get this error "npm install -g @vue/cli" run this command Any Suggestions for this command. npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/local/lib/node_modules npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’ npm ERR! { Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’ npm ERR! stack: ‘Error: EACCES: permission ..

Read more

I want to convert the PDF into SVG so I used one software pdf2svg they allow us to convert PDF into SVG like with command pdf2svg "<SOURCE_PDF_PATH>" "<DESTINATION_SVG_PATH>" For an example like pdf2svg sample.pdf sample.svg this will convert sample.pdf to sample.svg Now the issue is I have to do the same thing with PHP so ..

Read more

I’m not quite familiar with Composer and now I’m facing this problem where my it hangs when I tried to run certain composer command. When I tried using composer to create a new laravel project, it took longer than usual to complete the dependencies download. Plus, command like: composer require laravel/ui:^2.4 OR composer update I ..

Read more

I am working in Laravel 6.x project, where I have added debug line inside an Artisan command to get the large array generated from that line into text file as output. It looks almost like following code in the handle method of said command: if(!$dataArray->isEmpty()) { foreach ($dataArray as $dataEle) { $dataArrToPrnt[] = $dataEle->toArray(); …. ..

Read more

In my laravel application when ever I am running the command php artisan route:list its given me the following error: IlluminateContractsContainerBindingResolutionException : Unresolvable dependency resolving [Parameter #0 [ <required> $methods ]] in class IlluminateRoutingRoute at <PROJECT_LOCATION>LaravelvendorlaravelframeworksrcIlluminateContainerContainer.php:977 973| protected function unresolvablePrimitive(ReflectionParameter $parameter) 974| { 975| $message = “Unresolvable dependency resolving [$parameter] in class {$parameter->getDeclaringClass()->getName()}”; 976| > ..

Read more