| 123456789101112131415161718192021222324252627282930 |
- <?php
- namespace App\Http\Controllers;
- use App\Components\AsyncResponse;
- use App\Station;
- use Illuminate\Contracts\Foundation\Application;
- use Illuminate\Contracts\View\Factory;
- use Illuminate\Database\Eloquent\Builder;
- use Illuminate\View\View;
- class CacheShelfController extends Controller
- {
- use AsyncResponse;
- /**
- * 缓存货架
- * @return Application|Factory|View
- */
- public function index()
- {
- $stations = Station::query()->with('stationType:name', 'parent:name')->whereNull('parent_id')->whereIn('station_type_id', function ($query) {
- /** @var Builder $query */
- $query->from('station_types')->selectRaw('id')->where('name', '缓存架');
- })->paginate(10);
- return view('station.cachingShelf.list.index', compact('stations'));
- }
- }
|