/** * Run the database seeds. * * @return void */ public function run() { Eloquent::unguard(); // 1 Statussocial DB::table('statussocials')->delete(); Statussocial::create(array('libelle' => 'Privé')); Statussocial::create(array('libelle' => 'Indépendant')); Statussocial::create(array('libelle' => 'Société')); // 2 Langue DB::table('langues')->delete(); Langue::create(array('libelle' => 'fr')); Langue::create(array('libelle' => 'en')); Langue::create(array('libelle' => 'nl')); // 3 Sexe DB::table('sexes')->delete(); Sexe::create(array('libelle' => 'Messieurs')); Sexe::create(array('libelle' => 'Dames')); // 4 Genre Compet DB::table('genrecompets')->delete(); Genrecompet::create(array('libelle' => 'Public')); Genrecompet::create(array('libelle' => 'Invitations')); Genrecompet::create(array('libelle' => 'Membres')); // 5 Type Compet DB::table('typecompets')->delete(); Typecompet::create(array('libelle' => '---', 'nbplayers' => 0)); Typecompet::create(array('libelle' => 'Individuel', 'nbplayers' => 1)); Typecompet::create(array('libelle' => 'Equipe 2 joueurs', 'nbplayers' => 2)); Typecompet::create(array('libelle' => 'Equipe 3 joueurs', 'nbplayers' => 3)); Typecompet::create(array('libelle' => 'Equipe 4 joueurs', 'nbplayers' => 4)); // 6 Mode Compet DB::table('modecompets')->delete(); Modecompet::create(array('libelle' => 'Stroke-Play', 'abreviation' => 'Stp')); Modecompet::create(array('libelle' => 'Stabelford', 'abreviation' => 'Stb')); Modecompet::create(array('libelle' => 'Match-Play', 'abreviation' => 'Mp')); // 7 Status Compet DB::table('statuscompets')->delete(); Statuscompet::create(array('libelle' => 'Création')); Statuscompet::create(array('libelle' => 'Inscriptions ouvertes')); Statuscompet::create(array('libelle' => 'Inscriptions fermées')); Statuscompet::create(array('libelle' => 'En cours')); Statuscompet::create(array('libelle' => 'Cloturée')); Statuscompet::create(array('libelle' => 'Annulée')); // 8 Formule Compet DB::table('formulecompets')->delete(); Formulecompet::create(array('libelle' => '---', 'nbplayers' => 0, 'nbscores' => 0)); Formulecompet::create(array('libelle' => 'Single', 'nbplayers' => 1, 'nbscores' => 1)); Formulecompet::create(array('libelle' => '4 BBB', 'nbplayers' => 2, 'nbscores' => 2)); Formulecompet::create(array('libelle' => 'Foursome', 'nbplayers' => 2, 'nbscores' => 1)); Formulecompet::create(array('libelle' => 'Greensome', 'nbplayers' => 2, 'nbscores' => 1)); Formulecompet::create(array('libelle' => 'Chapman', 'nbplayers' => 2, 'nbscores' => 1)); Formulecompet::create(array('libelle' => 'Scramble à 2', 'nbplayers' => 2, 'nbscores' => 1)); Formulecompet::create(array('libelle' => 'Scramble à 3', 'nbplayers' => 3, 'nbscores' => 1)); Formulecompet::create(array('libelle' => 'Scramble à 4', 'nbplayers' => 4, 'nbscores' => 1)); Formulecompet::create(array('libelle' => 'Pro-am à 2', 'nbplayers' => 2, 'nbscores' => 2)); Formulecompet::create(array('libelle' => 'Pro-am à 3', 'nbplayers' => 3, 'nbscores' => 3)); Formulecompet::create(array('libelle' => 'Pro-am à 4', 'nbplayers' => 4, 'nbscores' => 4)); // 9 Status Tour DB::table('statustours')->delete(); Statustour::create(array('libelle' => 'Création')); Statustour::create(array('libelle' => 'Départs')); Statustour::create(array('libelle' => 'En cours')); Statustour::create(array('libelle' => 'Cloturée')); Statustour::create(array('libelle' => 'Annulée')); // 10 Type Domaine DB::table('typedomaines')->delete(); Typedomaine::create(array('libelle' => 'Public')); Typedomaine::create(array('libelle' => 'Privé')); Typedomaine::create(array('libelle' => 'System')); // 11 Tees DB::table('tees')->delete(); Tee::create(array('libelle' => '---', 'color' => 'white')); Tee::create(array('libelle' => 'Noir', 'color' => 'Black')); Tee::create(array('libelle' => 'Blanc', 'color' => 'AntiqueWhite')); Tee::create(array('libelle' => 'Jaune', 'color' => 'yellow')); Tee::create(array('libelle' => 'Gris', 'color' => 'DarkGrey')); Tee::create(array('libelle' => 'Bleu', 'color' => 'blue')); Tee::create(array('libelle' => 'Rouge', 'color' => 'red')); Tee::create(array('libelle' => 'Or', 'color' => 'Gold')); Tee::create(array('libelle' => 'Orange', 'color' => 'DarkOrange')); Tee::create(array('libelle' => 'Vert', 'color' => 'Green')); // 12 Status Players DB::table('statusplayers')->delete(); Statusplayer::create(array('libelle' => 'Amateur')); Statusplayer::create(array('libelle' => 'Pro')); // 13 Status Entree DB::table('statusentrees')->delete(); Statusentree::create(array('libelle' => 'Inscrit')); }
Xform::startRow('hidden'); Xform::addText('_token', 'x', Session::getToken(), 2); Xform::addText('id', 'ID', $datas->id, 2); Xform::addText('backUrl', '', $param['backUrl']); Xform::addText('domaine_id', 'DOMAINE_ID', MySession::getModel('domaine', 'domaine')->id, 1); Xform::endRow(); // Get Fields Xform::startRow(); Xform::addText('nom', 'Nom de la compétition', $datas->nom, 5); Xform::addDate('date', 'Date', $datas->date, 2); Xform::addSelect('nbtours', ['1' => 1, '2' => 2, '3' => 3, '4' => 4], 'Nombre de tours', $datas->nbtours, 3); Xform::endRow(); Xform::startRow(); Xform::addSelect('genrecompet_id', Genrecompet::lists('libelle', 'id'), 'Genre', $datas->genrecompet_id, 3); Xform::addSelect('typecompet_id', Typecompet::lists('libelle', 'id'), 'Type', $datas->typecompet_id, 3); Xform::addSelect('modecompet_id', Modecompet::lists('libelle', 'id'), 'Type', $datas->modecompet_id, 3); Xform::endRow(); Xform::startRow(); Xform::addText('maxplayers', 'Nombre de joueurs max', $datas->maxplayers, 4); Xform::addSelect('teeselection', [0 => 'Défini par la catégorie', 1 => 'Choix du joueur'], 'Selection du tee de départ', $datas->teeselection, 4); Xform::endRow(); // Buttons Xform::addSubmit(); Xform::addCancel($param['backUrl']); // Message bottom //Xform::addMessage('Ceci est un message'); ?> <!-- Close Form --> {{ Xform::show($errors,'left') }}