| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?php
- namespace App\Http\Controllers;
- use App\Station;
- use App\StationTypeBinMonitor;
- use Illuminate\Database\Eloquent\Builder;
- use Illuminate\Http\Request;
- class StationController extends Controller
- {
- /**
- * Display a listing of the resource.
- *
- * @return void
- */
- public function index()
- {
- }
- public function monitorIndex()
- {
- $stations = Station::query()->with('stationType:name','parent:name')->whereHas('stationType',function($query){
- /** @var Builder $query */
- $query->where('name','料箱监视器');
- })->paginate(100);
- return view('station.monitor.index',compact('stations'));
- }
- /**
- * Show the form for creating a new resource.
- *
- * @return \Illuminate\Http\Response
- */
- public function create()
- {
- //
- }
- /**
- * Store a newly created resource in storage.
- *
- * @param \Illuminate\Http\Request $request
- * @return \Illuminate\Http\Response
- */
- public function store(Request $request)
- {
- //
- }
- public function show(Station $station)
- {
- //
- }
- public function monitorShow(Station $station)
- {
- $wall = StationTypeBinMonitor::query()->where("station_id",$station->id)->first();
- if (!$wall)$wall = factory(StationTypeBinMonitor::class)->make(StationTypeBinMonitor::$default);
- return view('station.monitor.show',compact('station',"wall"));
- }
- /**
- * Show the form for editing the specified resource.
- *
- * @param \App\Station $station
- * @return \Illuminate\Http\Response
- */
- public function edit(Station $station)
- {
- //
- }
- /**
- * Update the specified resource in storage.
- *
- * @param \Illuminate\Http\Request $request
- * @param \App\Station $station
- * @return \Illuminate\Http\Response
- */
- public function update(Request $request, Station $station)
- {
- //
- }
- /**
- * Remove the specified resource from storage.
- *
- * @param \App\Station $station
- * @return \Illuminate\Http\Response
- */
- public function destroy(Station $station)
- {
- //
- }
- }
|