本文整理汇总了PHP中Ticket::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Ticket::all方法的具体用法?PHP Ticket::all怎么用?PHP Ticket::all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ticket
的用法示例。
在下文中一共展示了Ticket::all方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
$title = "Управление заявками";
//Lang::get('admin/blogs/title.blog_management');
$requests = \Ticket::all();
$email = \DbConfig::get("app.admin.email_to_send_requests");
if (!$email) {
$email = "";
}
return View::make('admin/requests/index', compact('title', 'requests', 'email'));
}
示例2: filter
function filter($condition)
{
switch ($condition) {
case 'open':
$options = array('conditions' => 'status != "closed" AND company_id = ' . $this->client->comapny_id);
break;
case 'closed':
$options = array('conditions' => 'status = "closed" AND company_id = ' . $this->client->company_id);
break;
}
$this->view_data['ticket'] = Ticket::all($options);
$this->content_view = 'tickets/client_views/all';
}
示例3: filter
function filter($condition)
{
switch ($condition) {
case 'open':
$options = array('conditions' => 'status = "open"');
break;
case 'closed':
$options = array('conditions' => 'status = "closed"');
break;
case 'assigned':
$options = array('conditions' => 'status != "closed" AND user_id = ' . $this->user->id);
break;
}
$this->view_data['ticket'] = Ticket::all($options);
$this->content_view = 'tickets/all';
}
示例4: filter
function filter($condition)
{
$this->view_data['queues'] = Queue::find('all', array('conditions' => array('inactive=?', '0')));
switch ($condition) {
case 'open':
$options = array('conditions' => 'status = "open"');
break;
case 'closed':
$options = array('conditions' => 'status = "closed"');
break;
case 'assigned':
$options = array('conditions' => 'status != "closed" AND user_id = ' . $this->user->id);
break;
}
$this->view_data['ticket'] = Ticket::all($options);
$this->content_view = 'tickets/all';
}
示例5: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$tickets = $this->ticket->all();
return View::make('tickets.index', compact('tickets'));
}
示例6: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
return View::make('user.ticket_list', ['tickets' => Ticket::all()]);
}
示例7: _seed
/**
* Setup data
*
* @return null
*/
private static function _seed()
{
$database = self::_database();
User::all()->destroy();
Bill::all()->destroy();
Ticket::all()->destroy();
Tocket::all()->destroy();
Account::all()->destroy();
$user = new User();
$user->id = 1;
$user->name = "Eustaquio Rangel";
$user->email = "eustaquiorangel@gmail.com";
$user->code = "12345";
$user->user_level = 1;
$user->save();
$user = new User();
$user->id = 2;
$user->name = "Rangel, Eustaquio";
$user->email = "taq@bluefish.com.br";
$user->code = "54321";
$user->user_level = 2;
$user->save();
for ($i = 1; $i <= 10; $i++) {
$bill = new Bill();
$bill->id = $i;
$bill->user_id = 1;
$bill->description = "Bill #{$i}";
$bill->value = $i;
$bill->save();
$ticket = new Ticket();
$ticket->user_id = 1;
$ticket->description = "Just another ticket";
$ticket->save();
}
$account = new Account();
$account->user_id = 1;
$account->account_number = "12345";
$account->save();
$account = new Account();
$account->user_id = 2;
$account->account_number = "54321";
$account->save();
}