Files
faveo/app/Http/Controllers/Admin/helpdesk/ThreadController.php
Shift cade5f0d23 Apply Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions.

You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root.

For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style).
2023-01-07 18:47:35 +00:00

41 lines
1.1 KiB
PHP

<?php
namespace App\Http\Controllers\Admin\helpdesk;
// controllers
use App\Http\Controllers\Controller;
// models
use App\Model\helpdesk\Priority;
use App\Model\helpdesk\Ticket_Thread;
// classes
use Exception;
/**
* ThreadController.
*
* @author Ladybird <info@ladybirdweb.com>
*/
class ThreadController extends Controller
{
/**
* get the values from ticket_thread Table and direct to view page.
*
* @param type Ticket_thread $thread
* @param type Priority $priority
* @return type Response
*/
public function getTickets(Ticket_Thread $thread, Priority $priority)
{
try {
/* get the values of Ticket_thread from Ticket_thread Table */
$threads = $thread->get();
/* get the values of priority from Priority Table */
$priorities = $priority->get();
/* Direct to view page */
return view('themes.default1.admin.helpdesk.tickets.ticket', compact('threads', 'priorities'));
} catch (Exception $e) {
return view('404');
}
}
}