Пример #1
0
 public function __construct(Ticket $tickets)
 {
     $this->tickets = $tickets;
     $this->beforeFilter('staff');
     // Store attributes array to be used in the functions below.
     $this->attributes = ['staff_users_list' => User::lists('users_username', 'users_id'), 'support_users_list' => User::lists('users_username', 'users_id'), 'categories_list' => Category::lists('categories_name', 'categories_id'), 'priorities_list' => Priority::lists('priorities_name', 'priorities_id'), 'statuses_list' => Status::lists('statuses_name', 'statuses_id')];
     // Add in an 'unassigned' item with an index of 0 to the support users list.
     // This is so we can display this in the view without having to have a database entry for 'unassigned';
     $this->attributes['support_users_list'][0] = 'unassigned';
     // Get current logged in user's auth level.
     $this->user_auth_level = Auth::user()->get_userlevel();
     // Check if current logged in user is Support or Admin user.
     $this->support_check = Auth::user()->isSupport();
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     return View::make('tasks.create')->with('task', Task::findOrFail($id))->with('title', 'Edit Task')->with('method', 'PUT')->with('url', 'tasks/' . $id)->with('priorities', Priority::lists('priority_name', 'id'))->with('statuses', Status::lists('status_name', 'id'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     return View::make('projects.create')->with('project', Project::findOrFail($id))->with('title', 'Edit Project')->with('method', 'PUT')->with('url', 'projects/' . $id)->with('priorities', Priority::lists('priority_name', 'id'));
 }