有没有办法像 CodeIgniter 一样离线安装 Laravel?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26031234/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 10:10:08  来源:igfitidea点击:

Is there a way to install Laravel offline just like CodeIgniter?

phplaravel

提问by Jerielle

I am studying Laravel as my 2nd framework. Before I am using CodeIgniter and after switching to Laravel it looks so difficult. I already tried to install laravel using composer but it is online. I just want to ask if there is a way that I can install a fresh copy of laravel offline? Just like in CodeIgniter. You just unzip the file and that's it. Here's my folder structure:

我正在学习 Laravel 作为我的第二个框架。在我使用 CodeIgniter 之前和切换到 Laravel 之后,它看起来很困难。我已经尝试使用 composer 安装 laravel,但它是在线的。我只是想问有没有办法可以离线安装laravel的新副本?就像在 CodeIgniter 中一样。您只需解压缩文件即可。这是我的文件夹结构:

/wamp
  /www
      /laravel --- main laravel code
      /sample_laravel --- this is the installation using online
      /blog --- this is a blank folder, it is the folder I want to install my laravel

In online I tried to use this command:

在网上我尝试使用这个命令:

composer create-project laravel/laravel sample_laravel --prefer-dist 

And it is ok. Can I do this even I don't have internet connection? Because I thinks it requires an active connection.

没关系。即使我没有互联网连接,我也可以这样做吗?因为我认为它需要一个主动连接。

采纳答案by Jared Eitnier

Can I do this even I don't have internet connection?

即使我没有互联网连接,我也可以这样做吗?

No. The whole point of using Composer is to pull your dependencies from online repositories. You need an internet connection to run Composer.

不。使用 Composer 的全部目的是从在线存储库中提取您的依赖项。您需要互联网连接才能运行 Composer。

This linkwill download a zip of the latest Master which is taken directly from the main Laravel Github account.

此链接将下载最新 Master 的 zip 文件,该文件直接从 Laravel Github 主帐户中获取。