- Install Symfony standart edition
- Symfony Bundles
- Symfony Components
- Create Bundle, route and controller
- Add twig view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once 'vendor/autoload.php'; | |
| use Filipac\Ip; | |
| PHP_Timer::start(); | |
| $ip = Ip::get(); | |
| echo "Hello, your ip is: {$ip} </br> "; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <VirtualHost *:80> | |
| #ServerName www.example.com | |
| ServerAdmin ahonymous@gmail.com | |
| DocumentRoot /home/alex/extra/www/html | |
| ErrorLog ${APACHE_LOG_DIR}/error.log | |
| CustomLog ${APACHE_LOG_DIR}/access.log combined | |
| <Directory /home/alex/extra/www/html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function addCommentAction(Request $request) | |
| { | |
| $comment = new Comment(); | |
| $form = $this->createForm(new CommentFormType(),$comment); | |
| if ($request->isMethod('POST')) { | |
| $form->handleRequest($request); | |
| if ($form->isValid()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace <dsaaffa>; | |
| use Symfony\Bundle\FrameworkBundle\Client; | |
| use Symfony\Bundle\FrameworkBundle\Console\Application; | |
| use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
| use Symfony\Component\Console\Input\ArrayInput; | |
| use Symfony\Component\Console\Output\ConsoleOutput; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace <Organization>\AppBundle\Tests; | |
| use Symfony\Component\Form\Extension\Core\CoreExtension; | |
| use Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension; | |
| use Symfony\Component\Form\Forms; | |
| use Symfony\Component\Form\Test\TypeTestCase; | |
| use Symfony\Component\Validator\ConstraintViolationList; |
NewerOlder