<?php // Open Form Xform::form('route', 'manager.create'); // Hidden Xform::startRow('hidden'); Xform::addText('_token', 'x', Session::getToken(), 2); Xform::addText('id', 'ID', $datas->id, 2); Xform::addText('backUrl', '', $param['backUrl']); Xform::addText('user_id', 'USER_ID', Auth::user()->id, 1); Xform::endRow(); // Get Fields Xform::startRow(); Xform::addText('nom', 'Nom', $datas->nom, 4); Xform::addText('prenom', 'Prénom', $datas->prenom, 3); Xform::addSelect('statussocial_id', Statussocial::lists('libelle', 'id'), 'Status', $datas->statussocial_id, 3); Xform::addSelect('langue_id', Langue::lists('libelle', 'id'), 'Langue', $datas->langue_id, 2); Xform::endRow(); Xform::startRow(); Xform::addText('societe', 'Société', $datas->societe, 4); Xform::addText('numtva', 'N° de TVA', $datas->numtva, 3); Xform::endRow(); Xform::startRow(); Xform::addText('adr1', 'Adresse', $datas->adr1, 4); Xform::addText('adr2', 'Adresse 2', $datas->adr2, 4); Xform::endRow(); Xform::startRow(); Xform::addText('Tel1', 'Téléphone 1', $datas->tel1, 3); Xform::addText('Tel2', 'Téléphone 2', $datas->tel2, 3); Xform::endRow(); Xform::startRow();
/** * 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')); }