本文整理汇总了PHP中Club::create方法的典型用法代码示例。如果您正苦于以下问题:PHP Club::create方法的具体用法?PHP Club::create怎么用?PHP Club::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Club
的用法示例。
在下文中一共展示了Club::create方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
DB::table('clubs')->delete();
Club::create(array('nom' => '---', 'nomcourt' => '---', 'region_id' => 1));
Club::create(array('nom' => 'Golf club de Rigenée', 'nomcourt' => 'Rigenée', 'region_id' => 4));
Club::create(array('nom' => 'Golf Club de Pierpont', 'nomcourt' => 'Pierpont', 'region_id' => 4));
Club::create(array('nom' => 'Royal Golf Club de Waterloo', 'nomcourt' => 'Waterloo', 'region_id' => 4));
Club::create(array('nom' => 'Golf de Bondues', 'nomcourt' => 'Bondues', 'region_id' => 33));
Club::create(array('nom' => 'Golf de Lille-Métropole', 'nomcourt' => 'Lille Métropole', 'region_id' => 33));
Club::create(array('nom' => 'Golf du Grand-Ducal', 'nomcourt' => 'Grand Ducal', 'region_id' => 41));
DB::table('parcours')->delete();
Parcour::create(array('club_id' => 1, 'nom' => '---', 'nbtrous' => 18));
Parcour::create(array('club_id' => 2, 'nom' => 'Rigenée', 'nbtrous' => 18));
Parcour::create(array('club_id' => 3, 'nom' => 'Grand Pierpont', 'nbtrous' => 18));
Parcour::create(array('club_id' => 4, 'nom' => 'La Marache', 'nbtrous' => 18));
Parcour::create(array('club_id' => 4, 'nom' => 'Le Lion', 'nbtrous' => 18));
Parcour::create(array('club_id' => 4, 'nom' => 'Bois Héros', 'nbtrous' => 9));
Parcour::create(array('club_id' => 5, 'nom' => 'Hawtree', 'nbtrous' => 18));
Parcour::create(array('club_id' => 5, 'nom' => 'Trent Jones', 'nbtrous' => 18));
Parcour::create(array('club_id' => 6, 'nom' => 'Lille-Métropole', 'nbtrous' => 18));
Parcour::create(array('club_id' => 7, 'nom' => 'Grand-Ducal', 'nbtrous' => 18));
}
示例2: Club
}
$object = new Club();
$object->schoolid = $school->id;
$object->name = $_POST['name'];
$object->about = $_POST['about'];
$object->fbcomments = $_POST['fbcomments'];
$object->comments = $_POST['comments'];
$file = new File($_FILES['logo']);
if ($file->valid) {
$object->logo = $file->data;
}
$file = new File($_FILES['cover']);
if ($file->valid) {
$object->cover = $file->data;
}
$object->create();
$clubuser = new ClubUser();
$clubuser->clubid = $object->id;
$clubuser->userid = $session->user_id;
$clubuser->level = 1;
$clubuser->role = "admin";
$clubuser->enabled = 1;
$clubuser->pending = 0;
$clubuser->create();
$log = new Log($session->user_id, $clientip, "WEB", "CREATED CLUB: " . $object->id);
$log->create();
$message = "success";
} else {
$log = new Log($session->user_id, $clientip, "WEB", "CREATE CLUB NOT FILLED");
$log->create();
$message = "All fields are required.";
示例3: exit
case 'A':
if (strlen($newcode) == 0) {
include 'php/wrongentry.php';
exit(0);
}
checkclash($newcode);
$club = new Club($newcode);
$club->Name = $newname;
$club->Contactfirst = $contfirst;
$club->Contactlast = $contlast;
$club->Contactemail = $contemail;
$club->Contactphone = $contphone;
$club->Website = $website;
$club->Night = $night;
$club->Schools = $sch;
$club->create();
$Title = "Club {$club->display_name()} created OK";
break;
default:
try {
$club = new Club();
$club->frompost();
$club->fetchdets();
} catch (ClubException $e) {
$mess = $e->getMessage();
include 'php/wrongentry.php';
exit(0);
}
// If name has changed, check it doesn't clash
if ($newcode != $club->Code) {
checkclash($newcode);
示例4: create_clubs
function create_clubs()
{
foreach (range(0, 10) as $i) {
Club::create(array('name' => 'club' . $i));
}
}
示例5: run
public function run()
{
Club::create(array('nombre' => 'Junior Los Teques', 'direccion_sede' => 'Universidad Catolica UCAB Los Teques', 'ind_active' => '1'));
}
示例6: run
public function run()
{
Eloquent::unguard();
/**
* Clearing table
*/
DB::table('clubs')->delete();
/**
* Creating clubs
*/
Club::create(array('clb_title' => '-'));
// default - do not delete!
/**
* Reporting result to console
*/
$this->command->info('Default club created.');
}