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


PHP Store::create方法代码示例

本文整理汇总了PHP中Store::create方法的典型用法代码示例。如果您正苦于以下问题:PHP Store::create方法的具体用法?PHP Store::create怎么用?PHP Store::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Store的用法示例。


在下文中一共展示了Store::create方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Eloquent::unguard();
     DB::table('stores')->delete();
     Store::create(array('name' => 'MyStore'));
 }
开发者ID:meetraz,项目名称:liferaft,代码行数:11,代码来源:DatabaseSeeder.php

示例2: Store

<?php

require_once "../initialize.php";
$message = "";
if (isset($_POST['name']) && $_POST['name'] != "" && isset($_POST['address']) && $_POST['address'] != "") {
    $object = new Store();
    $object->name = $_POST['name'];
    $object->branchname = $_POST['branchname'];
    $object->address = $_POST['address'];
    $object->longitude = $_POST['longitude'];
    $object->latitude = $_POST['latitude'];
    $object->telnum = $_POST['telnum'];
    $object->deliverynum = $_POST['deliverynum'];
    $object->email = $_POST['email'];
    $object->storetypeid = $_POST['storetypeid'];
    $object->facebookid = $_POST['facebookid'];
    $object->twitterid = $_POST['twitterid'];
    $object->pending = $_POST['pending'];
    $object->enabled = $_POST['enabled'];
    if (isset($_FILES['picture'])) {
        $file = new File($_FILES['picture']);
        $object->picture = $file->data;
    }
    $object->create();
    //$log = new Log($session->userid, $clientip, "WEB", "CREATED STORE: ".$object->id); $log->create();
    $message .= "success";
} else {
    $message = "You have missed a required field.";
}
echo $message;
开发者ID:NemOry,项目名称:EpicueWebPanel,代码行数:30,代码来源:createstore.php

示例3: createNewStore

 private function createNewStore()
 {
     $faker = $this->getFakeGenerator();
     Store::create(array('name' => $faker->company, 'phone_number' => $faker->phoneNumber, 'street' => $faker->streetAddress, 'postcode' => $faker->postcode, 'city' => $faker->city));
 }
开发者ID:fashionforhome,项目名称:fressen4home,代码行数:5,代码来源:StoreTableSeeder.php


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