I am trying Joomla 4.
My biggest problem is to migrate the get article id functionality.
In Joomla 3.x, I used:
defined('_JEXEC') or die; $id= JRequest::getInt('id');
but this is not longer supported. So I now use:
use Joomla\CMS\Factory; $app = Factory::getApplication(); $id = $app->input->getCmd('id', '');
Is this really the best way to get the article id inside a PHP script?