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