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


PHP Company::insert方法代码示例

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


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

示例1: run

 public function run()
 {
     DB::table('companies')->delete();
     Eloquent::unguard();
     Company::insert([['id' => 1, 'lat' => "39.114025", 'long' => "-84.513890", 'name' => "RoadTrippers", 'description' => "Roadtrippers HQ", 'status' => 1, 'created_at' => "0000-00-00 00:00:00", 'updated_at' => "0000-00-00 00:00:00", 'url' => "http://www.roadtrippers.com", 'category_id' => 1], ['id' => 2, 'lat' => "39.110624", 'long' => "-84.515660", 'name' => "Cintrifuse", 'description' => "Cintrifuse HQ", 'status' => 1, 'created_at' => "0000-00-00 00:00:00", 'updated_at' => "0000-00-00 00:00:00", 'url' => "http://www.cintrifuse.com", 'category_id' => 5], ['id' => 3, 'lat' => "39.110624", 'long' => "-84.515660", 'name' => "Brandery", 'description' => "The Brandery", 'status' => 1, 'created_at' => "0000-00-00 00:00:00", 'updated_at' => "0000-00-00 00:00:00", 'url' => "http://www.brandery.com", 'category_id' => 2], ['id' => 4, 'lat' => "39.1100127", 'long' => "-84.5206703", 'name' => "Choremonster", 'description' => "Choremonster HQ", 'status' => 1, 'created_at' => "0000-00-00 00:00:00", 'updated_at' => "0000-00-00 00:00:00", 'url' => "http://www.choremonster.com", 'category_id' => 1], ['id' => 5, 'lat' => "39.1108908", 'long' => "-84.5157333", 'name' => "SQRL", 'description' => "SQRL HQ", 'status' => 1, 'created_at' => "0000-00-00 00:00:00", 'updated_at' => "0000-00-00 00:00:00", 'url' => "http://www.getsqrl.com", 'category_id' => 1], ['id' => 6, 'lat' => "39.109615", 'long' => "-84.516514", 'name' => "Frameri", 'description' => "Frameri retail location", 'status' => 1, 'created_at' => "0000-00-00 00:00:00", 'updated_at' => "0000-00-00 00:00:00", 'url' => "http://www.frameri.com", 'category_id' => 1], ['id' => 7, 'lat' => "39.1286862", 'long' => "-84.4307708", 'name' => "Ahalogy", 'description' => "Ahalogy HQ", 'status' => 1, 'created_at' => "0000-00-00 00:00:00", 'updated_at' => "0000-00-00 00:00:00", 'url' => "http://www.ahalogy.com", 'category_id' => 1], ['id' => 8, 'lat' => "39.1150377", 'long' => "-84.5199733", 'name' => "Modulus", 'description' => "Modulus HQ", 'status' => 1, 'created_at' => "0000-00-00 00:00:00", 'updated_at' => "0000-00-00 00:00:00", 'url' => "http://www.modulus.com", 'category_id' => 1], ['id' => 9, 'lat' => "39.0955948", 'long' => "-84.523511", 'name' => "Dotloop", 'description' => "Dotloop HQ", 'status' => 1, 'created_at' => "0000-00-00 00:00:00", 'updated_at' => "0000-00-00 00:00:00", 'url' => "http://www.dotloop.com", 'category_id' => 1], ['id' => 15, 'lat' => "39.104971", 'long' => "-84.511328", 'name' => "Differential", 'description' => "Meteor.js development", 'status' => 1, 'created_at' => "2015-09-17 08:15:01", 'updated_at' => "2015-09-17 08:15:01", 'url' => "http://www.differential.com", 'category_id' => 1]]);
 }
开发者ID:jakeboyles,项目名称:MadeInCincy,代码行数:6,代码来源:CompaniesSeeder.php


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