cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Undefined method defaultStringLength()

Hi,
i want to use Vinelab/Neoeloquent package with laravel project. Earlier, i used MySql for storing my data. Now I want to use neo4j for that purpose.
I added "vinelab/neoeloquent":"1.4.7" in composer.json , in database.php
'default' => env('DB_CONNECTION','neo4j') , in connection array
'neo4j' => [
'driver' => 'neo4j',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '7474'),
'username' => env('DB_USERNAME', 'neo4j'),
'password' => env('DB_PASSWORD', 'neo4j')
]
and in app.php 'Vinelab\NeoEloquent\NeoEloquentServiceProvider'.

After that, composer was updated successfully.
Furthermore,i changed .env from my previous conifguration for MySQL to one for neo4j
DB_CONNECTION=neo4j
DB_HOST=127.0.0.1
DB_PORT=7474
DB_DATABASE=neo4j
DB_USERNAME=neo4j
DB_PASSWORD=neo4j
After all that,i got some issues:
1.It wont recognize function label in migration file
public function up()
{
Neo4jSchema::label('User', function(Blueprint $label) {
$label->unique('email');
$label->index('name');
});
}
2.Even with that problem,when i try to migrate i got the following problem
In Facade.php line 223:

Call to undefined method Vinelab\NeoEloquent\Schema\Builder::defaultStringLength()
Keep in mind that after i changed .env file i couldnt update composer and got the same error

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover

In Facade.php line 223:

Call to undefined method Vinelab\NeoEloquent\Schema\Builder::defaultStringLength()

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
Failed to update packages for ./composer.json.

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online