<p>Please use a proper IDE or take a look into the source code to get to know the functions of the class. As you can see in the <a href="https://docs.craftcms.com/api/v3/craft-base-applicationtrait.html#getConfig()-detail" rel="nofollow noreferrer">class reference</a> the function is called </p>

<pre><code>Craft::$app-&gt;getConfig() 
</code></pre>

<p>However - in order to create urls you should use the <a href="https://docs.craftcms.com/api/v3/craft-helpers-urlhelper.html" rel="nofollow noreferrer">UrlHelper</a> </p>

CC BY-SA 3.0
2018-04-30T00:33:14.383Z
Wow...oh wow! Using PHPStorm is massively helpful. I just learned how to set up a vagrant box with PHPStorm with xdebug. Wow...mind blown. Was used to this kind of capability using Visual Studio for VB.net. I always hated how primitive using echos, print_r and their ilk in doing web development. Mind blown. Thanks for pushing me @Robin. I appreciate your help.
Eric Snyder
CC BY-SA 3.0
2018-04-09T01:48:47.550Z
you have referenced a "good IDE" in another question of mine as well. See [link]https://craftcms.stackexchange.com/a/25288/8071. You seem to have strong opinions about IDE's. What specifically in your estimation is a good or proper IDE? Are there ways to set up IDE's to get Craft classes autocompleted? Are there plugins that help? Can you recommend a specific IDE or environment? I am open to what a "proper IDE" is, please tell me. I am currently using Netbeans.
Eric Snyder
CC BY-SA 3.0
2018-04-09T05:29:35.170Z
I would not even start to create a plugin without autocomplete, because it saves you so much time. NetBeans should be capable, but I personally don't like it at all. Here is a good article about the topic https://nystudio107.com/blog/so-you-wanna-make-a-craft-3-plugin#phpstorm Phpstorm completes your code automatically, warns you about deprecated functions, enables twig autosuggestion, explains all functions, properties and magic methods a class has and so on. So when you type `Craft::` you'll see every possibility you have. No plugin needed, no  real setup needed
Robin Schambach
CC BY-SA 3.0
2018-04-08T00:58:54.837Z
2018-04-08T00:58:54.837Z
Robin Schambach
<p>Sorry, rusty at PHP and learning Craft.</p>

<p>My code looks like this:</p>

<pre><code>$url = craft::$app-&gt;GeneralConfig-&gt;siteUrl();
</code></pre>

<p>What am I doing wrong? I want to build a URL for some links in a plugin.</p>

<craft3>
Getting unknown property: craft\web\Application::GeneralConfig
# Getting unknown property: craft\web\Application::GeneralConfig

(Asked by: username_0 on 2018-04-07)

Sorry, rusty at PHP and learning Craft.
My code looks like this:
$url = craft::$app->GeneralConfig->siteUrl();

What am I doing wrong? I want to build a URL for some links in a plugin.

**Tags:** craft3


---

## 1 answers

### Answer by username_1 on 2018-04-08. Score: 1 | Accepted answer

Please use a proper IDE or take a look into the source code to get to know the functions of the class. As you can see in the class reference the function is called 
Craft::$app->getConfig() 

However - in order to create urls you should use the UrlHelper

> **Comments:**
> **username_0**: you have referenced a "good IDE" in another question of mine as well. See [link]https://craftcms.stackexchange.com/a/25288/8071. You seem to have strong opinions about IDE's. What specifically in your estimation is a good or proper IDE? Are there ways to set up IDE's to get Craft classes autocompleted? Are there plugins that help? Can you recommend a specific IDE or environment? I am open to what a "proper IDE" is, please tell me. I am currently using Netbeans.  
> **username_1**: I would not even start to create a plugin without autocomplete, because it saves you so much time. NetBeans should be capable, but I personally don't like it at all. Here is a good article about the topic https://nystudio107.com/blog/so-you-wanna-make-a-craft-3-plugin#phpstorm Phpstorm completes your code automatically, warns you about deprecated functions, enables twig autosuggestion, explains all functions, properties and magic methods a class has and so on. So when you type `Craft::` you'll see every possibility you have. No plugin needed, no  real setup needed  
> **username_0**: Wow...oh wow! Using PHPStorm is massively helpful. I just learned how to set up a vagrant box with PHPStorm with xdebug. Wow...mind blown. Was used to this kind of capability using Visual Studio for VB.net. I always hated how primitive using echos, print_r and their ilk in doing web development. Mind blown. Thanks for pushing me @Robin. I appreciate your help.  

---

