PHP Snippet 1:
yarn add --dev @symfony/webpack-encore
yarn add webpack-notifier --dev
yarn encore dev
PHP Snippet 2:
framework:
assets: ~
#json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
PHP Snippet 3:
# app/config/config.yml
framework:
# ...
assets:
json_manifest_path: '%kernel.root_dir%/../web/build/manifest.json'
PHP Snippet 4:
framework:
assets: ~
#json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
PHP Snippet 5:
/**
* @Route("/", name="home")
*/
public function home() {
return $this->render('blog/home.html.twig', [
'title' => "Bienvenue",
'logo_path' => "logo_mom.png",
'logo_alt' => "logo alt description",
]);
}
PHP Snippet 6:
{% block body %}
<h1>{{ title }}</h1>
<img src={{ logo_path }} alt={{ logo_alt}}>
PHP Snippet 7:
<link rel="icon" type="image/x-icon" href="favicon.ico" />