Laravel Migrations Issue: When Deleting A Migration File

May 31, 2017 By - Azeem Hassni
    • Introduction

      Working with Laravel is amazing it feels magical but sometimes you get stuck in those magics Laravel is doing for you behind the scene. one of them is when you create a migration, Laravel automatically adds the migration file to composer’s auto-loader.

      If you decide not to use the migration you just created and you want to delete it. Wait… if you did that you will get an error next time when you run

      $ php artisan migrate

      Here is how the error looks like

      the quick fix to this issue is run the the following command

      composer dump-autoload

      It will remap the classes in you /database directory and will remove all the non-existent files.

      Here is how i did that


      Follow me on Twitter : @azibaloch



    blog user
    Azeem Hassni

    I write code and i love it. I do write blogs on things which I am passionate about. I love to Explore the internet of things and whats new in web technologies. My topic of Interests include WordPress, Laravel & Magento to name a few.

    Related Posts

    Manually Installing composer is an advanced technique, however there are several reasons why a developer might prefer this reason instead of using the interactive installation routine.

    Over the years, Laravel has brought so much excitement in developing applications with its out of the box code-base

    You guys might have noticed this little piece of warning while running composer in your command line