511 search results
Learn Symfony 6
Doctrine, Symfony 6 & the Database
…the vote count. Pass these in: $prefix then the absolute value of $this->votes... since we're adding the negative sign in manually. We can now use this nice method anywhere in our app... like from inside a template with mix.getVotesString(). Or shorten this…
Learn JS
Symfony UX: Turbo
…into the body of your page, then it does work like normal. Open up templates/base.html.twig and - anywhere in the body, I'll go to the bottom - add a script tag and console.log('body executing!'). Refresh now. We see all three logs…
Symfony UX: Stimulus
…an Ajax call to reload the product list area after a new product is successfully added. To be extra cool - cause we are extra cool - we're going to make this new controller generic so we can reuse it anywhere... like on the cart page…
Learn Symfony 5
Symfony 5 Deep Dive! The HttpKernel Request-Response Flow
…argument. If we try, I want an exception to be thrown. By the way, it is actually possible to use the RequestStack from anywhere to get the "master" request: it has a getMasterRequest() method. But! If you're using HTTP caching with edge side includes…
Webpack Encore: Frontend like a Pro!
…that we have this new article_show entry, inside show.html.twig, instead of our manual