cleaning day
This commit is contained in:
@@ -2,20 +2,13 @@
|
||||
|
||||
namespace App\Repositories\Botanic;
|
||||
|
||||
use App\Exports\Botanic\FamiliesExport;
|
||||
use App\Models\Botanic\Family;
|
||||
use App\Traits\Model\Basic;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
class Families
|
||||
{
|
||||
use Basic;
|
||||
|
||||
public static function exportExcel()
|
||||
{
|
||||
return Excel::download(new FamiliesExport(), 'families.xlsx');
|
||||
}
|
||||
|
||||
public static function getModel()
|
||||
{
|
||||
return Family::query();
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
|
||||
namespace App\Repositories\Botanic;
|
||||
|
||||
use App\Exports\Botanic\GenresExport;
|
||||
use App\Models\Botanic\Genre;
|
||||
use App\Traits\Model\Basic;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
class Genres
|
||||
{
|
||||
use Basic;
|
||||
|
||||
public static function exportExcel()
|
||||
public static function init()
|
||||
{
|
||||
return Excel::download(new GenresExport(), 'genres.xlsx');
|
||||
return [
|
||||
'families' => Families::getOptions(),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public static function getModel()
|
||||
{
|
||||
return Genre::query();
|
||||
|
||||
@@ -2,17 +2,24 @@
|
||||
|
||||
namespace App\Repositories\Botanic;
|
||||
|
||||
use App\Exports\Botanic\SpeciesExport;
|
||||
use App\Models\Botanic\Specie;
|
||||
use App\Repositories\Core\Tag;
|
||||
use App\Repositories\Shop\TagGroups;
|
||||
use App\Traits\Model\Basic;
|
||||
use App\Traits\Repository\Imageable;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
class Species
|
||||
{
|
||||
use Basic, Imageable;
|
||||
|
||||
public static function init()
|
||||
{
|
||||
return [
|
||||
'genres' => Genres::getOptions(),
|
||||
'tags_list' => TagGroups::getTreeTags(),
|
||||
];
|
||||
|
||||
}
|
||||
public static function getDescription($id)
|
||||
{
|
||||
return self::get($id)->description ?? '';
|
||||
@@ -62,11 +69,6 @@ class Species
|
||||
return Tag::storeTags($specie, $tags);
|
||||
}
|
||||
|
||||
public static function exportExcel()
|
||||
{
|
||||
return Excel::download(new SpeciesExport(), 'species.xlsx');
|
||||
}
|
||||
|
||||
public static function getModel()
|
||||
{
|
||||
return Specie::query();
|
||||
|
||||
@@ -2,17 +2,23 @@
|
||||
|
||||
namespace App\Repositories\Botanic;
|
||||
|
||||
use App\Exports\Botanic\VarietiesExport;
|
||||
use App\Models\Botanic\Variety;
|
||||
use App\Repositories\Core\Tag;
|
||||
use App\Traits\Model\Basic;
|
||||
use App\Traits\Repository\Imageable;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
class Varieties
|
||||
{
|
||||
use Basic, Imageable;
|
||||
|
||||
public static function init()
|
||||
{
|
||||
return [
|
||||
'species' => Species::getOptions(),
|
||||
'tags_list' => TagGroups::getTreeTags(),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getOptionsWithSpecie()
|
||||
{
|
||||
$varieties = Variety::with('specie')->get();
|
||||
@@ -72,11 +78,6 @@ class Varieties
|
||||
return Tag::storeTags($variety, $tags);
|
||||
}
|
||||
|
||||
public static function exportExcel()
|
||||
{
|
||||
return Excel::download(new VarietiesExport(), 'varieties.xlsx');
|
||||
}
|
||||
|
||||
public static function getModel()
|
||||
{
|
||||
return Variety::query();
|
||||
|
||||
Reference in New Issue
Block a user