Laravel PhpWord class not found
<p>need help with this </p>

<p>I followed instruction to install PhpWord in laravel 5.0 
but with that i am getting error with class not found<br>
<strong>Error</strong> </p>

<blockquote>
  <p>Class 'PhpOffice\PhpWord\PhpWord' not found</p>
</blockquote>

<p>I am using psr4 standard </p>

<pre><code>/* TEST WORD START */       
    echo "WORD TEST";

    $file =public_path()."/uploads/test/test_".uniqid().".docx";
    // Creating the new document...
    $phpWord = new \PhpOffice\PhpWord\PhpWord();

    /* Note: any element you append to a document must reside inside of a Section. */

    // Adding an empty Section to the document...
    $section = $phpWord-&gt;addSection();
    // Adding Text element to the Section having font styled by default...
    $section-&gt;addText(
        '"Learn from yesterday, live for today, hope for tomorrow. '
            . 'The important thing is not to stop questioning." '
            . '(Albert Einstein)'
    );

    /*
     * Note: it's possible to customize font style of the Text element you add in three ways:
     * - inline;
     * - using named font style (new font style object will be implicitly created);
     * - using explicitly created font style object.
     */

    // Adding Text element with font customized inline...
    $section-&gt;addText(
        '"Great achievement is usually born of great sacrifice, '
            . 'and is never the result of selfishness." '
            . '(Napoleon Hill)',
        array('name' =&gt; 'Tahoma', 'size' =&gt; 10)
    );

    // Adding Text element with font customized using named font style...
    $fontStyleName = 'oneUserDefinedStyle';
    $phpWord-&gt;addFontStyle(
        $fontStyleName,
        array('name' =&gt; 'Tahoma', 'size' =&gt; 10, 'color' =&gt; '1B2232', 'bold' =&gt; true)
    );
    $section-&gt;addText(
        '"The greatest accomplishment is not in never falling, '
            . 'but in rising again after you fall." '
            . '(Vince Lombardi)',
        $fontStyleName
    );

    // Adding Text element with font customized using explicitly created font style object...
    $fontStyle = new \PhpOffice\PhpWord\Style\Font();
    $fontStyle-&gt;setBold(true);
    $fontStyle-&gt;setName('Tahoma');
    $fontStyle-&gt;setSize(13);
    $myTextElement = $section-&gt;addText('"Believe you can and you\'re halfway there." (Theodor Roosevelt)');
    $myTextElement-&gt;setFontStyle($fontStyle);

    // Saving the document as OOXML file...
    $objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
    $objWriter-&gt;save($file);



    /* TEST WORD ENDS */
</code></pre>

<p>Before this i installed PHPword using composer install </p>

<p><strong>My Composer.json</strong></p>

<pre><code>{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "laravel/framework": "5.0.*",
    "illuminate/html": "^5.0",
  "phpoffice/phpexcel": "dev-master",
  "phpoffice/phpword": "dev-master"

},
"require-dev": {
    "phpunit/phpunit": "~4.0",
    "phpspec/phpspec": "~2.1"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\\": "app/"
    },
    "files": [
      "app/helpers.php"
    ]
},
"autoload-dev": {
    "classmap": [
        "tests/TestCase.php"
    ]
},
"scripts": {
    "post-install-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "post-create-project-cmd": [
        "php -r \"copy('.env.example', '.env');\"",
        "php artisan key:generate"
    ]
},
"config": {
    "preferred-install": "dist"
}
</code></pre>

<p>}</p>