Yii v2 snippet guide

Comparing #171 with #172

Revision #172 was created by rackycz rackycz on Mar 19, 2020, 9:58:50 PM.

local url

Content

[...]
echo $form->field($generator, 'modelClass');
echo $form->field($generator, 'searchModelClass');
echo $form->field($generator, 'controllerClass');
}
```

 
**Webproject outsite docroot (htdocs) folder (Windows)**
 
---
 
If you need to store you project for example in folder D:\GIT\EmployerNr1\ProjectNr2, you can. Just modify 2 files and restart Apache (I am using XAMPP under Win):
 
 
- C:\Windows\System32\drivers\etc\hosts
 
```
 
127.0.0.1 myFictiveUrl.local
 
```
 
 
- C:\xampp\apache\conf\extra\httpd-vhosts.conf
 
```
 
<VirtualHost *:80>
 
  DocumentRoot "D:\GIT\EmployerNr1\ProjectNr2"
 
  ServerName myFictiveUrl.local
 
  ServerAlias myFictiveUrl.local
 
  <Directory "D:\GIT\EmployerNr1\ProjectNr2">
 
    Options Indexes FollowSymLinks
 
    AllowOverride All
 
    Order allow,deny
 
    Allow from all
 
    # New directive needed in Apache 2.4.3:
 
    Require all granted
 
  </Directory>
 
</VirtualHost>
 
```