Q:

Create reusable blade block in Laravel4

I want to create a reusable block in laravel blade template
I write pseudo code below, want to know how I can implement the scope
// app/views/layouts/code.blade.php
// the block I want to reuse
<pre>
    <code>
        // fill the content here
    </code>
</pre>

// app/views/myview.blade.php
@extends('layouts.main') // set header, body, and footer block

@section ('content')
    @reuse_section('layouts.code')
       .......my code line 1
       .......my code line 2
    @endsection

    @reuse_section('layouts.code')
        .......my code line 1
        .......my code line 2
        .......my code line 3
    @endsection
 @endsection

A:

you're best off creating a new View::make() call within your blade template. 
// myview.blade.php
<? = View::make('partials.code', [
    'code' => 'my dynamic code content'
]); ? >

and your code.blade.php file takes the parameters just like:
// partials/code.blade.php
<pre>
    <code>
        {{ $code }}
    </code>
</pre>

