<?php

namespace App\Http\Controllers\Web;

use App\Model\MediaCategoryModel;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class MediaCategoryController extends Controller
{
    public function index(Request $request){

        $result = handler_drive(function () use ($request) {


            $catgList = MediaCategoryModel::catgListPage($request);
            return $catgList;
        });
        $data['name'] = $request->name;
        $data['media_categories'] = $result;

        return view('admin.media_category.list',$data);
    }


    /**
     * 会员添加
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     * @throws ControllerException
     */
    public function create()
    {
        return view('admin.media_category.add');
    }


}
