1 | <?php |
||
8 | class BantenprovProdiSekolahSeeder extends Seeder |
||
|
|||
9 | { |
||
10 | /* text color */ |
||
11 | protected $RED ="\033[0;31m"; |
||
12 | protected $CYAN ="\033[0;36m"; |
||
13 | protected $YELLOW ="\033[1;33m"; |
||
14 | protected $ORANGE ="\033[0;33m"; |
||
15 | protected $PUR ="\033[0;35m"; |
||
16 | protected $GRN ="\e[32m"; |
||
17 | protected $WHI ="\e[37m"; |
||
18 | protected $NC ="\033[0m"; |
||
19 | /* File name */ |
||
20 | /* location : /databse/seeds/file_name.csv */ |
||
21 | protected $fileName = "BantenprovProdiSekolahSeeder.csv"; |
||
22 | /* text info : default (true) */ |
||
23 | protected $textInfo = true; |
||
24 | /* model class */ |
||
25 | protected $model; |
||
26 | /* __construct */ |
||
27 | public function __construct(){ |
||
30 | /** |
||
31 | * Run the database seeds. |
||
32 | * |
||
33 | * @return void |
||
34 | */ |
||
35 | public function run() |
||
39 | /* function insert data */ |
||
40 | protected function insertData() |
||
78 | /* text color: orange */ |
||
79 | protected function orangeText($text) |
||
83 | /* text color: green */ |
||
84 | protected function greenText($text) |
||
88 | /* function read CSV file */ |
||
89 | protected function readCSV() |
||
104 | } |
||
105 |
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.