1

My app is not working on the production server. It looks like it fails to autload some classes.

// app/config/app.php
    'Route'           => 'Extended\Route',

// app/library/extended/Route.php
    <?php namespace Extended {}

    class Route extends ... {}

// app/start/global.php
    ClassLoader::addDirectories(array(
        ...
        app_path().'/library',
        ...
    ));

// composer.json
    "autoload": {
        "classmap": [
                ...
                "app/library",
                ...
        ]
    },

I'm receiving this error Class 'Extended\Route' not found

Edit: Deleting the vendors folder and reinstalling all dependencies fixed this problem.

1 Answer 1

1

Usually this fixes those kind of errors for Laravel:

cd /your/application/dir

rm bootstrap/compiled.php

rm -rf vendor

rm composer.lock

composer install --no-dev
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.