App\Http\Controllers\TasksController::show PHP Method

show() public method

Display the specified resource.
public show ( Illuminate\Http\Request $request, integer $id ) : Response
$request Illuminate\Http\Request
$id integer
return Response
    public function show(Request $request, $id)
    {
        $integrationCheck = Integration::first();
        if ($integrationCheck) {
            $api = Integration::getApi('billing');
            $apiConnected = true;
            $invoiceContacts = $api->getContacts();
        } else {
            $apiConnected = false;
            $invoiceContacts = array();
        }
        return view('tasks.show')->withTasks($this->tasks->find($id))->withUsers($this->users->getAllUsersWithDepartments())->withContacts($invoiceContacts)->withTasktimes($this->tasks->getTaskTime($id))->withCompanyname($this->settings->getCompanyName())->withApiconnected($apiConnected);
    }