About the Project
Welcome to Rent-a-Flat.
This is sample project created to demonstrate Symfony Framework (
version 1) support in NetBeans IDE. Don't worry to dig into code to
see how it works and how you can make your development easier with Symfony and NetBeans!
Let us know what you think on our mailing list
users@php.netbeans.org
Let us know if you find any mistake or place for improvement.
Symfony Framework support in NetBeans IDE
If you want to use Symfony framework in NetBeans than you need to
download
Symfony framework (
version 1), put it on your PHP
include_path and tell it to NetBeans (
Tools > Options > PHP).
How To Make This Work
- Add new VirtualHost to your Apache web server
(rentaflat must added to your hosts file):
# Be sure to only have this line once in your configuration
NameVirtualHost 127.0.0.1:8080
# This is the configuration for your project
Listen 127.0.0.1:8080
<VirtualHost 127.0.0.1:8080>
ServerName rentaflat
DocumentRoot "/path/to/RentAFlat-Symfony/web"
<Directory "/path/to/RentAFlat-Symfony/web">
AllowOverride All
Allow from All
</Directory>
# adjust path to your copy of Symfony framework
Alias /sf /usr/share/php/data/symfony/web/sf
<Directory "/usr/share/php/data/symfony/web/sf">
AllowOverride All
Allow from All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/rentaflat-error.log
CustomLog ${APACHE_LOG_DIR}/rentaflat-access.log combined
</VirtualHost>
- Then, check your web server configration using check_configuration.php script located in the web root of the application,
for example via (depends on your setup) http://rentaflat/check_configuration.php
- Configure your database connection: right click your project,
Symfony > Run Command..., choose configure:database and provide your credentials
(checkbox Keep this dialog opened could be useful);
or via command line
php symfony configure:database "mysql:host=localhost;dbname=rentaflat;charset=utf8" rentaflat rentaflat
- Create your database table and load data: right click your project,
Symfony > Run Command..., choose doctrine:build and provide --db --and-load;
or via command line
php symfony doctrine:build --db --and-load
- Create model classes: right click your project,
Symfony > Run Command..., choose doctrine:build-model;
or via command line
php symfony doctrine:build-model
- Create form classes: right click your project,
Symfony > Run Command..., choose doctrine:build-forms;
or via command line
php symfony doctrine:build-forms
- Fix directory permissions: right click your project,
Symfony > Run Command..., choose project:permissions;
or via command line
php symfony project:permissions
-
Open the application URL http://rentaflat/frontend_dev.php/ in your browser.
- Have fun! Don't forget to try all NetBeans features for Symfony Framework
(part 1,
part 2)
or
watch our screencast
and
many other great things NetBeans can do!
- Finally, we would like to ask you
to help us
make NetBeans better because better NetBeans makes your life easier! :)
Wish you best luck!