The sandbox is a pre-packaged Nette Framework project, basic configured structure for your application.
This package is auto-updated.
Last update: 2020-05-11 02:02:05 UTC
Based on official nette/sandbox.
Sandbox is a pre-packaged and pre-configured Nette Framework application that you can use as the skeleton for your new applications.
Nette is a popular tool for PHP web development. It is designed to be the most usable and friendliest as possible. It focuses on security and performance and is definitely one of the safest PHP frameworks.
The best way to install Sandbox is using Composer.
When you have Composer installed, run these commands and follow instructions:
composer create-project etten/sandbox my-app cd my-app php install.php
grunt-contrib-watch tasks (for automatic LESS, TypeScript compiling):
This can be done automatically by IDE - WebStorm, PHPStorm, see guide.
Create/update database schema:
php web/index.php orm:schema-tool:update
Create a User (username and password):
php web/index.php user:create
Navigate your browser to the
www directory and you will see a welcome page.
PHP 5.4 allows you run
php -S localhost:8888 -t www to start the web server and
http://localhost:8888 in your browser.
You can log-in as created user via
It is CRITICAL that all files and directories except
www are NOT accessible
directly via a web browser! Necessary file for Apache is included (
Make sure that is handled properly by your server!
Study them for deeper understanding.
- Nette framework
Application has built-in CLI support.
For list of each commands and options just run CLI:
php web/index.php -h
Via CLI you can for example:
- clean application caches (including Nette\DI and Latte)
- work with Doctrine DBAL and ORM
- run migrations
- deploy application (it should be launched by CI/CD service)
If you use PhpStorm IDE, you can operate with its built-in CLI tool.
It's very simple and you get autocomplete suggestions for all commands and their options!
Just go to
Settings - Tools - Command Line Tool Support, add new
Tool Based on Symfony Console and select
web/index.php of the application. You don't need remember all the commands now.
You can use included Docker environment.
docker-compose.yml according your needs.
docker-compose up. You'll reach the application via
If you want to run some PHP commands, login into PHP container as a non-root user:
# Login into Docker PHP terminal as a non-root user docker exec -it -u me $(basename `pwd`)_php_1 bash