当前位置: 首页>>代码示例>>PHP>>正文


PHP Club::create方法代码示例

本文整理汇总了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));
 }
开发者ID:birdiebel,项目名称:G2016,代码行数:22,代码来源:ClubsTableSeeder.php

示例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.";
开发者ID:NemOry,项目名称:Skoolyf,代码行数:31,代码来源:create.php

示例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);
开发者ID:Britgo,项目名称:Online-League,代码行数:31,代码来源:updindclub2.php

示例4: create_clubs

function create_clubs()
{
    foreach (range(0, 10) as $i) {
        Club::create(array('name' => 'club' . $i));
    }
}
开发者ID:scottdavis,项目名称:nimblize,代码行数:6,代码来源:test_config.php

示例5: run

 public function run()
 {
     Club::create(array('nombre' => 'Junior Los Teques', 'direccion_sede' => 'Universidad Catolica UCAB Los Teques', 'ind_active' => '1'));
 }
开发者ID:richarrieta,项目名称:miequipo,代码行数:4,代码来源:ClubTableSeeder.php

示例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.');
 }
开发者ID:gitter-badger,项目名称:lara-vedst,代码行数:17,代码来源:DatabaseSeeder.php


注:本文中的Club::create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。