For those people that are having the same error on cPanel terminal specifically.
Now you need to enter into your project root or public_html folder in the terminal using the following command:
cd public_html
Now you will be able to run any artisan commands.
php artisan config:clear
![enter image description here]()