samedi 3 mars 2018

Conditional loading of mix css in blade header blade template

I would like to define header.blade.php which then will be included in:

  • index.blade.php
  • dashboard.blade.php
  • basic.blade.php
  • advanced.blade.php

and I would like to load different mix CSS styles depending on which blade view is this header.blade.php view included in currently I am loading all the styles:

<link rel="stylesheet" href="" />
<link rel="stylesheet" href="" />
<link rel="stylesheet" href="" />
<link rel="stylesheet" href="" />

But I would like to add condition "if included from dashboard.blade.php load only <link rel="stylesheet" href="" /> ,...

Is that something that can be accomplished in blade views in Laravel 5?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire