Skip to content
Devin Smith edited this page Nov 29, 2015 · 19 revisions

Services in Tipsy are static models. They are accessible in the same ways as the built in services and models.

$tipsy->service('Service', [
	hello => function() {
		return 'world';
	}
]);
$tipsy->router()
	->home(function($Service) {
		echo $Service->hello();
	});

Clone this wiki locally