本文整理汇总了PHP中Categorie::save方法的典型用法代码示例。如果您正苦于以下问题:PHP Categorie::save方法的具体用法?PHP Categorie::save怎么用?PHP Categorie::save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Categorie
的用法示例。
在下文中一共展示了Categorie::save方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: up
/**
* Make changes to the database.
*
* @return void
*/
public function up()
{
//
Schema::create('categories', function ($table) {
$table->increments('id');
$table->string('title');
});
$cat = new Categorie();
$cat->title = "Wood";
$cat->save();
$cat = new Categorie();
$cat->title = "Metal";
$cat->save();
$cat = new Categorie();
$cat->title = "Ceramic";
$cat->save();
$cat = new Categorie();
$cat->title = "Glass";
$cat->save();
$cat = new Categorie();
$cat->title = "Fabric";
$cat->save();
$cat = new Categorie();
$cat->title = "Plastic";
$cat->save();
$cat = new Categorie();
$cat->title = "Concrete";
$cat->save();
$cat = new Categorie();
$cat->title = "Appliances";
$cat->save();
$cat = new Categorie();
$cat->title = "Electical";
$cat->save();
$cat = new Categorie();
$cat->title = "Plumbing";
$cat->save();
$cat = new Categorie();
$cat->title = "Insulation";
$cat->save();
$cat = new Categorie();
$cat->title = "Other";
$cat->save();
}