user5405873
user5405873

Reputation:

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)

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

i want to rollback to previous state which was there before this command

what i was trying to do: i wanted to customize reset password email template

Problem: No longer i'm able to see my customized forgot password template and reset password template. but default template is appearing for both(forgot password and reset password).

Question : please help to get my previous state prior to running this command php artisan vendor:publish --tag=laravel-notifications

please help me thanks in advance!!!!

please help me thanks in advance!!!!

Upvotes: 12

Views: 18276

Answers (3)

Ricard
Ricard

Reputation: 181

I'm on a similar situation, but with Laravel 5.5 I think that the rollback in this situations does not exist.

When you execute this command:

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

a folder vendor/notifications is created under the views folder.

I have delete the notifications folder, and executed the command:

php artisan view:clear

and everything is working fine.

I know that this is an old question, but maybe someone find this useful

Upvotes: 7

Vicente de Andrade
Vicente de Andrade

Reputation: 9

Try this: git clean -f -d

-d: for directory;

-f: for force;

This solved for me.

Upvotes: 0

Mahesh Bhattarai
Mahesh Bhattarai

Reputation: 752

Got it working... The steps to remove a package from Laravel are:

  1. Remove declaration from composer.json (in "require" section)
  2. Remove Service Provider from "app/config/app.php" (reference in "providers" array)
  3. Remove any Class Aliases from "app/config/app.php"
  4. Remove any references to the package from your code.
  5. Run "composer update vendor/package-name". This will remove the package folder from "vendor" folder and will rebuild composer autoloading map

it will remove the package folder from "Vendor" folder

Upvotes: 9

Related Questions