2016-06-25 82 views
1

试图获得Laravel开发环境设置在Windows 10和我有几个问题。作曲与Laravel家园在Windows 10

官方Laravel网站上的指南说,这是最容易使用的宅基地让所有的依赖关系。 https://laravel.com/docs/5.2/homestead

我有Vagrant和Homestead启动和运行。 Homestead预装了Composer。我一直在阅读的指南让Vagrant推荐通过Composer使用流浪汉安装程序。作曲家和流浪者安装者应该从SSH进入Homestead Vagrant盒,或者是作曲家和流浪者安装者应该通过共享文件夹在本地运行?

如果我在本地运行,遇到以下问题: “Laravel New”成功设置了一个新的laravel项目,但在完成之前警告我说它还有很多建议安装的东西。

本地运行 'laravel新'

symfony/var-dumper suggests installing ext-symfony_debug() 
symfony/translation suggests installing symfony/config() 
symfony/routing suggests installing doctrine/annotations (For using the annotation loader) 
symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader) 
symfony/routing suggests installing symfony/dependency-injection (For loading routes from a service) 
symfony/routing suggests installing symfony/expression-language (For using expression matching) 
symfony/event-dispatcher suggests installing symfony/dependency-injection() 
symfony/http-kernel suggests installing symfony/browser-kit() 
symfony/http-kernel suggests installing symfony/class-loader() 
symfony/http-kernel suggests installing symfony/config() 
symfony/http-kernel suggests installing symfony/dependency-injection() 
psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :)) 
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.) 
psy/psysh suggests installing ext-posix (If you have PCNTL, you'll want the POSIX extension as well.) 
psy/psysh suggests installing ext-readline (Enables support for arrow-key history navigation, and showing and manipulating command history.) 
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.) 
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB) 
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server) 
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required)) 
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server) 
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server) 
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver) 
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib) 
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome) 
monolog/monolog suggests installing raven/raven (Allow sending log messages to a Sentry server) 
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar) 
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server) 
league/flysystem suggests installing ext-fileinfo (Required for MimeType) 
league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2) 
league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3) 
league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage) 
league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching) 
league/flysystem suggests installing league/flysystem-copy (Allows you to use Copy.com storage) 
league/flysystem suggests installing league/flysystem-dropbox (Allows you to use Dropbox storage) 
league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem) 
league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files) 
league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib) 
league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage) 
league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter) 
laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver and SES mail driver (~3.0).) 
laravel/framework suggests installing doctrine/dbal (Required to rename columns and drop SQLite columns (~2.4).) 
laravel/framework suggests installing guzzlehttp/guzzle (Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~5.3|~6.0).) 
laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (~1.0).) 
laravel/framework suggests installing league/flysystem-rackspace (Required to use the Flysystem Rackspace driver (~1.0).) 
laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (~3.0).) 
laravel/framework suggests installing predis/predis (Required to use the redis cache and queue drivers (~1.0).) 
laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (~2.0).) 
laravel/framework suggests installing symfony/psr-http-message-bridge (Required to psr7 bridging features (0.2.*).) 
sebastian/global-state suggests installing ext-uopz (*) 
phpunit/phpunit-mock-objects suggests installing ext-soap (*) 
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1) 
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1) 

是否正常有这个输出运行时, 'laravel新'?

如果我尝试运行“laravel新”,而SSH方式登录宅基地箱它只是说

运行“laravel新的”内部泰德/游民

laravel: command not found 

我的问题是。 。

如果我的意思来设置laravel与作曲家laravel安装在本地,这些错误的问题吗?我只有Composer使用官方PHP站点的本地PHP 7安装 - 有没有其他方法可以让我在W10上使用PHP for Composer/Laravel开发?

如果我打算建立一个新的laravel项目并使用laravel安装从作曲家宅基地内,不应家园已经在PATH作曲家模块?如何在Vagrant/Homestead盒子里添加laravel到Composer的PATH,如果它是如何使用的?

或者是laravel安装的东西与作曲家不是你应该如何开始一个项目?那是在laracasts的指南,但它只是假设作曲家没有错误,laracasts指南不使用家园。

谢谢。试图进入这个并感到可笑的是被困在一个早期的步骤。

+0

我希望有人会尽快帮助你。不要觉得可笑。我被困在无法删除fu ** ing Laravel 5内置的Auth/Register中,直到看到这篇文章之前感觉有点不好:D – Vucko

回答

0

您必须在SSH后安装新的laravel应用程序进入家园机器。你一定会得到

laravel:找不到命令

错误,你很可能不执行

composer global require "laravel/installer" 

laravel new <project_name> 

而且之前,根据docs

请确保将〜/ .composer/ vendor/bin目录(或您的操作系统的 等价目录)放入PATH中,以便您的系统可以找到可执行文件。

所以你应该把

export PATH="~/.composer/vendor/bin:$PATH" 

.bashrc什么的。

如果失败,再尝试

composer create-project --prefer-dist laravel/laravel <project_name> 

参考laravel文档here以获取更多信息。

+0

我确实做了全球要求。最后一行虽然工作。我想知道为什么laravel新的<项目名称>在Homestead中不起作用 – Octoxan

+0

可能你还没有更新你的'PATH'。我已经用所需的信息编辑了答案。 – linuxartisan

+0

傻乎乎的家园包括作曲家,以及Laravel /安装程序..但没有与作曲家供应商/斌已经在路径中设置。 – Octoxan