<?php namespace Tps\Shops\Controllers;

use Backend\Classes\Controller;
use BackendMenu;
use Illuminate\Http\Request;
use Tps\Shops\Models\Shop;

class Shops extends Controller
{
    public $implement = ['Backend\Behaviors\ListController','Backend\Behaviors\FormController'];
    
    public $listConfig = 'config_list.yaml';
    public $formConfig = 'config_form.yaml';

    public function __construct()
    {
        parent::__construct();
        BackendMenu::setContext('Tps.Shops', 'main-menu-item');
    }

    public function updateShop(Request $request){
        Shop::where("id",$request->id)->first()->update($request->all());

        return redirect()->back();
    }

}
