cleaning day
This commit is contained in:
@@ -15,7 +15,7 @@ class FamilyController extends Controller
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('Admin.Botanic.Families.create', $data ?? []);
|
||||
return view('Admin.Botanic.Families.create');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
@@ -26,13 +26,6 @@ class FamilyController extends Controller
|
||||
return redirect()->route('Admin.Botanic.Families.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data = Families::get($id);
|
||||
|
||||
return view('Admin.Botanic.Families.view', $data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data['family'] = Families::get($id)->toArray();
|
||||
@@ -44,9 +37,4 @@ class FamilyController extends Controller
|
||||
{
|
||||
return Families::destroy($id);
|
||||
}
|
||||
|
||||
public function exportExcel()
|
||||
{
|
||||
return Families::exportExcel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,14 +14,9 @@ class GenreController extends Controller
|
||||
return $dataTable->render('Admin.Botanic.Genres.list');
|
||||
}
|
||||
|
||||
public function getDatatable(Request $request)
|
||||
{
|
||||
return Genres::getDataTable($request->all());
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$data['families'] = Families::getOptions();
|
||||
$data = Genres::init();
|
||||
|
||||
return view('Admin.Botanic.Genres.create', $data);
|
||||
}
|
||||
@@ -34,17 +29,10 @@ class GenreController extends Controller
|
||||
return redirect()->route('Admin.Botanic.Genres.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data['genre'] = Genres::get($id);
|
||||
|
||||
return view('Admin.Botanic.Genres.view', $data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data = Genres::init();
|
||||
$data['genre'] = Genres::get($id);
|
||||
$data['families'] = Families::getOptions();
|
||||
|
||||
return view('Admin.Botanic.Genres.edit', $data);
|
||||
}
|
||||
@@ -53,9 +41,4 @@ class GenreController extends Controller
|
||||
{
|
||||
return Genres::destroy($id);
|
||||
}
|
||||
|
||||
public function exportExcel()
|
||||
{
|
||||
return Genres::exportExcel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace App\Http\Controllers\Admin\Botanic;
|
||||
use App\Datatables\Botanic\SpeciesDataTable;
|
||||
use App\Repositories\Botanic\Genres;
|
||||
use App\Repositories\Botanic\Species;
|
||||
use App\Repositories\Shop\TagGroups;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class SpecieController extends Controller
|
||||
@@ -22,8 +21,7 @@ class SpecieController extends Controller
|
||||
|
||||
public function create()
|
||||
{
|
||||
$data['genres'] = Genres::getOptions();
|
||||
$data['tags_list'] = TagGroups::getTreeTags();
|
||||
$data = Genres::init();
|
||||
|
||||
return view('Admin.Botanic.Species.create', $data);
|
||||
}
|
||||
@@ -36,18 +34,10 @@ class SpecieController extends Controller
|
||||
return redirect()->route('Admin.Botanic.Species.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data = Species::get($id);
|
||||
|
||||
return view('Admin.Botanic.Species.view', $data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data = Genres::init();
|
||||
$data['specie'] = Species::getFull($id);
|
||||
$data['genres'] = Genres::getOptions();
|
||||
$data['tags_list'] = TagGroups::getTreeTags();
|
||||
|
||||
return view('Admin.Botanic.Species.edit', $data);
|
||||
}
|
||||
@@ -60,8 +50,10 @@ class SpecieController extends Controller
|
||||
public function getImages(Request $request, $id = false, $can_edit = true)
|
||||
{
|
||||
$id = $id ? $id : $request->input('id');
|
||||
$data['images'] = Species::getImages($id);
|
||||
$data['can_edit'] = $can_edit;
|
||||
$data = [
|
||||
'images' => Species::getImages($id),
|
||||
'can_edit' => $can_edit,
|
||||
];
|
||||
|
||||
return view('components.uploader.mini-gallery-items', $data);
|
||||
}
|
||||
@@ -73,9 +65,4 @@ class SpecieController extends Controller
|
||||
|
||||
return Species::deleteImage($id, $index);
|
||||
}
|
||||
|
||||
public function exportExcel()
|
||||
{
|
||||
return Species::exportExcel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,7 @@ class VarietyController extends Controller
|
||||
|
||||
public function create()
|
||||
{
|
||||
$data['species'] = Species::getOptions();
|
||||
$data['tags_list'] = TagGroups::getTreeTags();
|
||||
$data = Varieties::init();
|
||||
|
||||
return view('Admin.Botanic.Varieties.create', $data);
|
||||
}
|
||||
@@ -36,16 +35,10 @@ class VarietyController extends Controller
|
||||
return redirect()->route('Admin.Botanic.Varieties.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
return view('Admin.Botanic.Varieties.view', Varieties::get($id));
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data = Varieties::init();
|
||||
$data['variety'] = Varieties::getFull($id);
|
||||
$data['species'] = Species::getOptions();
|
||||
$data['tags_list'] = TagGroups::getTreeTags();
|
||||
|
||||
return view('Admin.Botanic.Varieties.edit', $data);
|
||||
}
|
||||
@@ -58,8 +51,10 @@ class VarietyController extends Controller
|
||||
public function getImages(Request $request, $id = false, $can_edit = true)
|
||||
{
|
||||
$id = $id ? $id : $request->input('id');
|
||||
$data['images'] = Varieties::getImages($id);
|
||||
$data['can_edit'] = $can_edit;
|
||||
$data = [
|
||||
'images' => Varieties::getImages($id),
|
||||
'can_edit' => $can_edit,
|
||||
];
|
||||
|
||||
return view('components.uploader.mini-gallery-items', $data);
|
||||
}
|
||||
@@ -71,9 +66,4 @@ class VarietyController extends Controller
|
||||
|
||||
return Varieties::deleteImage($id, $index);
|
||||
}
|
||||
|
||||
public function exportExcel()
|
||||
{
|
||||
return Varieties::exportExcel();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user