mohamednagy / Laravel-rating

Laravel package that allows you to rate, like & dislike and vote(+1,-1) your models with a simple and clear ways

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot declare class CreateLaravelRatingTable, because the name is already in use

malijani opened this issue · comments

After #27 ; and solving the problem when i run php artisan migrate I've got this error:

Symfony\Component\ErrorHandler\Error\FatalError

Cannot declare class CreateLaravelRatingTable, because the name is already in use

at database/migrations/2021_04_21_015322_create_ratings_table.php:7
3▕ use Illuminate\Database\Migrations\Migration;
4▕ use Illuminate\Database\Schema\Blueprint;
5▕ use Illuminate\Support\Facades\Schema;
6▕
➜ 7▕ class CreateLaravelRatingTable extends Migration
8▕ {
9▕ public function up()
10▕ {
11▕ Schema::create('ratings', function (Blueprint $table) {

Whoops\Exception\ErrorException

Cannot declare class CreateLaravelRatingTable, because the name is already in use

at database/migrations/2021_04_21_015322_create_ratings_table.php:7
3▕ use Illuminate\Database\Migrations\Migration;
4▕ use Illuminate\Database\Schema\Blueprint;
5▕ use Illuminate\Support\Facades\Schema;
6▕
➜ 7▕ class CreateLaravelRatingTable extends Migration
8▕ {
9▕ public function up()
10▕ {
11▕ Schema::create('ratings', function (Blueprint $table) {

  +1 vendor frames 

2 [internal]:0
Whoops\Run::handleShutdown()

The problem is : CreateLaravelRatingTable class name for create_ratings_table migration!

The solution is : change migration class name to CreateRatingsTable

Fixed in v2.2