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

Bug: Cannot access offset of type string on string #6

Open
gerardp opened this issue Jan 28, 2023 · 1 comment
Open

Bug: Cannot access offset of type string on string #6

gerardp opened this issue Jan 28, 2023 · 1 comment

Comments

@gerardp
Copy link
Contributor

gerardp commented Jan 28, 2023

php artisan crud:generate workhours

        Schema::create('workhours', function (Blueprint $table) {
            $table->id();
            $table->time('start');
            $table->time('end');
        });

php artisan crud:generate workhours
error: Cannot access offset of type string on string

But if i add a string field, works perfect.

        Schema::create('workhours', function (Blueprint $table) {
            $table->id();
            $table->time('start');
            $table->time('end');
            $table->string('title')->nullable();
        });
@GuttoSP
Copy link

GuttoSP commented Apr 11, 2023

Maybe you already found the solution, but for other users, in case anyone else faces the problem, my solution was as follows:
I changed this line: return $key ? $result[$key] : $result; for return $result; in file vendor\san-kumar\laravel-crud\src\Utils\SchemaUtils.php, line 79

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

2 participants