$node = \Drupal::routeMatch()->getParameter('node');
if ($node instanceof \Drupal\node\NodeInterface) {
$nid = $node->id();
}
Attention Wamp/Wordpress/windows users. I had this issue for hours and not even the correct answer was doing it for me, because I was editing the wrong php.ini file because the question was answered to XAMPP and not for WAMP users, even though the question was for WAMP.
here's what I did
Download the certificate bundle.
Put it inside of C:\wamp64\bin\php\your php version\extras\ssl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Support\Composer; | |
use Illuminate\Filesystem\Filesystem; | |
use Illuminate\Console\GeneratorCommand; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputArgument; |