Berkarar/plugins/tps/shops/controllers/Shops.php

28 lines
799 B
PHP
Raw Normal View History

2022-08-28 19:50:26 +00:00
<?php namespace Tps\Shops\Controllers;
use Backend\Classes\Controller;
use BackendMenu;
2022-09-13 14:01:10 +00:00
use Illuminate\Http\Request;
use Tps\Shops\Models\Shop;
2022-08-28 19:50:26 +00:00
class Shops extends Controller
{
public $implement = [ 'Backend\Behaviors\ListController', 'Backend\Behaviors\FormController', 'Backend\Behaviors\ReorderController' ];
public $listConfig = 'config_list.yaml';
public $formConfig = 'config_form.yaml';
public $reorderConfig = 'config_reorder.yaml';
public function __construct()
{
parent::__construct();
BackendMenu::setContext('Tps.Shops', 'main-menu-item');
}
2022-09-13 14:01:10 +00:00
public function updateShop(Request $request){
Shop::where("id",$request->id)->first()->update($request->all());
return redirect()->back();
}
2022-08-28 19:50:26 +00:00
}