Add thumbs views in datatables with traits
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace App\Repositories\Botanic;
|
||||
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
@@ -11,9 +9,11 @@ use Maatwebsite\Excel\Facades\Excel;
|
||||
use App\Repositories\Core\Tag;
|
||||
use App\Models\Botanic\Specie;
|
||||
use App\Exports\Botanic\SpeciesExport;
|
||||
use App\Traits\Repository\Imageable;
|
||||
|
||||
class Species
|
||||
{
|
||||
use Imageable;
|
||||
|
||||
public static function getOptions()
|
||||
{
|
||||
@@ -96,21 +96,6 @@ class Species
|
||||
return Tag::storeTags($specie, $tags);
|
||||
}
|
||||
|
||||
public static function storeImages($specie, $files)
|
||||
{
|
||||
return Media::storeImages($specie, $files);
|
||||
}
|
||||
|
||||
public static function getImages($id)
|
||||
{
|
||||
return Media::getImages(self::get($id));
|
||||
}
|
||||
|
||||
public static function deleteImage($id, $index)
|
||||
{
|
||||
return Media::deleteImage(self::get($id), $index);
|
||||
}
|
||||
|
||||
public static function exportExcel()
|
||||
{
|
||||
return Excel::download(new SpeciesExport, 'species.xlsx');
|
||||
|
||||
Reference in New Issue
Block a user