本文整理汇总了PHP中Activity::getBlank方法的典型用法代码示例。如果您正苦于以下问题:PHP Activity::getBlank方法的具体用法?PHP Activity::getBlank怎么用?PHP Activity::getBlank使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Activity
的用法示例。
在下文中一共展示了Activity::getBlank方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: restoreCredit
public static function restoreCredit($credit)
{
$activity = Activity::getBlank();
$activity->client_id = $credit->client_id;
$activity->credit_id = $credit->id;
$activity->activity_type_id = ACTIVITY_TYPE_RESTORE_CREDIT;
$activity->message = Utils::encodeActivity(Auth::user(), 'restored ' . Utils::formatMoney($credit->balance, $credit->client->currency_id) . ' credit');
$activity->balance = $credit->client->balance;
$activity->save();
}
示例2: archiveCredit
public static function archiveCredit($credit)
{
if ($credit->is_deleted) {
return;
}
$activity = Activity::getBlank();
$activity->client_id = $credit->client_id;
$activity->credit_id = $credit->id;
$activity->activity_type_id = ACTIVITY_TYPE_ARCHIVE_CREDIT;
$activity->message = Utils::encodeActivity(Auth::user(), 'archived ' . Utils::formatMoney($credit->balance, $credit->client->currency_id) . ' credit');
$activity->balance = $credit->client->balance;
$activity->save();
}
示例3: deleteCredit
public static function deleteCredit($credit)
{
$activity = Activity::getBlank();
$activity->credit_id = $credit->id;
$activity->client_id = $credit->client_id;
$activity->activity_type_id = ACTIVITY_TYPE_DELETE_CREDIT;
// $activity->message = Utils::encodeActivity(Auth::user(), 'borró ' . Utils::formatMoney($credit->balance, $credit->client->currency_id) . ' de crédito');
$activity->balance = $credit->client->balance;
$activity->save();
}