简体   繁体   English

laravel没有php artisan serve命令无法正常工作

[英]laravel not working without php artisan serve command

I am currently working on laravel 5.3. 我目前正在研究laravel 5.3。 My team mate installed laravel on his machine using composer. 我的队友使用作曲器在其计算机上安装了laravel。 In my machine i also have installed composer, and installed a larvel project using laravel installer, which was installed by composer. 在我的机器上,我还安装了composer,并使用laravel installer安装了larvel项目,该项目由composer安装。 Now when i got the archive file o fproject installed by my team mate on my machine i run php artisan cache:clear , php artisan route:clear , php artisan key:generate , php artisan serve commands and clicked the link provided (ie localhost:8000 ) in terminal,by this project is running fine but, but when i am entering the url in the browser like localhost\\laravel\\public it is not running correctly. 现在,当我的队友在我的机器上安装了fproject的存档文件时,我运行php artisan cache:clearphp artisan route:clearphp artisan key:generatephp artisan serve命令并单击提供的链接(即localhost: 8000)在终端中,通过此项目运行正常,但是,但是当我在浏览器(如localhost \\ laravel \\ public)中输入url时,它运行不正常。

As local dev is always susceptible to configuration issues. 作为本地开发人员,总是容易受到配置问题的影响。 I would also suggest your team look into a proper virtualization solution using vagrant/Homestead, More information and documentation available @ enter link description here 我还建议您的团队使用vagrant / Homestead研究适当的虚拟化解决方案,有关更多信息和文档,请@ 在此处输入链接描述

The advantage is that once the project is configured you never need to worry about these system-specific occurrences and all team members can work on the same underlying system specs. 好处是,一旦配置了项目,您就不必担心这些特定于系统的情况,并且所有团队成员都可以使用相同的基础系统规范。

Note that you can use real domains (ei project-name.dev.yourdomain.com) by just pointing them to the 10.xxx ip range. 请注意,您可以通过将实际域名(即project-name.dev.yourdomain.com)指向IP地址10.xxx来使用它们。

Just Give the permissions to these directories 只需授予这些目录的权限

  1. storage 存储
  2. bootstrap/cache 引导/缓存

and the work is done. 这样工作就完成了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM