title: Change extends(layout) dynamically in laravel 5
body: <p>I have been trying to change layout dynamically in laravel by just passing a variable in </p>
  
  <pre><code>@extends('default1.master')
  </code></pre>
  
  <p>to</p>
  
  <pre><code>$var = default2
  @extends('$var.master')
  </code></pre>
  
  <p>possibly</p>
  
  <pre><code>@extends($var.'.master')    
  </code></pre>
  
  <p>tried a lot but unable to find a solution all I get is error in my syntax or view not found.</p>