for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Xoco70\LaravelTournaments\DBHelpers;
class LaravelTournamentSeeder extends Seeder
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
public function run()
Model::unguard();
$this->command->info('Seeding...');
DBHelpers::setFKCheckOff();
DB::table('competitor')->truncate();
DB::table('tournament')->truncate();
DB::table('category')->truncate();
DB::table('users')->truncate();
DB::table('venue')->truncate();
$this->call(VenueSeeder::class);
$this->call(CategorySeeder::class);
$this->call(TournamentSeeder::class);
$this->call(CompetitorSeeder::class);
$this->command->info('All tables seeded!');
DBHelpers::setFKCheckOn();
Model::reguard();
}
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.