for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Illuminate\Database\Seeder;
class QuestionsTableSeeder 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.
{
private $table = 'quiz_questions';
/**
* Run the database seeds.
*
* @return void
*/
public function run()
DB::table($this->table)->truncate();
DB::table($this->table)->insert([
[
'quiz_id' => 1,
'question' => 'Which one of these isn\'t a data structure?'
],
'quiz_id' => 2,
'question' => 'Which one of the following is a set of natural numbers?'
'quiz_id' => 3,
'question' => 'Which one of the following is a colour of the rainbow?'
'quiz_id' => 4,
'question' => 'Will Claudia gives us a good mark?'
'question' => 'When was Github created?'
'question' => 'Are we the best INSE group?'
]
]);
}
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.