JobController.php 1005 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace App\Http\Controllers\Mobile\DouyinRecruit;
  3. use App\Http\Controllers\Mobile\MobileBaseController;
  4. use App\Models\DouyinRecruit\CompanyEmployee;
  5. use App\Models\DouyinRecruit\CompanyJob;
  6. use App\Models\DouyinRecruit\CompanyRecruit;
  7. class JobController extends MobileBaseController
  8. {
  9. /**
  10. * 添加
  11. */
  12. public function add($id)
  13. {
  14. $emp = CompanyEmployee::where('id', $id)->first();
  15. if (empty($emp)) {
  16. return '';
  17. }
  18. $jobs = CompanyJob::where('company_id', $emp['company_id'])->orderBy('sort_index', 'asc')->get();
  19. return view('mobile.app.douyin_recruit.job_add', ['id' => $id, 'jobs' => $jobs, 'emp' => $emp, 'wap_title' => '求职信息']);
  20. }
  21. /**
  22. * 添加提交
  23. */
  24. public function addPost()
  25. {
  26. $post = request()->post();
  27. unset($post['_token']);
  28. $post['create_time'] = time();
  29. CompanyRecruit::create($post);
  30. return $this->sendSuccessResponse();
  31. }
  32. }