title: how do i use include file with laravel?
body: <p>I am using Laravel and i found a chart lib for my project. This library(<a href="http://naku.dohcrew.com/libchart/pages/introduction/" rel="noreferrer">libchart</a>) is php and it use this: </p>
  
  <pre><code>include "../libchart/classes/libchart.php";
  </code></pre>
  
  <p>but if i put this code in my view, i get this error:</p>
  
  <pre><code>include(../libchart/classes/libchart.php) [&lt;a href='function.include'&gt;function.include&lt;/a&gt;]: failed to open stream: No such file or directory
  </code></pre>
  
  <p>I dont know how i have to add code in the view or add the library in Laravel.</p>
  
  <p>When i download the library, I have this:</p>
  
  <pre><code>libchart
  -&gt;libchart
  -&gt;demo
  </code></pre>
  
  <p>Then i paste in:</p>
  
  <pre><code>myproject
  -&gt;app
    -&gt;views
      -&gt;libchart
        -&gt;libchart
        -&gt;demo
  </code></pre>
  
  <p>And <code>include "../libchart/classes/libchart.php";</code> is:</p>
  
  <pre><code>libchart
  -&gt;libchart
  -&gt;demo
    -&gt;LineChartTest.php
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I tried this:</p>
  
  <ol>
  <li>I create a directory called grafico in app.</li>
  <li><p>I did this:</p>
  
  <p><code>Route::get('pruebaimagen', function() {
      include_once(app_path() . '/grafico/libchart/classes/libchart.php');
      $data['libchart'] = new Libchart();
      return View::make('template', $data);
  });</code></p></li>
  </ol>
  
  <p>In <code>return View::make('template', $data);</code> which type of template i have to use? and i get this error now:</p>
  
  <pre><code>Class 'Libchart' not found
  </code></pre>