Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace Error #89

Open
itischarles opened this issue Jan 30, 2024 · 0 comments
Open

Namespace Error #89

itischarles opened this issue Jan 30, 2024 · 0 comments

Comments

@itischarles
Copy link

I am running laravel 10. the plugin works pefect with my workbench installed on ubuntu. The migration export works great as i have the ability to export to folder - i exported directly into the laravel project's migration folder.

however, the php files created has namespace specified. see example below:

`<?php

namespace Database\Migrations;

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
`

now when i run

php artisan migrate

i get the following exception

` Whoops\Exception\ErrorException

Cannot declare class Database\Migrations\CreateCountriesTable, because the name is already in use

at database/migrations/2024_01_30_01_create_countries_table.php:9
5▕ use Illuminate\Support\Facades\Schema;
6▕ use Illuminate\Database\Schema\Blueprint;
7▕ use Illuminate\Database\Migrations\Migration;
8▕
➜ 9▕ class CreateCountriesTable extends Migration
10▕ {
11▕ /**
12▕ * Schema table name to migrate
13▕ * @var string
`
the migration php artisan command runs successfully when i remove the namespace definition from the file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant