Symfony2 Jobeet Day 6: More with the Model

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. The Doctrine Query Object From the second day’s requirements: “On the homepage, the user sees the latest active jobs”. But as of now, all jobs are displayed, whether they are active or not: // ...class JobController extends Controller { public function indexAction() {…

Symfony2 Jobeet Day 5: The Routing

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. URLs If you click on a job on the Jobeet homepage, the URL looks like this: /job/1/show. If you have already developed PHP websites, you are probably more accustomed to URLs like /job.php?id=1. How does Symfony make it work? How does Symfony determine the action to call based on this URL? Why…

Symfony2 Jobeet Day 4: The Controller and the View

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4.Today, we are going to customize the basic job controller we created yesterday. It already has most of the code we need for Jobeet:A page to list all jobs A page to create a new job A page to update an existing job A page to delete a jobAlthough the code is ready to be used…

Symfony2 Jobeet Day 3: The Data Model

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4.If you’re itching to open your text editor and lay down some PHP, you will be happy to know that today will get us into some development. We will define the Jobeet data model, use an ORM to interact with the database and build the first module of the application. But as Symfony does a lot of…

Symfony2 Jobeet Day 2: The Project

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. We have not written a single line of code yet, but, in Day 1, we setup the environment and created an empty Symfony project.This day is about the project specifications. Before diving into the code head-first, let’s describe the project a bit more. The following sections describe the…

Symfony2 Jobeet Day 1: Starting up the Project

* This article is part of the original Jobeet Tutorial, created by Fabien Potencier, for Symfony 1.4. What is Jobeet? Jobeet is an Open-Source job board software which provides you day-by-day tutorials, that will help you learn the latest Web Technolgy, Symfony 2.3.2 (for those who don’t know yet, Symfony is a framework for PHP).Each chapter/day is meant to last about one hour, and will be…

How to Setup Docker for Your Symfony Project

As you probably know, I am a big Symfony fan :) In the last few years I used Vagrant to set up my Symfony development environment more or less as described here. But we now have Docker and it’s time to move forward with a new setup. Docker containers are generally more lightweight than Vagrant virtual machines, so starting and stopping them is extremely fast. They also take a lot less disk space.…

Getting Started with Building APIs in Symfony2

Hello all you Interwebs friends! While we're passing through the shallow mists of time, REST is becoming more and more of a universal standard when building web applications. That said, here's a very brief tutorial on how to get started with building APIs in Symfony2.Spoiler alert: the bits of code written below use FosUserBundle + Doctrine. 1. Generate a New Bundle It's nice to keep your…