I use "fzaninotto/faker": "^1.5"
<?php
use Faker\Factory as Faker; use Illuminate\Database\Seeder; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB; use Gopro\Served;
class ServedTableSeeder extends Seeder {
public function run()
{
$faker = Faker::create();
foreach(range(1,20) as $index)
{
DB::table('server')->insert([
'name' => str_replace('.', '_', $faker->unique()->name),
'location' => $faker->city,
'happytyp_id' => $faker->biasedNumberBetween($min = 1, $max = 8, $function = 'sqrt'),
'operatingsystem' => $faker->randomElement($array = array ('Windows 8.1','Windows RT','Windows Server 2012','Windows 7', 'Windows Vista', 'Unix V7', 'AIX', 'A/UX', 'Solaris'),
'version' => strval($faker->numberBetween($min = 1, $max = 4))
]);
}
}
}
PHP Parse error:
parse error in /Gopro/database/seeds/ServeTableSeeder.php on line 22
And I get the following error: [Symfony\Component\Debug\Exception\FatalErrorException]
parse error
My models and my tables exist and my Databaseseeder.php has on top:
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Gopro\Typ;
use Gopro\Served;
I have done composer dump-autoload. Can someone help me?
I also noticed that there is both