rename models and associates, isolate botanic with shop
This commit is contained in:
52
app/Http/Controllers/Botanic/Admin/FamilyController.php
Normal file
52
app/Http/Controllers/Botanic/Admin/FamilyController.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Botanic\Admin;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Botanic\Families;
|
||||
use App\DataTables\FamiliesDataTable;
|
||||
|
||||
class FamilyController extends Controller
|
||||
{
|
||||
|
||||
public function index(FamiliesDataTable $dataTable)
|
||||
{
|
||||
return $dataTable->render('Botanic.Admin.Families.list');
|
||||
}
|
||||
|
||||
public function getDatatable(Request $request)
|
||||
{
|
||||
return Families::getTables($request->all());
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$data = [];
|
||||
return view('Botanic.Admin.Families.create', $data);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = Families::store($request);
|
||||
return redirect()->route('Botanic.Admin.Families.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data = Families::get($id);
|
||||
return view('Botanic.Admin.Families.view', $data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data['family'] = Families::get($id)->toArray();
|
||||
return view('Botanic.Admin.Families.edit', $data);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return Families::destroy($id);
|
||||
}
|
||||
}
|
||||
52
app/Http/Controllers/Botanic/Admin/GenreController.php
Normal file
52
app/Http/Controllers/Botanic/Admin/GenreController.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Botanic\Admin;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Botanic\Genres;
|
||||
use App\Repositories\Botanic\Families;
|
||||
use App\DataTables\GenresDataTable;
|
||||
|
||||
class GenreController extends Controller
|
||||
{
|
||||
public function index(GenresDataTable $dataTable)
|
||||
{
|
||||
return $dataTable->render('Botanic.Admin.Genres.list');
|
||||
}
|
||||
|
||||
public function getDatatable(Request $request)
|
||||
{
|
||||
return Genres::getDataTable($request->all());
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('Botanic.Admin.Genres.create');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = Genres::store($request);
|
||||
return redirect()->route('Botanic.Admin.Genres.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data = Genres::get($id);
|
||||
return view('Botanic.Admin.Genres.view', $data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data = Genres::get($id);
|
||||
$data['families'] = Families::getOptions();
|
||||
return view('Botanic.Admin.Genres.edit', $data);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return Genres::destroy($id);
|
||||
}
|
||||
}
|
||||
53
app/Http/Controllers/Botanic/Admin/SpecieController.php
Normal file
53
app/Http/Controllers/Botanic/Admin/SpecieController.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Botanic\Admin;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Botanic\Species;
|
||||
use App\Repositories\Botanic\Genres;
|
||||
use App\DataTables\SpeciesDataTable;
|
||||
|
||||
class SpecieController extends Controller
|
||||
{
|
||||
public function index(SpeciesDataTable $dataTable)
|
||||
{
|
||||
return $dataTable->render('Botanic.Admin.Species.list');
|
||||
}
|
||||
|
||||
public function getDatatable(Request $request)
|
||||
{
|
||||
return Species::getDatatable($request->all());
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('Botanic.Admin.Species.create');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = Species::store($request);
|
||||
return redirect()->route('Botanic.Admin.Species.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data = Species::get($id);
|
||||
return view('Botanic.Admin.Species.view', $data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data = Species::get($id);
|
||||
$data['genres'] = Genres::getOptions();
|
||||
return view('Botanic.Admin.Species.edit', $data);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return Species::destroy($id);
|
||||
}
|
||||
|
||||
}
|
||||
53
app/Http/Controllers/Botanic/Admin/VarietyController.php
Normal file
53
app/Http/Controllers/Botanic/Admin/VarietyController.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Botanic\Admin;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Botanic\Varieties;
|
||||
use App\Repositories\Botanic\Species;
|
||||
use App\DataTables\VarietiesDataTable;
|
||||
|
||||
class VarietyController extends Controller
|
||||
{
|
||||
public function index(VarietiesDataTable $dataTable)
|
||||
{
|
||||
return $dataTable->render('Botanic.Admin.Varieties.list');
|
||||
}
|
||||
|
||||
public function getDatatable(Request $request)
|
||||
{
|
||||
return Varieties::getDatatable($request->all());
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('Botanic.Admin.Varieties.create');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = Varieties::store($request);
|
||||
return redirect()->route('Botanic.Admin.Varieties.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data = Varieties::get($id);
|
||||
return view('Botanic.Admin.Varieties.view', $data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data = Varieties::get($id);
|
||||
$data['species'] = Species::getOptions();
|
||||
return view('Botanic.Admin.Varieties.edit', $data);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return Varieties::destroy($id);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user