Explore the Symfony file structure

Keyboard Shortcuts

Each framework—be it Symfony, Laravel, CodeIgniter, Zend, Yii, or CakePHP, etc.—has its own fine details. One of these details is its file structure. While similar, each framework has its own peculiar structure. Take a small dive into Symfony's file structure and its details and find out where we should keep our code and where we should avoid.

- [Narrator] Every framework has its own file structure.…Some may be similar.…One example of this is Laravel.…Since it's partially based on Symfony.…Others,…May differ a lot.…For example, CodeIgniter.…Let's take a look and see where we will be coding…and where we should not handle things.…Let's drag my first app into Visual Studio Code.…The initial project will have the folders app,…bin, source, test, var, vendor, and web.…Out of these,…We will be working mostly on app and source…and occasionally on web.…

Bin, var, and vendor,…are reserved for either the…core of Symfony tools…or other libraries.…Now let's take a deeper look…into the app folder.…This is where our configuration…and views will be held.…On the config folder, we may define our routes…database configuration, etc.…On the resources folder,…we will save our view files…and our templates.…Our source folder…will hold our controllers and models…which will be contained scattered in entity…repository, and resource file.…

Most of our work will be done in these two folders.…

Resume Transcript Auto-Scroll

Author

Released

3/30/2017

Build PHP applications the modern way with Symfony 3, a popular PHP Model-View-Controller framework. In this course, Bernard Pineda shows how to build a PHP-based web app in Symfony. He explains how to install and configure Symfony, and start saving time with typical development tasks, such as creating persistent models and rendering content with templates. Bernard also goes into how to define and validate forms and debug your applications. After wrapping up this course, you'll have the tools you need to leverage Symfony to get a head start on your PHP projects.