513 search results

Query Extension: Auto-Filter a Collection

…to modify the query for a collection endpoint, we're going to create something called a query extension. Anywhere in src/ - I'll do it in the ApiPlatform/ directory - create a new class called DragonTreasureIsPublishedExtension. Make this implement QueryCollectionExtensionInterface, then go to "Code"->"Generate…

6:15
PHP Namespaces in under 5 Minutes

…creates a... sort of... "shortcut". Anywhere else in this file, we can now just type SomeClassFoo: and PHP will know that we're really referring to the long class name: Acme\Tools\Foo. Or... if you leave off the as part, PHP will assume you…

4:49
JavaScript Modules

…it's publicly available. But... nobody is using it yet. Let's try something non-traditional, but fun to start. Go into the base layout and, anywhere, say