1 | <?php |
||
12 | class BantenprovUserSeeder extends Seeder |
||
|
|||
13 | { |
||
14 | /* text color */ |
||
15 | protected $RED ="\033[0;31m"; |
||
16 | protected $CYAN ="\033[0;36m"; |
||
17 | protected $YELLOW ="\033[1;33m"; |
||
18 | protected $ORANGE ="\033[0;33m"; |
||
19 | protected $PUR ="\033[0;35m"; |
||
20 | protected $GRN ="\e[32m"; |
||
21 | protected $WHI ="\e[37m"; |
||
22 | protected $NC ="\033[0m"; |
||
23 | |||
24 | /* File name */ |
||
25 | /* location : /databse/seeds/file_name.csv */ |
||
26 | protected $fileName = "BantenprovUserSeeder.csv"; |
||
27 | |||
28 | /* text info : default (true) */ |
||
29 | protected $textInfo = true; |
||
30 | |||
31 | /* model class */ |
||
32 | protected $model; |
||
33 | |||
34 | /* __construct */ |
||
35 | public function __construct(){ |
||
40 | |||
41 | /** |
||
42 | * Run the database seeds. |
||
43 | * |
||
44 | * @return void |
||
45 | */ |
||
46 | public function run() |
||
50 | |||
51 | /* function insert data */ |
||
52 | protected function insertData() |
||
99 | |||
100 | /* text color: orange */ |
||
101 | protected function orangeText($text) |
||
105 | |||
106 | /* text color: green */ |
||
107 | protected function greenText($text) |
||
111 | |||
112 | /* function read CSV file */ |
||
113 | protected function readCSV() |
||
126 | } |
||
127 |
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.