Add new version in repository
This commit is contained in:
57
app/Http/Controllers/Admin/Botanic/GenreController.php
Normal file
57
app/Http/Controllers/Admin/Botanic/GenreController.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin\Botanic;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use App\Repositories\Botanic\Genres;
|
||||
use App\Repositories\Botanic\Families;
|
||||
use App\Datatables\Botanic\GenresDataTable;
|
||||
|
||||
class GenreController extends Controller
|
||||
{
|
||||
public function index(GenresDataTable $dataTable)
|
||||
{
|
||||
return $dataTable->render('Admin.Botanic.Genres.list');
|
||||
}
|
||||
|
||||
public function getDatatable(Request $request)
|
||||
{
|
||||
return Genres::getDataTable($request->all());
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$data['families'] = Families::getOptions();
|
||||
return view('Admin.Botanic.Genres.create', $data);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = Genres::store($request);
|
||||
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['genre'] = Genres::get($id);
|
||||
$data['families'] = Families::getOptions();
|
||||
return view('Admin.Botanic.Genres.edit', $data);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return Genres::destroy($id);
|
||||
}
|
||||
|
||||
public function exportExcel()
|
||||
{
|
||||
return Genres::exportExcel();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user