Examples of code I've written in PHP, Javascript, SCSS, etc.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

301 行
6.0 KiB

  1. <?php
  2. namespace App\Console\Commands;
  3. use Illuminate\Console\Command;
  4. use Illuminate\Support\Facades\Http;
  5. use App\Models\Service;
  6. use App\Http\Controllers\Supply;
  7. class ServicesInit extends Command
  8. {
  9. /**
  10. * The name and signature of the console command.
  11. *
  12. * @var string
  13. */
  14. protected $signature = 'services:init';
  15. /**
  16. * The console command description.
  17. *
  18. * @var string
  19. */
  20. protected $description = 'Generate inital services';
  21. /**
  22. * Create a new command instance.
  23. *
  24. * @return void
  25. */
  26. public function __construct()
  27. {
  28. parent::__construct();
  29. }
  30. public function handle() {
  31. $this->youtube();
  32. $this->tiktok();
  33. $this->instagram();
  34. $this->twitter();
  35. }
  36. protected function youtube() {
  37. $s = new Service;
  38. $s->name = 'Unique Views';
  39. $s->type = 'views';
  40. $s->site = 'youtube';
  41. $s->maximum = 500000;
  42. $s->minimum = 1000;
  43. $s->price = 750;
  44. $s->available = true;
  45. $s->save();
  46. $sup = Supply::smmworld( $s->id, 418);
  47. $s->primary_supplier = $sup->id;
  48. $s->save();
  49. /*
  50. $s = new Service;
  51. $s->name = 'Language Targeted Views';
  52. $s->type = 'views';
  53. $s->site = 'youtube';
  54. $s->modifier = 'language';
  55. $s->maximum = 100000;
  56. $s->minimum = 1000;
  57. $s->price = 600;
  58. $s->available = true;
  59. $s->note = '{language: {
  60. french: 2974, spanish: 2975, german: 2976,
  61. }}';
  62. $s->save();
  63. $s = new Service;
  64. $s->name = 'Location Targeted Views';
  65. $s->site = 'youtube';
  66. $s->modifier = 'location';
  67. $s->maximum = 100000;
  68. $s->minimum = 1000;
  69. $s->price = 650;
  70. $s->note = '{locations: {
  71. india: 2600, brazil: 2597, colombia: 2608, philippines: 2609, mexico:
  72. 2673, netherlands: 2771, russia: 2772, spain: 2773, hongkong: 3065,
  73. israel: 3119, }}';
  74. $s->available = true;
  75. $s->description = 'Real impressionss and profile visits';
  76. $s->save();
  77. */
  78. $s = new Service;
  79. $s->name = 'Likes';
  80. $s->site = 'youtube';
  81. $s->maximum = 100000;
  82. $s->minimum = 50;
  83. $s->price = 850;
  84. $s->available = true;
  85. $s->save();
  86. $sup = Supply::smmworld($s->id, 385);
  87. $s->primary_supplier = $sup->id;
  88. $s->save();
  89. $s = new Service;
  90. $s->name = 'Comments';
  91. $s->site = 'youtube';
  92. $s->maximum = 500000;
  93. $s->minimum = 10;
  94. $s->price = 7500;
  95. $s->available = true;
  96. $s->save();
  97. $sup = Supply::smmkings($s->id, 3726);
  98. $s->primary_supplier = $sup->id;
  99. $s->save();
  100. }
  101. protected function instagram() {
  102. $s = new Service;
  103. $s->name = 'Likes with Profile Visits';
  104. $s->type = 'likes';
  105. $s->site = 'instagram';
  106. $s->maximum = 500000;
  107. $s->minimum = 1000;
  108. $s->price = 700;
  109. $s->available = true;
  110. $s->save();
  111. $sup = Supply::smmkings($s->id, 2997);
  112. $s->primary_supplier = $sup->id;
  113. $s->save();
  114. $s = new Service;
  115. $s->name = 'Likes';
  116. $s->type = 'likes';
  117. $s->site = 'instagram';
  118. $s->maximum = 50000;
  119. $s->minimum = 100;
  120. $s->price = 50;
  121. $s->available = true;
  122. $s->save();
  123. $sup = Supply::smmkings($s->id, 3775);
  124. $s->primary_supplier = $sup->id;
  125. $s->save();
  126. $s = new Service;
  127. $s->name = 'Post Impressions';
  128. $s->type = 'impressions';
  129. $s->site = 'instagram';
  130. $s->maximum = 1000000;
  131. $s->minimum = 100;
  132. $s->price = 100;
  133. $s->available = true;
  134. $s->description = 'Post impressions and visits';
  135. $s->save();
  136. $sup = Supply::smmkings($s->id, 618);
  137. $s->primary_supplier = $sup->id;
  138. $s->save();
  139. $s = new Service;
  140. $s->name = 'Profile Visits';
  141. $s->type = 'profile';
  142. $s->site = 'instagram';
  143. $s->maximum = 500000;
  144. $s->minimum = 100;
  145. $s->price = 100;
  146. $s->available = true;
  147. $s->save();
  148. $sup = Supply::smmkings($s->id, 2997);
  149. $s->primary_supplier = $sup->id;
  150. $s->save();
  151. $s = new Service;
  152. $s->name = 'Post Views';
  153. $s->type = 'views';
  154. $s->site = 'instagram';
  155. $s->maximum = 10000000;
  156. $s->minimum = 100;
  157. $s->price = 50;
  158. $s->available = true;
  159. $s->save();
  160. $sup = Supply::smmkings($s->id, 2840);
  161. $s->primary_supplier = $sup->id;
  162. $s->save();
  163. $s = new Service;
  164. $s->name = 'Followers';
  165. $s->type = 'followers';
  166. $s->site = 'instagram';
  167. $s->maximum = 100000;
  168. $s->minimum = 10;
  169. $s->price = 410;
  170. $s->available = true;
  171. $s->save();
  172. $sup = Supply::smmkings($s->id, 3882);
  173. $s->primary_supplier = $sup->id;
  174. $s->save();
  175. }
  176. protected function twitter() {
  177. $s = new Service;
  178. $s->name = 'Video Views';
  179. $s->type = 'views';
  180. $s->site = 'twitter';
  181. $s->maximum = 1000000;
  182. $s->minimum = 100;
  183. $s->price = 90;
  184. $s->available = true;
  185. $s->save();
  186. $sup = Supply::smmkings($s->id, 287);
  187. $s->primary_supplier = $sup->id;
  188. $s->save();
  189. $s = new Service;
  190. $s->name = 'Impressions';
  191. $s->type = 'impressions';
  192. $s->site = 'twitter';
  193. $s->maximum = 1000000;
  194. $s->minimum = 100;
  195. $s->price = 700;
  196. $s->available = true;
  197. $s->save();
  198. $sup = Supply::smmkings($s->id, 288);
  199. $s->primary_supplier = $sup->id;
  200. $s->save();
  201. $s = new Service;
  202. $s->name = 'Followers';
  203. $s->type = 'followers';
  204. $s->site = 'twitter';
  205. $s->maximum = 10000;
  206. $s->minimum = 10;
  207. $s->price = 600;
  208. $s->available = true;
  209. $s->save();
  210. $sup = Supply::smmkings($s->id, 3820);
  211. $s->primary_supplier = $sup->id;
  212. $s->save();
  213. }
  214. protected function tiktok() {
  215. $s = new Service;
  216. $s->name = 'Views';
  217. $s->type = 'views';
  218. $s->site = 'tiktok';
  219. $s->maximum = 10000000;
  220. $s->minimum = 100;
  221. $s->price = 70;
  222. $s->available = true;
  223. $s->save();
  224. $sup = Supply::smmkings($s->id, 3826);
  225. $s->primary_supplier = $sup->id;
  226. $s->save();
  227. $s = new Service;
  228. $s->name = 'Likes';
  229. $s->type = 'likes';
  230. $s->site = 'tiktok';
  231. $s->maximum = 100000;
  232. $s->minimum = 100;
  233. $s->price = 400;
  234. $s->available = true;
  235. $s->save();
  236. $sup = Supply::smmkings($s->id, 3935);
  237. $s->primary_supplier = $sup->id;
  238. $s->save();
  239. $s = new Service;
  240. $s->name = 'Followers';
  241. $s->type = 'followers';
  242. $s->site = 'tiktok';
  243. $s->maximum = 100000;
  244. $s->minimum = 20;
  245. $s->price = 300;
  246. $s->available = true;
  247. $s->save();
  248. $sup = Supply::smmkings($s->id, 3934);
  249. $s->primary_supplier = $sup->id;
  250. $s->save();
  251. }
  252. }