1 | <?php |
||
8 | class BantenprovProgramKeahlianSeederProgramKeahlian 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 = "BantenprovProgramKeahlianSeederProgramKeahlian.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() |
||
81 | /* text color: orange */ |
||
82 | protected function orangeText($text) |
||
86 | /* text color: green */ |
||
87 | protected function greenText($text) |
||
91 | /* function read CSV file */ |
||
92 | protected function readCSV() |
||
108 | } |
||
109 |
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.