For the course Webscripting2 I’m lecturing at ikdoeict.be/KaHo Sint-Lieven, we’re working with Silex. Next to the slidedeck explaining Silex, all examples are freely available on GitHub (links at the bottom of this post)
The collection of examples start with the very basics of Silex and introduce more routing options and services as they continue.
Doctrine Organized: Organizes our codebase a tad better: per entity we introduce a repository which acts as a database layer. Depends on the custom Service Providerknplabs/repository-service-provider (loaded via Composer).
The past few days I’ve been playing around with Silex, a micro PHP Framework. At a certain point I got stuck in the process when using a custom controller: the darn class just wouldn’t load and the (otherwise excellent) documentation on the Silex site has not mention on how to load it.
Most of the information one finds on the internet instruct you to do this (line #3):
// source for /app/bootstrap.php
require_once __DIR__ . '/../vendor/autoload.php';
$app = new Silex\Application();
$app['autoloader']->registerNamespace('Bramus', __DIR__. '/src');
That information however, is deprecated and won’t work.