本文整理匯總了PHP中Companies::create方法的典型用法代碼示例。如果您正苦於以下問題:PHP Companies::create方法的具體用法?PHP Companies::create怎麽用?PHP Companies::create使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Companies
的用法示例。
在下文中一共展示了Companies::create方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: run
public function run()
{
// Uncomment the below to wipe the table clean before populating
// DB::table('companies')->truncate();
Eloquent::unguard();
DB::table('companies')->delete();
Companies::create(array('id' => 1, 'name' => 'АТБ', 'description' => 'Продуктовый супермаркет', 'phone' => 123456789, 'email' => 'atb@ua.ua', 'web_site' => 'web.site.ua', 'city_id' => 3, 'user_id' => 1, 'cover_image' => '', 'logo' => ''));
Companies::create(array('id' => 2, 'name' => 'Фокстрот', 'description' => 'Супермаркет електронной техники', 'phone' => 0516155555, 'email' => 'fokstroy@ua', 'web_site' => 'fokstrot.ua', 'city_id' => 2, 'user_id' => 1, 'cover_image' => '', 'logo' => ''));
Companies::create(array('id' => 3, 'name' => 'Web-studio', 'description' => 'Web-studio, создание и продвижение сайтов', 'phone' => 0656565655, 'email' => 'web@web.ua', 'web_site' => 'web.ua', 'city_id' => 1, 'user_id' => 1, 'cover_image' => '', 'logo' => ''));
$this->command->info('Companies table seeded!');
}