Fixes on categories

This commit is contained in:
Ludovic CANDELLIER
2020-06-28 23:37:45 +02:00
parent 1830ea45cf
commit 3386f6ee1a
6 changed files with 87 additions and 91 deletions

View File

@@ -1,87 +0,0 @@
<?php
namespace App\Http\Controllers\Shop\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Repositories\Shop\CategoryProducts;
class CategoryProductController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/**
* 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)
{
//
}
/**
* Display the specified resource.
*
* @param \App\CategoryProduct $categoryProduct
* @return \Illuminate\Http\Response
*/
public function show(CategoryProduct $categoryProduct)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param \App\CategoryProduct $categoryProduct
* @return \Illuminate\Http\Response
*/
public function edit(CategoryProduct $categoryProduct)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\CategoryProduct $categoryProduct
* @return \Illuminate\Http\Response
*/
public function update(Request $request, CategoryProduct $categoryProduct)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param \App\CategoryProduct $categoryProduct
* @return \Illuminate\Http\Response
*/
public function destroy(CategoryProduct $categoryProduct)
{
//
}
}

View File

@@ -57,4 +57,19 @@ class CategoryController extends Controller
{
return Categories::destroy($id);
}
public function getImages(Request $request, $id = false)
{
$id = $id ? $id : $request->input('id');
$data['images'] = Categories::getImages($id);
return view('components.uploader.mini-gallery-items', $data);
}
public function deleteImage(Request $request)
{
$id = $request->input('id');
$index = $request->input('index');
return Categories::deleteImage($id, $index);
}
}