• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Laravel 5.2 INSTALL- node's npm and ruby's bundler.

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

https://getcomposer.org/doc/00-intro.md

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

#

Composer is not a package manager in the same sense as Yum or Apt are. Yes, it deals with "packages" or libraries, but it manages them on a per-project basis, installing them in a directory (e.g. vendor) inside your project. By default it does not install anything globally. Thus, it is a dependency manager. It does however support a "global" project for convenience via the global command.

This idea is not new and Composer is strongly inspired by node's npm and ruby's bundler.

Suppose:

  1. You have a project that depends on a number of libraries.
  2. Some of those libraries depend on other libraries.

Composer:

  1. Enables you to declare the libraries you depend on.
  2. Finds out which versions of which packages can and need to be installed, and installs them (meaning it downloads them into your project).

 

http://www.tutorialspoint.com/laravel/laravel_tutorial.pdf

 

https://getcomposer.org/Composer-Setup.exe

D:\wamp64\bin\php\php5.6.19   

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>cd\

C:\>composer
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.2.0 2016-07-19 01:28:52

Usage:
  command [options] [arguments]

Options:
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi                     Force ANSI output
      --no-ansi                  Disable ANSI output
  -n, --no-interaction           Do not ask any interactive question
      --profile                  Display timing and memory usage information
      --no-plugins               Whether to disable plugins.
  -d, --working-dir=WORKING-DIR  If specified, use the given directory as workin
g directory.
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for norma
l output, 2 for more verbose output and 3 for debug

Available commands:
  about           Short information about Composer
  archive         Create an archive of this composer package
  browse          Opens the package's repository URL or homepage in your browser
.
  clear-cache     Clears composer's internal package cache.
  clearcache      Clears composer's internal package cache.
  config          Set config options
  create-project  Create new project from a package into given directory.
  depends         Shows which packages cause the given package to be installed
  diagnose        Diagnoses the system to identify common errors.
  dump-autoload   Dumps the autoloader
  dumpautoload    Dumps the autoloader
  exec            Execute a vendored binary/script
  global          Allows running commands in the global composer dir ($COMPOSER_
HOME).
  help            Displays help for a command
  home            Opens the package's repository URL or homepage in your browser
.
  info            Show information about packages
  init            Creates a basic composer.json file in current directory.
  install         Installs the project dependencies from the composer.lock file
if present, or falls back on the composer.json.
  licenses        Show information about licenses of dependencies
  list            Lists commands
  outdated        Shows a list of installed packages that have updates available
, including their latest version.
  prohibits       Shows which packages prevent the given package from being inst
alled
  remove          Removes a package from the require or require-dev
  require         Adds required packages to your composer.json and installs them

  run-script      Run the scripts defined in composer.json.
  search          Search for packages
  self-update     Updates composer.phar to the latest version.
  selfupdate      Updates composer.phar to the latest version.
  show            Show information about packages
  status          Show a list of locally modified packages
  suggests        Show package suggestions
  update          Updates your dependencies to the latest version according to c
omposer.json, and updates the composer.lock file.
  validate        Validates a composer.json and composer.lock
  why             Shows which packages cause the given package to be installed
  why-not         Shows which packages prevent the given package from being inst
alled

C:\>

0-cd\ 

1-composer
2-d:

3-composer create-project  \wamp64\www\w0813w\laravel prefer-dist

C:\>d:

D:\>composer create-project  \wamp64\www\w0813w\laravel prefer-dist


  [InvalidArgumentException]
  Could not find package \wamp64\www\w0813w\laravel with stability stable.


create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--r
epository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no
-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vc
s] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<vers
ion>]


D:\>

补建目录,去除‘只读’

4-

Create a new  directory anywhere in your system for your new Laravel project.
After that, move to path where you have created the new directory and type the following command there to install Laravel.
composer create-project laravel/laravel –prefer-distStep

 

  1 D:\>composer create-project  \wamp64\www\w0813w\laravel-master
  2 
  3 
  4   [InvalidArgumentException]
  5   Could not find package \wamp64\www\w0813w\laravel-master with stability sta
  6   ble.
  7 
  8 
  9 create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--r
 10 epository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no
 11 -custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vc
 12 s] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<vers
 13 ion>]
 14 
 15 
 16 D:\>cd\D:\wamp64\www\w0813w\laravel
 17 文件名、目录名或卷标语法不正确。
 18 
 19 D:\>cd \wamp64\www\w0813w\laravel
 20 
 21 D:\wamp64\www\w0813w\laravel>composer create-project laravel/laravel –prefer-di
 22 st
 23 Installing laravel/laravel (v5.2.31)
 24   - Installing laravel/laravel (v5.2.31)
 25     Downloading: 100%
 26 
 27 Created project in –prefer-dist
 28 > php -r "copy('.env.example', '.env');"
 29 Loading composer repositories with package information
 30 Updating dependencies (including require-dev)
 31   - Installing vlucas/phpdotenv (v2.3.0)
 32     Downloading: 100%
 33 
 34   - Installing symfony/polyfill-mbstring (v1.2.0)
 35     Downloading: 100%
 36 
 37   - Installing symfony/var-dumper (v3.0.9)
 38     Downloading: 100%
 39 
 40   - Installing symfony/translation (v3.0.9)
 41     Downloading: 100%
 42 
 43   - Installing symfony/routing (v3.0.9)
 44     Downloading: 100%
 45 
 46   - Installing symfony/process (v3.0.9)
 47     Downloading: 100%
 48 
 49   - Installing symfony/polyfill-util (v1.2.0)
 50     Downloading: 100%
 51 
 52   - Installing symfony/polyfill-php56 (v1.2.0)
 53     Downloading: 100%
 54 
 55   - Installing symfony/http-foundation (v3.0.9)
 56     Downloading: 100%
 57 
 58   - Installing symfony/event-dispatcher (v3.1.3)
 59     Downloading: 100%
 60 
 61   - Installing psr/log (1.0.0)
 62     Downloading: 100%
 63 
 64   - Installing symfony/debug (v3.0.9)
 65     Downloading: 100%
 66 
 67   - Installing symfony/http-kernel (v3.0.9)
 68     Downloading: 100%
 69 
 70   - Installing symfony/finder (v3.0.9)
 71     Downloading: 100%
 72 
 73   - Installing symfony/console (v3.0.9)
 74     Downloading: 100%
 75 
 76   - Installing swiftmailer/swiftmailer (v5.4.3)
 77     Downloading: 100%
 78 
 79   - Installing jakub-onderka/php-console-color (0.1)
 80     Downloading: 100%
 81 
 82   - Installing jakub-onderka/php-console-highlighter (v0.3.2)
 83     Downloading: 100%
 84 
 85   - Installing dnoegel/php-xdg-base-dir (0.1)
 86     Downloading: 100%
 87 
 88   - Installing nikic/php-parser (v2.1.0)
 89     Downloading: 100%
 90 
 91   - Installing psy/psysh (v0.7.2)
 92     Downloading: 100%
 93 
 94   - Installing paragonie/random_compat (v1.4.1)
 95     Downloading: 100%
 96 
 97   - Installing nesbot/carbon (1.21.0)
 98     Downloading: 100%
 99 
100   - Installing mtdowling/cron-expression (v1.1.0)
101     Downloading: 100%
102 
103   - Installing monolog/monolog (1.21.0)
104     Downloading: 100%
105 
106   - Installing league/flysystem (1.0.27)
107     Downloading: 100%
108 
109   - Installing jeremeamia/superclosure (2.2.0)
110     Downloading: 100%
111 
112   - Installing doctrine/inflector (v1.1.0)
113     Downloading: 100%
114 
115   - Installing classpreloader/classpreloader (3.0.0)
116     Downloading: 100%
117 
118   - Installing laravel/framework (v5.2.43)
119     Downloading: 100%
120 
121   - Installing fzaninotto/faker (v1.6.0)
122     Downloading: 100%
123 
124   - Installing hamcrest/hamcrest-php (v1.2.2)
125     Downloading: 100%
126 
127   - Installing mockery/mockery (0.9.5)
128     Downloading: 100%
129 
130   - Installing symfony/yaml (v3.1.3)
131     Downloading: 100%
132 
133   - Installing sebastian/version (1.0.6)
134     Downloading: 100%
135 
136   - Installing sebastian/global-state (1.1.1)
137     Downloading: 100%
138 
139   - Installing sebastian/recursion-context (1.0.2)
140     Downloading: 100%
141 
142   - Installing sebastian/exporter (1.2.2)
143     Downloading: 100%
144 
145   - Installing sebastian/environment (1.3.7)
146     Downloading: 100%
147 
148   - Installing sebastian/diff (1.4.1)
149     Downloading: 100%
150 
151   - Installing sebastian/comparator (1.2.0)
152     Downloading: 100%
153 
154   - Installing doctrine/instantiator (1.0.5)
155     Downloading: 100%
156 
157   - Installing phpunit/php-text-template (1.2.1)
158     Downloading: 100%
159 
160   - Installing phpunit/phpunit-mock-objects (2.3.8)
161     Downloading: 100%
162 
163   - Installing phpunit/php-timer (1.0.8)
164     Downloading: 100%
165 
166   - Installing phpunit/php-file-iterator (1.4.1)
167     Downloading: 100%
168 
169   - Installing phpunit/php-token-stream (1.4.8)
170     Downloading: 100%
171 
172   - Installing phpunit/php-code-coverage (2.2.4)
173     Downloading: 100%
174 
175   - Installing webmozart/assert (1.1.0)
176     Downloading: 100%
177 
178   - Installing phpdocumentor/reflection-common (1.0)
179     Downloading: 100%
180 
181   - Installing phpdocumentor/type-resolver (0.2)
182     Downloading: 100%
183 
184   - Installing phpdocumentor/reflection-docblock (3.1.0)
185     Downloading: 100%
186 
187   - Installing phpspec/prophecy (v1.6.1)
188     Downloading: 100%
189 
190   - Installing phpunit/phpunit (4.8.27)
191     Downloading: 100%
192 
193   - Installing symfony/css-selector (v3.0.9)
194     Downloading: 100%
195 
196   - Installing symfony/dom-crawler (v3.0.9)
197     Downloading: 100%
198 
199 symfony/var-dumper suggests installing ext-symfony_debug ()
200 symfony/translation suggests installing symfony/config ()
201 symfony/routing suggests installing doctrine/annotations (For using the annotati
202 on loader)
203 symfony/routing suggests installing symfony/config (For using the all-in-one rou
204 ter or any loader)
205 symfony/routing suggests installing symfony/dependency-injection (For loading ro
206 utes from a service)
207 symfony/routing suggests installing symfony/expression-language (For using expre
208 ssion matching)
209 symfony/event-dispatcher suggests installing symfony/dependency-injection ()
210 symfony/http-kernel suggests installing symfony/browser-kit ()
211 symfony/http-kernel suggests installing symfony/class-loader ()
212 symfony/http-kernel suggests installing symfony/config ()
213 symfony/http-kernel suggests installing symfony/dependency-injection ()
214 psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsyS
215 H a lot happier :))
216 psy/psysh suggests installing ext-posix (If you have PCNTL, you'll want the POSI
217 X extension as well.)
218 psy/psysh suggests installing ext-readline (Enables support for arrow-key histor
219 y navigation, and showing and manipulating command history.)
220 psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to
221  work.)
222 paragonie/random_compat suggests installing ext-libsodium (Provides a modern cry
223 pto API that can be used to generate random bytes.)
224 monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages
225 to AWS services like DynamoDB)
226 monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages
227  to a CouchDB server)
228 monolog/monolog suggests installing ext-amqp (Allow sending log messages to an A
229 MQP server (1.0+ required))
230 monolog/monolog suggests installing ext-mongo (Allow sending log messages to a M
231 ongoDB server)
232 monolog/monolog suggests installing graylog2/gelf-php (Allow sending log message
233 s to a GrayLog2 server)
234 monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages
235 to a MongoDB server via PHP Driver)
236 monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log m
237 essages to an AMQP server using php-amqplib)
238 monolog/monolog suggests installing php-console/php-console (Allow sending log m
239 essages to Google Chrome)
240 monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages
241 to Rollbar)
242 monolog/monolog suggests installing ruflin/elastica (Allow sending log messages
243 to an Elastic Search server)
244 monolog/monolog suggests installing sentry/sentry (Allow sending log messages to
245  a Sentry server)
246 league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to u
247 se S3 storage with AWS SDK v2)
248 league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to u
249 se S3 storage with AWS SDK v3)
250 league/flysystem suggests installing league/flysystem-azure (Allows you to use W
251 indows Azure Blob storage)
252 league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem
253 adapter decorator for metadata caching)
254 league/flysystem suggests installing league/flysystem-copy (Allows you to use Co
255 py.com storage)
256 league/flysystem suggests installing league/flysystem-dropbox (Allows you to use
257  Dropbox storage)
258 league/flysystem suggests installing league/flysystem-eventable-filesystem (Allo
259 ws you to use EventableFilesystem)
260 league/flysystem suggests installing league/flysystem-rackspace (Allows you to u
261 se Rackspace Cloud Files)
262 league/flysystem suggests installing league/flysystem-sftp (Allows you to use SF
263 TP server storage via phpseclib)
264 league/flysystem suggests installing league/flysystem-webdav (Allows you to use
265 WebDAV storage)
266 league/flysystem suggests installing league/flysystem-ziparchive (Allows you to
267 use ZipArchive adapter)
268 laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS q
269 ueue driver and SES mail driver (~3.0).)
270 laravel/framework suggests installing doctrine/dbal (Required to rename columns
271 and drop SQLite columns (~2.4).)
272 laravel/framework suggests installing guzzlehttp/guzzle (Required to use the Mai
273 lgun and Mandrill mail drivers and the ping methods on schedules (~5.3|~6.0).)
274 laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to us
275 e the Flysystem S3 driver (~1.0).)
276 laravel/framework suggests installing league/flysystem-rackspace (Required to us
277 e the Flysystem Rackspace driver (~1.0).)
278 laravel/framework suggests installing pda/pheanstalk (Required to use the beanst
279 alk queue driver (~3.0).)
280 laravel/framework suggests installing predis/predis (Required to use the redis c
281 ache and queue drivers (~1.0).)
282 laravel/framework suggests installing pusher/pusher-php-server (Required to use
283 the Pusher broadcast driver (~2.0).)
284 laravel/framework suggests installing symfony/psr-http-message-bridge (Required
285 to psr7 bridging features (0.2.*).)
286 sebastian/global-state suggests installing ext-uopz (*)
287 phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
288 phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
289 Writing lock file
290 Generating autoload files
291 > Illuminate\Foundation\ComposerScripts::postUpdate
292 > php artisan optimize
293 Generating optimized class loader
294 > php artisan key:generate
295 Application key [base64:mRxA2pP+BqMBfBZULlAu6FmoDy77SLzo9wGnaeNi5AQ=] set succes
296 sfully.
297 
298 D:\wamp64\www\w0813w\laravel>

 

  1 create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--r
  2 epository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no
  3 -custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vc
  4 s] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<vers
  5 ion>]
  6 
  7 
  8 D:\>cd\D:\wamp64\www\w0813w\laravel
  9 文件名、目录名或卷标语法不正确。
 10 
 11 D:\>cd \wamp64\www\w0813w\laravel
 12 
 13 D:\wamp64\www\w0813w\laravel>composer create-project laravel/laravel –prefer-di
 14 st
 15 Installing laravel/laravel (v5.2.31)
 16   - Installing laravel/laravel (v5.2.31)
 17     Downloading: 100%
 18 
 19 Created project in –prefer-dist
 20 > php -r "copy('.env.example', '.env');"
 21 Loading composer repositories with package information
 22 Updating dependencies (including require-dev)
 23   - Installing vlucas/phpdotenv (v2.3.0)
 24     Downloading: 100%
 25 
 26   - Installing symfony/polyfill-mbstring (v1.2.0)
 27     Downloading: 100%
 28 
 29   - Installing symfony/var-dumper (v3.0.9)
 30     Downloading: 100%
 31 
 32   - Installing symfony/translation (v3.0.9)
 33     Downloading: 100%
 34 
 35   - Installing symfony/routing (v3.0.9)
 36     Downloading: 100%
 37 
 38   - Installing symfony/process (v3.0.9)
 39     Downloading: 100%
 40 
 41   - Installing symfony/polyfill-util (v1.2.0)
 42     Downloading: 100%
 43 
 44   - Installing symfony/polyfill-php56 (v1.2.0)
 45     Downloading: 100%
 46 
 47   - Installing symfony/http-foundation (v3.0.9)
 48     Downloading: 100%
 49 
 50   - Installing symfony/event-dispatcher (v3.1.3)
 51     Downloading: 100%
 52 
 53   - Installing psr/log (1.0.0)
 54     Downloading: 100%
 55 
 56   - Installing symfony/debug (v3.0.9)
 57     Downloading: 100%
 58 
 59   - Installing symfony/http-kernel (v3.0.9)
 60     Downloading: 100%
 61 
 62   - Installing symfony/finder (v3.0.9)
 63     Downloading: 100%
 64 
 65   - Installing symfony/console (v3.0.9)
 66     Downloading: 100%
 67 
 68   - Installing swiftmailer/swiftmailer (v5.4.3)
 69     Downloading: 100%
 70 
 71   - Installing jakub-onderka/php-console-color (0.1)
 72     Downloading: 100%
 73 
 74   - Installing jakub-onderka/php-console-highlighter (v0.3.2)
 75     Downloading: 100%
 76 
 77   - Installing dnoegel/php-xdg-base-dir (0.1)
 78     Downloading: 100%
 79 
 80   - Installing nikic/php-parser (v2.1.0)
 81     Downloading: 100%
 82 
 83   - Installing psy/psysh (v0.7.2)
 84     Downloading: 100%
 85 
 86   - Installing paragonie/random_compat (v1.4.1)
 87     Downloading: 100%
 88 
 89   - Installing nesbot/carbon (1.21.0)
 90     Downloading: 100%
 91 
 92   - Installing mtdowling/cron-expression (v1.1.0)
 93     Downloading: 100%
 94 
 95   - Installing monolog/monolog (1.21.0)
 96     Downloading: 100%
 97 
 98   - Installing league/flysystem (1.0.27)
 99     Downloading: 100%
100 
101   - Installing jeremeamia/superclosure (2.2.0)
102     Downloading: 100%
103 
104   - Installing doctrine/inflector (v1.1.0)
105     Downloading: 100%
106 
107   - Installing classpreloader/classpreloader (3.0.0)
108     Downloading: 100%
109 
110   - Installing laravel/framework (v5.2.43)
111     Downloading: 100%
112 
113   - Installing fzaninotto/faker (v1.6.0)
114     Downloading: 100%
115 
116   - Installing hamcrest/hamcrest-php (v1.2.2)
117     Downloading: 100%
118 
119   - Installing mockery/mockery (0.9.5)
120     Downloading: 100%
121 
122   - Installing symfony/yaml (v3.1.3)
123     Downloading: 100%
124 
125   - Installing sebastian/version (1.0.6)
126     Downloading: 100%
127 
128   - Installing sebastian/global-state (1.1.1)
129     Downloading: 100%
130 
131   - Installing sebastian/recursion-context (1.0.2)
132     Downloading: 100%
133 
134   - Installing sebastian/exporter (1.2.2)
135     Downloading: 100%
136 
137   - Installing sebastian/environment (1.3.7)
138     Downloading: 100%
139 
140   - Installing sebastian/diff (1.4.1)
141     Downloading: 100%
142 
143   - Installing sebastian/comparator (1.2.0)
144     Downloading: 100%
145 
146   - Installing doctrine/instantiator (1.0.5)
147     Downloading: 100%
148 
149   - Installing phpunit/php-text-template (1.2.1)
150     Downloading: 100%
151 
152   - Installing phpunit/phpunit-mock-objects (2.3.8)
153     Downloading: 100%
154 
155   - Installing phpunit/php-timer (1.0.8)
156     Downloading: 100%
157 
158   - Installing phpunit/php-file-iterator (1.4.1)
159     Downloading: 100%
160 
161   - Installing phpunit/php-token-stream (1.4.8)
162     Downloading: 100%
163 
164   - Installing phpunit/php-code-coverage (2.2.4)
165     Downloading: 100%
166 
167   - Installing webmozart/assert (1.1.0)
168     Downloading: 100%
169 
170   - Installing phpdocumentor/reflection-common (1.0)
171     Downloading: 100%
172 
173   - Installing phpdocumentor/type-resolver (0.2)
174     Downloading: 100%
175 
176   - Installing phpdocumentor/reflection-docblock (3.1.0)
177     Downloading: 100%
178 
179   - Installing phpspec/prophecy (v1.6.1)
180     Downloading: 100%
181 
182   - Installing phpunit/phpunit (4.8.27)
183     Downloading: 100%
184 
185   - Installing symfony/css-selector (v3.0.9)
186     Downloading: 100%
187 
188   - Installing symfony/dom-crawler (v3.0.9)
189     Downloading: 100%
190 
191 symfony/var-dumper suggests installing ext-symfony_debug ()
192 symfony/translation suggests installing symfony/config ()
193 sy 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Ruby的gets和gets.chmop发布时间:2022-07-14
下一篇:
RubyonRailsTutorial第2版学习笔记发布时间:2022-07-14
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap