Chapters
21 Chapters
|
2:23:48
|
Login to bookmark this video
-
Course Code
Login or register to download the code!
Login or register to download the code!
-
This Video
Login or register to download the video!
Login or register to download the video!
-
Subtitles
Login or register to download the subtitles!
Login or register to download the subtitles!
-
Course Script
Login or register to download the script!
Login or register to download the script!
Scroll down to the script below, click on any sentence (including terminal blocks) to jump to that spot in the video!
Subscribe to jump to this part in the video!
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": ">=8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"symfony/asset": "6.0.*", // v6.0.3
"symfony/console": "6.0.*", // v6.0.3
"symfony/dotenv": "6.0.*", // v6.0.3
"symfony/flex": "^2", // v2.4.5
"symfony/framework-bundle": "6.0.*", // v6.0.4
"symfony/monolog-bundle": "^3.0", // v3.7.1
"symfony/runtime": "6.4.3", // v6.4.3
"symfony/twig-bundle": "6.0.*", // v6.0.3
"symfony/ux-turbo": "^2.0", // v2.0.1
"symfony/webpack-encore-bundle": "^1.13", // v1.13.2
"symfony/yaml": "6.0.*", // v6.0.3
"twig/extra-bundle": "^2.12|^3.0", // v3.3.8
"twig/twig": "^2.12|^3.0" // v3.3.8
},
"require-dev": {
"symfony/debug-bundle": "6.0.*", // v6.0.3
"symfony/stopwatch": "6.0.*", // v6.0.3
"symfony/web-profiler-bundle": "6.0.*" // v6.0.3
}
}
5 Comments
For those coming with recent versions of Symfony (mine is 6.3), Stimulus doesn't seem to be installed by default anymore with the
symfony/webpack-encore-bundlepackage.Instead you have to install it using:
And then run:
to install the npm dependencies added to
package.jsonReference: Stimulus & Symfony UX
Kind regards!
thx!
THX!
Is there a way to use stimulus_controller twig function to render multiple controllers on an element?
I was looking at the ChartUX example, and there's support there for multiple controllers, internally renderChart checks for a data-controller attribute and renders both, but I'm wondering if stimulus_controller also support that.
In particular, I'm trying to follow the pattern of listening for events rather than extending a base controller.
Hey
Yeah you can pass an array of controllers to
{{ stimulus_controller() }}however it's deprecated fromsymfony/webpack-encore-bundle:1.15.0New way was introduced
|stimulus_controller()filter... so new code will look:Cheers!
"Houston: no signs of life"
Start the conversation!