I just finished my first laravel project> Now I only need to install an admin panel. I tried to install Laravel Voyager but I got an issue because I had a role table already created, So it stopped the installation. Is there a way to fix this issue or should I use admin panel, what do you advice me ? I already had a role table with helpers methods and data that I am currently using. I completely unistall it and I delete all files that I got during the installation.
In the past, I run into the same issue with Voyager, with my previous users and a roles table. Since I had logic already in place for the user's/role table design, what I did was fuse both tables migrations into one. In detail these are the steps I went through to accomplish that:
.env
to access new DB (would be advisable to clear cache after).php artisan voyager:install
(after Voyager vendor was installed using composer).database/migrations
, make your changes, turn off the config option database.autoload_migrations (full guidance for this step can be found in https://voyager-docs.devdojo.com/getting-started/installation#advanced).php artisan migrate
.Now you should end-up having the previous roles table (with previous and new Voyagers columns, and definitions), without affecting the Voyager's tables functionality :)