本文整理匯總了PHP中app\Notification::join方法的典型用法代碼示例。如果您正苦於以下問題:PHP Notification::join方法的具體用法?PHP Notification::join怎麽用?PHP Notification::join使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\Notification
的用法示例。
在下文中一共展示了Notification::join方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: data
/**
* Show a list of all the languages posts formatted for Datatables.
*
* @return Datatables JSON
*/
public function data()
{
$notifications = Notification::join('package', 'package.id', '=', 'notification.package_id')->select(array('package.name', 'notification.id', 'notification.is_read', 'notification.title', 'notification.content', 'notification.created_at'))->orderBy('notification.id', 'ASC');
//$notifications = Notification::select(array('notifications.id','notifications.name','notifications.email', 'notifications.created_at'))->orderBy('notifications.email', 'ASC');
return Datatables::of($notifications)->add_column('actions', '<a href="{{{ URL::to(\'admin/notifications/\' . $id . \'/edit\' ) }}}" class="btn btn-success btn-sm iframe" ><span class="glyphicon glyphicon-pencil"></span> {{ Lang::get("admin/modal.edit") }}</a>
<a href="{{{ URL::to(\'admin/notifications/\' . $id . \'/delete\' ) }}}" class="btn btn-sm btn-danger iframe"><span class="glyphicon glyphicon-trash"></span> {{ Lang::get("admin/modal.delete") }}</a>
')->add_column('check', '<input type="checkbox" name="check[]" value="{{$id}}"/>')->make(true);
}