简体   繁体   English

如何在laravel中回滚最后一个供应商发布

[英]How to rollback last vendor publish in laravel

Hi have messed up my project by doing vendor publish here is the command last time i have executed (i'm using LARAVEL 5.4 ) 嗨,通过做vendor publish搞砸我的项目这是我上次执行的command (我使用的是LARAVEL 5.4

php artisan vendor:publish --tag=laravel-notifications

i want to rollback to previous state which was there before this command 我想rollback到此command之前的状态

what i was trying to do: i wanted to customize reset password email template 我想做什么:我想自定义reset password email模板

Problem: No longer i'm able to see my customized forgot password template and reset password template. 问题:我不再能够看到自定义的forgot password模板并reset password模板。 but default template is appearing for both( forgot password and reset password ). 但是两者都显示default templateforgot passwordreset password )。

Question : please help to get my previous state prior to running this command php artisan vendor:publish --tag=laravel-notifications 问题:请在运行此command之前帮助获取我之前的状态php artisan vendor:publish --tag=laravel-notifications

please help me thanks in advance!!!! 请提前帮助我!!!!

please help me thanks in advance!!!! 请提前帮助我!!!!

Got it working... The steps to remove a package from Laravel are: 搞定了......从Laravel中删除包的步骤是:

  1. Remove declaration from composer.json (in "require" section) 从composer.json中删除声明(在“require”部分中)
  2. Remove Service Provider from "app/config/app.php" (reference in "providers" array) 从“app / config / app.php”中删除服务提供者(在“providers”数组中引用)
  3. Remove any Class Aliases from "app/config/app.php" 从“app / config / app.php”中删除任何类别名
  4. Remove any references to the package from your code. 从代码中删除对包的任何引用。
  5. Run "composer update vendor/package-name". 运行“composer update vendor / package-name”。 This will remove the package folder from "vendor" folder and will rebuild composer autoloading map 这将从“vendor”文件夹中删除包文件夹,并将重建composer autoloading map

it will remove the package folder from "Vendor" folder 它将从“Vendor”文件夹中删除包文件夹

I'm on a similar situation, but with Laravel 5.5 I think that the rollback in this situations does not exist. 我处于类似的情况,但是使用Laravel 5.5我认为在这种情况下的回滚不存在。

When you execute this command: 执行此命令时:

php artisan vendor:publish --tag=laravel-notifications

a folder vendor/notifications is created under the views folder. views文件夹下创建文件夹供应商/通知

I have delete the notifications folder, and executed the command: 我删除了notifications文件夹,并执行了命令:

php artisan view:clear

and everything is working fine. 一切都很好。

I know that this is an old question, but maybe someone find this useful 我知道这是一个老问题,但也许有人觉得这很有用

Try this: git clean -f -d 试试这个: git clean -f -d

-d: for directory; -d:用于目录;

-f: for force; -f:强制;

This solved for me. 这解决了我。

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

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