Closed kirkdm closed 6 years ago
the same problem
me too. I'm using laravel 5.5
No solution yet?!
I'm using laravel 5.5 too, solved it by switching 5.2.x-dev to dev-master.
composer remove zizaco/entrust
and then
composer require zizaco/entrust dev-master
me too
I'm having an error when seeding to the database using laravel 5.5 the error message is below and there is my users class and my seeder class. What is happening is that one record is being inserted at a time when calling db:seed but after the first call it says BadMethodException rest below
[BadMethodCallException] Call to undefined method App\User::create()
`<?php
namespace App;
use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; use Zizaco\Entrust\Traits\EntrustUserTrait; use Eloquent;
class User extends Eloquent { use EntrustUserTrait;
} `
`<?php
use App\User; use Faker\Factory as Faker; use Illuminate\Database\Seeder;
class UsersTableSeeder extends Seeder { /**
foreach (range(1, 100) as $index) { $faker = Faker::create(); $user = User::create([ 'name' => $faker->firstName . ' ' . $faker->lastName, 'email' => $faker->email, 'password' => bcrypt('secret') ]); } } } `