[WIP] Add some features, categories, articles
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\Models\Shop\Family;
|
||||
use App\Models\Shop\Genre;
|
||||
use App\Models\Shop\Specie;
|
||||
use App\Models\Shop\Variety;
|
||||
use App\Models\Botanic\Family;
|
||||
use App\Models\Botanic\Genre;
|
||||
use App\Models\Botanic\Specie;
|
||||
use App\Models\Botanic\Variety;
|
||||
|
||||
class migrate extends Command
|
||||
{
|
||||
@@ -41,6 +41,18 @@ class migrate extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$species = Specie::all();
|
||||
foreach ($species as $specie) {
|
||||
$specie->name = trim($specie->name);
|
||||
$specie->save();
|
||||
}
|
||||
|
||||
$varieties = Variety::all();
|
||||
foreach ($varieties as $variety) {
|
||||
$variety->name = trim($variety->name);
|
||||
$variety->save();
|
||||
}
|
||||
|
||||
/*
|
||||
$varieties = Variety::all();
|
||||
foreach ($varieties as $variety) {
|
||||
@@ -61,6 +73,7 @@ class migrate extends Command
|
||||
}
|
||||
}
|
||||
*/
|
||||
/*
|
||||
$species = Specie::all();
|
||||
foreach ($species as $specie) {
|
||||
$genre_name = $specie->genre;
|
||||
@@ -79,7 +92,7 @@ class migrate extends Command
|
||||
dump("Aucun genre");
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
/*
|
||||
$genres = Genre::all();
|
||||
foreach ($genres as $genre) {
|
||||
|
||||
Reference in New Issue
Block a user