I'm new to GitHub and I found this site very useful for a lot of us. I came upon storing my Laravel project here in GitHub, but there's a problem every time I will clone it to be able to go to production, when I'm about to clone it at first, it always shows this error.

Warning: require(C:\xampp\htdocs\tourismPortal\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\tourismPortal\bootstrap\autoload.php on line 17

Fatal error: require(): Failed opening required 'C:\xampp\htdocs\tourismPortal\bootstrap/../vendor/autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\tourismPortal\bootstrap\autoload.php on line 17

I know this will be solved by using composer update on it, but is there any way to prevent this error so that every time I clone it, I will go to production without encountering this error? Thanks, by the way, I'm using tortoisegit to clone, pull and push.

推荐答案

是的,你可以,但这一点都不推荐.

您可以删除.gitignore文件中的所有内容,并将它们从工作项目中推送出go .那么它将完美地工作在你git clone个人的地方.

但这种方式有很多缺点.

Laravel相关问答推荐

用Laravel Filament创建变形组件

Laravel中如何动态更改路由链接?

我在 laravel 中插入多个复选框值.我怎样才能做到这一点?

导出所有客户端不起作用,文件保存时没有名称和扩展名

如何在 Laravel 中将 Select 选项表单插入数据库

未找到 apiResource 404 中的变量

Laravel - 如果值包含某个字符串(取自搜索输入),则查询模型

"public/index.php" 可以在 laravel 中按组写入

给定的角色或权限应该使用 guard `` 而不是 `web`. -Laravel

Eloquent的条件过滤器

Laravel 5.4 中的自定义助手类

在 laravel 如何将额外的数据传递给 mutators 和 accessors

PHP 中的 Http 响应代码枚举

Laravel Eloquent Pluck 不丢失密钥

laravel 搜索多个以空格分隔的单词

如何重定向到laravel上的公共文件夹

Blade 中的条件扩展

在 Laravel 5.4 中将文件存储在公共目录和存储中的区别

在 Laravel 中软删除父记录时如何软删除相关记录?

如何在 laravel eloquent 中保存布尔值