StationController.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Station;
  4. use Illuminate\Http\Request;
  5. class StationController extends Controller
  6. {
  7. /**
  8. * Display a listing of the resource.
  9. *
  10. * @return void
  11. */
  12. public function index()
  13. {
  14. }
  15. public function monitorIndex()
  16. {
  17. $stations = Station::query()->with('type:name','parent:name')->whereHas('type',function($query){
  18. $query->where('name','料箱监视器');
  19. })->paginate(100);
  20. return view('station.monitor.index',compact('stations'));
  21. }
  22. /**
  23. * Show the form for creating a new resource.
  24. *
  25. * @return \Illuminate\Http\Response
  26. */
  27. public function create()
  28. {
  29. //
  30. }
  31. /**
  32. * Store a newly created resource in storage.
  33. *
  34. * @param \Illuminate\Http\Request $request
  35. * @return \Illuminate\Http\Response
  36. */
  37. public function store(Request $request)
  38. {
  39. //
  40. }
  41. public function show(Station $station)
  42. {
  43. //
  44. }
  45. public function monitorShow(Station $station)
  46. {
  47. return view('station.monitor.show',compact('station'));
  48. }
  49. /**
  50. * Show the form for editing the specified resource.
  51. *
  52. * @param \App\Station $station
  53. * @return \Illuminate\Http\Response
  54. */
  55. public function edit(Station $station)
  56. {
  57. //
  58. }
  59. /**
  60. * Update the specified resource in storage.
  61. *
  62. * @param \Illuminate\Http\Request $request
  63. * @param \App\Station $station
  64. * @return \Illuminate\Http\Response
  65. */
  66. public function update(Request $request, Station $station)
  67. {
  68. //
  69. }
  70. /**
  71. * Remove the specified resource from storage.
  72. *
  73. * @param \App\Station $station
  74. * @return \Illuminate\Http\Response
  75. */
  76. public function destroy(Station $station)
  77. {
  78. //
  79. }
  80. }