本文整理汇总了PHP中Partner::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Partner::all方法的具体用法?PHP Partner::all怎么用?PHP Partner::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Partner
的用法示例。
在下文中一共展示了Partner::all方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: json_encode
$farm->update(array('import_quantity' => json_encode($data)));
}
$companies = Company::All();
foreach ($companies as $company) {
$company->update(array('real_quantity' => json_encode($data)));
$company->update(array('import_quantity' => json_encode($data)));
}
$countries = National::All();
foreach ($countries as $country) {
$country->update(array('real_quantity' => json_encode($data)));
$country->update(array('import_quantity' => json_encode($data)));
}
$locations = Location::All();
foreach ($locations as $location) {
$location->update(array('real_quantity' => json_encode($data)));
$location->update(array('import_quantity' => json_encode($data)));
}
$partners = Partner::All();
foreach ($partners as $partner) {
$partner->update(array('import_quantity' => json_encode($data)));
}
return "done";
});
Route::get('reset-partner', function () {
$partners = Partner::all();
$data = array("feederSteer" => 0, "feederHeifer" => 0, "breederBull" => 0, "breederHeifer" => 0);
foreach ($partners as $partner) {
$partner->update(array('import_avg_prices' => json_encode($data), 'import_counts' => 0));
}
return "done";
});
示例2: index
public function index()
{
$partners = Partner::all();
$menu = 'data';
return View::make('partners.index', compact('partners', 'menu'));
}