Ok, newbie at Laravel. I used composer to download laravel. It created a directory structure like...
vendor\laravel\laravel\app
vendor\laravel\laravel\bootstrap
vendor\laravel\laravel\public
vendor\laravel\framework\....
vendor\laravel\laravel\composer.json
along with many other vendor and laravel directories.
and where my initial composer.json file was in the root directory.
I moved the contents of the vendor\laravel\laravel directory to the top level so that I have a directory structure like...
app\...
bootstrap\...
public\...
vendor\laravel\framework\...
composer.json
vendor\ many other directories...
I updated the index.php directory so that it referred to the new locations of the bootstrap\autoload.php and bootstrap\start.php directories.
I can load the index.php and I get the Laravel image map signifying that all is working.
So, now I go and modify the routes.php to be...
Route::controller('home', 'HomeController');
and try to load the home directory. I get the error...
"include(D:\dev\wamp\www\ltest3\vendor/laravel/laravel/app/controllers/BaseController.php): failed to open stream: No such file or directory"
The problem is that the vendor\composer\autoload_classmap.php still has the old laravel\app controller mappings. e.g.
return array(
'BaseController' => $vendorDir . '/laravel/laravel/app/controllers/BaseController.php',
'DatabaseSeeder' => $vendorDir . '/laravel/laravel/app/database/seeds/DatabaseSeeder.php',
'HomeController' => $vendorDir . '/laravel/laravel/app/controllers/HomeController.php',
instead of the new location at /app/controllers/
If I try to run composer update on the composer.json in my root directory, I get error after awhile of processing...
Failed to execute git status --porcelain --untracked-files=no
So, not sure how to get composer to update the autoload classmap to use my new directory location.
Do people normally leave the vendor\laravel\laravel directory in is original location?
Seems that the composer will probably attempt to update the laravel directory again, but not sure since I get the error.
Here is my full composer.json in the root directory. This was the one that was originally in the vendor\laravel\laravel directory and created by other initial composer run, maybe that is problem.
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.1.*"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/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 artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"
}
composer update
any previous changes will be overwritten. What was the command you used to create the project? – user2094178