Does laravel 5.1 work without internet connection? I like to create a laravel new application when i execute laravel new test (with intenet connection) it works well; but when
Composer 2+:
COMPOSER_DISABLE_NETWORK=1 laravel new myapp
Troubleshooting:
composer --version
- you may have to update to the latest version with composer self-update
;echo $COMPOSER_HOME
- you may have to create a ~/.composer
and set export COMPOSER_HOME="${HOME}/.composer"
to your ~/.bashrc
or ~/.zshrc
- don't forget to close and open your terminal to apply the changes;https://repo.packagist.org could not be fully loaded (Network disabled, request canceled: https://repo.packagist.org/packages.json), package information was loaded from the local cache and may be out of date
, the laravel packages are not in the global cache. Run the command with internet enabled to download the files.When you use the laravel installer it fetches the latest version from the server. One solution would be to initialise a Laravel project, then add it to git version control and then when offline checkout the project to a new folder. You'd have to manually choose a new app key (I think). You will also not be able to composer require
or npm install
any new packages while offline.
Once you have created it though it should run offline (unless your views are sourcing assets from, say, bootstrap or jQuery CDNs).