Applied fixes from StyleCI

This commit is contained in:
Bhanu
2016-06-13 11:30:41 -04:00
committed by StyleCI Bot
parent 4c25919b65
commit 1b77330dde
38 changed files with 1302 additions and 1185 deletions

View File

@@ -3,20 +3,19 @@
namespace App\Exceptions;
// controller
use Exception;
use Bugsnag;
//use Illuminate\Validation\ValidationException;
use Illuminate\Foundation\Validation\ValidationException;
use Bugsnag\BugsnagLaravel\BugsnagExceptionHandler as ExceptionHandler;
use Exception;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
// use Symfony\Component\HttpKernel\Exception\HttpException;
// use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Bugsnag\BugsnagLaravel\BugsnagExceptionHandler as ExceptionHandler;
use Bugsnag;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Validation\ValidationException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class Handler extends ExceptionHandler {
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
*
@@ -53,7 +52,8 @@ class Handler extends ExceptionHandler {
*
* @return void
*/
public function report(Exception $e) {
public function report(Exception $e)
{
$debug = \Config::get('app.bugsnag_reporting');
$debug = ($debug) ? 'true' : 'false';
if ($debug == 'false') {
@@ -61,6 +61,7 @@ class Handler extends ExceptionHandler {
return false;
});
}
return parent::report($e);
}
@@ -88,7 +89,7 @@ class Handler extends ExceptionHandler {
// if (\Config::get('database.install') == 1) {
// // checking if the error log send to Ladybirdweb is enabled or not
// if (\Config::get('app.ErrorLog') == '1') {
//
//
// }
// }
// return response()->view('errors.500', []);
@@ -128,66 +129,79 @@ class Handler extends ExceptionHandler {
/**
* Render an exception into an HTTP response.
* @param type $request
*
* @param type $request
* @param Exception $e
*
* @return type mixed
*/
public function render($request, Exception $e) {
public function render($request, Exception $e)
{
switch ($e) {
case $e instanceof \Illuminate\Http\Exception\HttpResponseException :
case $e instanceof \Illuminate\Http\Exception\HttpResponseException:
return parent::render($request, $e);
case $e instanceof \Tymon\JWTAuth\Exceptions\TokenExpiredException :
case $e instanceof \Tymon\JWTAuth\Exceptions\TokenExpiredException:
return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]);
case $e instanceof \Tymon\JWTAuth\Exceptions\TokenInvalidException :
case $e instanceof \Tymon\JWTAuth\Exceptions\TokenInvalidException:
return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]);
default :
default:
return $this->common($request, $e);
}
}
/**
* Function to render 500 error page
* Function to render 500 error page.
*
* @param type $request
* @param type $e
*
* @return type mixed
*/
public function render500($request, $e) {
public function render500($request, $e)
{
if (config('app.debug') == true) {
return parent::render($request, $e);
}
return redirect()->route('error500', []);
}
/**
* Function to render 404 error page
* Function to render 404 error page.
*
* @param type $request
* @param type $e
*
* @return type mixed
*/
public function render404($request, $e) {
public function render404($request, $e)
{
if (config('app.debug') == true) {
return parent::render($request, $e);
}
return redirect()->route('error404', []);
}
/**
* Common finction to render both types of codes
* Common finction to render both types of codes.
*
* @param type $request
* @param type $e
*
* @return type mixed
*/
public function common($request, $e) {
public function common($request, $e)
{
switch ($e) {
case $e instanceof HttpException :
case $e instanceof HttpException:
return $this->render404($request, $e);
case $e instanceof NotFoundHttpException :
case $e instanceof NotFoundHttpException:
return $this->render404($request, $e);
default :
default:
return $this->render500($request, $e);
}
return parent::render($request, $e);
}
}

View File

@@ -143,7 +143,7 @@ class DepartmentController extends Controller
public function edit($id, User $user, Group_assign_department $group_assign_department, Template $template, Teams $team, Department $department, Sla_plan $sla, Emails $email, Groups $group)
{
try {
$sys_department = \DB::table('settings_system')
$sys_department = \DB::table('settings_system')
->select('department')
->where('id', '=', 1)
->first();
@@ -175,7 +175,6 @@ class DepartmentController extends Controller
{
// dd($id);
try {
$table = $group_assign_department->where('department_id', $id);
$table->delete();
$requests = $request->input('group_id');

View File

@@ -28,14 +28,15 @@ use Lang;
*
* @author Ladybird <info@ladybirdweb.com>
*/
class EmailsController extends Controller {
class EmailsController extends Controller
{
/**
* Defining constructor variables.
*
* @return type
*/
public function __construct() {
public function __construct()
{
$this->middleware('auth');
$this->middleware('roles');
}
@@ -47,7 +48,8 @@ class EmailsController extends Controller {
*
* @return type view
*/
public function index(Emails $email) {
public function index(Emails $email)
{
try {
// fetch all the emails from emails table
$emails = $email->get();
@@ -68,7 +70,8 @@ class EmailsController extends Controller {
*
* @return type Response
*/
public function create(Department $department, Help_topic $help, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol) {
public function create(Department $department, Help_topic $help, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol)
{
try {
// fetch all the departments from the department table
$departments = $department->get();
@@ -93,16 +96,17 @@ class EmailsController extends Controller {
*
* @return int
*/
public function validatingEmailSettings(Request $request) {
public function validatingEmailSettings(Request $request)
{
$validator = \Validator::make(
[
'email_address' => $request->input('email_address'),
'email_name' => $request->input('email_name'),
'password' => $request->input('password'),
'email_name' => $request->input('email_name'),
'password' => $request->input('password'),
], [
'email_address' => 'required|email|unique:emails',
'email_name' => 'required',
'password' => 'required',
'email_name' => 'required',
'password' => 'required',
]
);
if ($validator->fails()) {
@@ -173,7 +177,8 @@ class EmailsController extends Controller {
*
* @return type Redirect
*/
public function store($request, $imap_check) {
public function store($request, $imap_check)
{
$email = new Emails();
try {
// saving all the fields to the database
@@ -255,7 +260,8 @@ class EmailsController extends Controller {
*
* @return type Response
*/
public function edit($id, Department $department, Help_topic $help, Emails $email, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol) {
public function edit($id, Department $department, Help_topic $help, Emails $email, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol)
{
try {
$sys_email = \DB::table('settings_email')->select('sys_email')->where('id', '=', 1)->first();
// dd($sys_email);
@@ -286,16 +292,17 @@ class EmailsController extends Controller {
*
* @return int
*/
public function validatingEmailSettingsUpdate($id, Request $request) {
public function validatingEmailSettingsUpdate($id, Request $request)
{
$validator = \Validator::make(
[
'email_address' => $request->input('email_address'),
'email_name' => $request->input('email_name'),
'password' => $request->input('password'),
'email_name' => $request->input('email_name'),
'password' => $request->input('password'),
], [
'email_address' => 'email',
'email_name' => 'required',
'password' => 'required',
'email_name' => 'required',
'password' => 'required',
]
);
if ($validator->fails()) {
@@ -368,7 +375,8 @@ class EmailsController extends Controller {
*
* @return type Response
*/
public function update($id, $request, $imap_check) {
public function update($id, $request, $imap_check)
{
try {
// fetch the selected emails
$emails = Emails::whereId($id)->first();
@@ -418,12 +426,12 @@ class EmailsController extends Controller {
// $emails->password = Crypt::encrypt($request->input('password'));
$emails->save();
//dd($request->sys_email);
if($request->sys_email == 'on') {
if ($request->sys_email == 'on') {
$system = \DB::table('settings_email')
->where('id', '=', 1)
->update(['sys_email' => $id]);
} elseif ($request->input('count') <= 1 && $request->sys_email == null) {
$system = \DB::table('settings_email')
$system = \DB::table('settings_email')
->where('id', '=', 1)
->update(['sys_email' => null]);
}
@@ -445,7 +453,8 @@ class EmailsController extends Controller {
*
* @return type Redirect
*/
public function destroy($id, Emails $email) {
public function destroy($id, Emails $email)
{
// fetching the details on the basis of the $id passed to the function
$default_system_email = Email::where('id', '=', '1')->first();
if ($default_system_email->sys_email) {
@@ -476,25 +485,26 @@ class EmailsController extends Controller {
*
* @return type int
*/
public function getImapStream($request, $validate) {
public function getImapStream($request, $validate)
{
$fetching_status = $request->input('fetching_status');
$username = $request->input('email_address');
$password = $request->input('password');
$protocol_id = $request->input('mailbox_protocol');
$fetching_protocol = '/' . $request->input('fetching_protocol');
$fetching_encryption = '/' . $request->input('fetching_encryption');
$fetching_protocol = '/'.$request->input('fetching_protocol');
$fetching_encryption = '/'.$request->input('fetching_encryption');
if ($fetching_encryption == '/none') {
$fetching_encryption2 = '/novalidate-cert';
$mailbox_protocol = $fetching_encryption2;
$host = $request->input('fetching_host');
$port = $request->input('fetching_port');
$mailbox = '{' . $host . ':' . $port . $mailbox_protocol . '}INBOX';
$mailbox = '{'.$host.':'.$port.$mailbox_protocol.'}INBOX';
} else {
$mailbox_protocol = $fetching_protocol . $fetching_encryption;
$mailbox_protocol = $fetching_protocol.$fetching_encryption;
$host = $request->input('fetching_host');
$port = $request->input('fetching_port');
$mailbox = '{' . $host . ':' . $port . $mailbox_protocol . $validate . '}INBOX';
$mailbox_protocol = $fetching_encryption . $validate;
$mailbox = '{'.$host.':'.$port.$mailbox_protocol.$validate.'}INBOX';
$mailbox_protocol = $fetching_encryption.$validate;
}
try {
$imap_stream = imap_open($mailbox, $username, $password);
@@ -518,7 +528,8 @@ class EmailsController extends Controller {
*
* @return type int
*/
public function checkImapStream($imap_stream) {
public function checkImapStream($imap_stream)
{
$check_imap_stream = imap_check($imap_stream);
if ($check_imap_stream) {
$imap_stream = 1;
@@ -536,7 +547,8 @@ class EmailsController extends Controller {
*
* @return int
*/
public function getSmtp($request) {
public function getSmtp($request)
{
$sending_status = $request->input('sending_status');
// cheking for the sending protocol
if ($request->input('sending_protocol') == 'smtp') {
@@ -552,8 +564,8 @@ class EmailsController extends Controller {
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->SMTPOptions = [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true,
],
];
@@ -585,7 +597,8 @@ class EmailsController extends Controller {
*
* @return type string or null
*/
public function departmentValue($dept) {
public function departmentValue($dept)
{
if ($dept) {
$email_department = $dept;
} else {
@@ -602,7 +615,8 @@ class EmailsController extends Controller {
*
* @return type string or null
*/
public function priorityValue($priority) {
public function priorityValue($priority)
{
if ($priority) {
$email_priority = $priority;
} else {
@@ -619,7 +633,8 @@ class EmailsController extends Controller {
*
* @return type string or null
*/
public function helpTopicValue($help_topic) {
public function helpTopicValue($help_topic)
{
if ($help_topic) {
$email_help_topic = $help_topic;
} else {
@@ -628,5 +643,4 @@ class EmailsController extends Controller {
return $email_help_topic;
}
}

View File

@@ -3,22 +3,21 @@
namespace App\Http\Controllers\Admin\helpdesk;
// controller
use App\Http\Controllers\Common\PhpMailController;
use App\Http\Controllers\Controller;
// request
use Exception;
use Lang;
use File;
use Lang;
/**
* ErrorAndDebuggingController
* ErrorAndDebuggingController.
*
* @author Ladybird <info@ladybirdweb.com>
*/
class ErrorAndDebuggingController extends Controller
{
/**
/**
* Create a new controller instance.
*
* @return void
@@ -31,68 +30,76 @@ class ErrorAndDebuggingController extends Controller
}
/**
* function to show error and debugging setting page
* function to show error and debugging setting page.
*
* @param void
* @return response
*
* @return response
*/
public function showSettings()
{
$debug = \Config::get('app.debug');
$bugsnag = \Config::get('app.bugsnag_reporting');
return view('themes.default1.admin.helpdesk.settings.error-and-logs.error-debug')->with(['debug'=> $debug, 'bugsnag' => $bugsnag]);
}
public function showSettings()
{
$debug = \Config::get('app.debug');
$bugsnag = \Config::get('app.bugsnag_reporting');
/**
* funtion to update error and debugging settings
* @param void
* @return
*/
public function postSettings()
{
try{
$debug = \Config::get('app.debug');
$debug = ($debug) ? 'true' : 'false';
$bugsnag_debug = \Config::get('app.bugsnag_reporting');
$bugsnag_debug = ($bugsnag_debug) ? 'true' : 'false';
if ($debug != \Input::get('debug') || $bugsnag_debug != \Input::get('bugsnag')) {
// dd($request->input());
$debug_new = base_path()
.DIRECTORY_SEPARATOR.
'config'
.DIRECTORY_SEPARATOR.
'app.php';
$datacontent = File::get($debug_new);
$datacontent = str_replace("'debug' => ".$debug,
"'debug' => ".\Input::get('debug'),
$datacontent);
File::put($debug_new, $datacontent);
// dd($request->input());
$bugsnag_debug_new = base_path()
.DIRECTORY_SEPARATOR.
'config'
.DIRECTORY_SEPARATOR.
'app.php';
$datacontent2 = File::get($bugsnag_debug_new);
$datacontent2 = str_replace("'bugsnag_reporting' => ".$bugsnag_debug,
"'bugsnag_reporting' => ".\Input::get('bugsnag'),
$datacontent2);
File::put($bugsnag_debug_new, $datacontent2);
return redirect()->back()->with('success',
Lang::get('lang.error-debug-settings-saved-message'));
} else {
return redirect()->back()->with('fails',
Lang::get('lang.error-debug-settings-error-message'));
}
return view('themes.default1.admin.helpdesk.settings.error-and-logs.error-debug')->with(['debug' => $debug, 'bugsnag' => $bugsnag]);
}
/**
* funtion to update error and debugging settings.
*
* @param void
*
* @return
*/
public function postSettings()
{
try {
$debug = \Config::get('app.debug');
$debug = ($debug) ? 'true' : 'false';
$bugsnag_debug = \Config::get('app.bugsnag_reporting');
$bugsnag_debug = ($bugsnag_debug) ? 'true' : 'false';
if ($debug != \Input::get('debug') || $bugsnag_debug != \Input::get('bugsnag')) {
// dd($request->input());
$debug_new = base_path()
.DIRECTORY_SEPARATOR.
'config'
.DIRECTORY_SEPARATOR.
'app.php';
$datacontent = File::get($debug_new);
$datacontent = str_replace("'debug' => ".$debug,
"'debug' => ".\Input::get('debug'),
$datacontent);
File::put($debug_new, $datacontent);
// dd($request->input());
$bugsnag_debug_new = base_path()
.DIRECTORY_SEPARATOR.
'config'
.DIRECTORY_SEPARATOR.
'app.php';
$datacontent2 = File::get($bugsnag_debug_new);
$datacontent2 = str_replace("'bugsnag_reporting' => ".$bugsnag_debug,
"'bugsnag_reporting' => ".\Input::get('bugsnag'),
$datacontent2);
File::put($bugsnag_debug_new, $datacontent2);
return redirect()->back()->with('success',
Lang::get('lang.error-debug-settings-saved-message'));
} else {
return redirect()->back()->with('fails',
Lang::get('lang.error-debug-settings-error-message'));
}
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
return redirect()->back()->with('fails', $e->getMessage());
}
}
}
}
/**
* function to show error log table page
* function to show error log table page.
*
* @param void
*
* @return response view
*/
public function showErrorLogs()

View File

@@ -152,7 +152,7 @@ class HelptopicController extends Controller
$sys_help_topic = \DB::table('settings_ticket')
->select('help_topic')
->where('id', '=', 1)->first();
return view('themes.default1.admin.helpdesk.manage.helptopic.edit', compact('priority', 'departments', 'topics', 'forms', 'agents', 'slas', 'sys_help_topic'));
} catch (Exception $e) {
return redirect('helptopic')->with('fails', '<li>'.$e->getMessage().'</li>');

View File

@@ -182,7 +182,7 @@ class SettingsController extends Controller
/* Check whether function success or not */
$systems->fill($request->input())->save();
/* redirect to Index page with Success Message */
// dd($datacontent);
//\Config::set('app.debug', $request->input('debug'));
return redirect('getsystem')->with('success', Lang::get('lang.system_updated_successfully'));

View File

@@ -104,7 +104,8 @@ class SlaController extends Controller
$slas = Sla_plan::whereId($id)->first();
$slas->get();
$sla = \DB::table('settings_ticket')->select('sla')->where('id', '=', 1)->first();
return view('themes.default1.admin.helpdesk.manage.sla.edit', compact('slas','sla'));
return view('themes.default1.admin.helpdesk.manage.sla.edit', compact('slas', 'sla'));
} catch (Exception $e) {
return redirect()->back()->with('fails', $e->getMessage());
}
@@ -137,6 +138,7 @@ class SlaController extends Controller
->where('id', '=', 1)
->update(['sla' => $id]);
}
return redirect('sla')->with('success', Lang::get('lang.sla_plan_updated_successfully'));
} catch (Exception $e) {
/* redirect to Index page with Fails Message */

View File

@@ -24,14 +24,15 @@ use Lang;
*
* @author Ladybird <info@ladybirdweb.com>
*/
class TemplateController extends Controller {
class TemplateController extends Controller
{
/**
* Create a new controller instance.
*
* @return type void
*/
public function __construct(PhpMailController $PhpMailController) {
public function __construct(PhpMailController $PhpMailController)
{
$this->PhpMailController = $PhpMailController;
$this->middleware('auth');
$this->middleware('roles');
@@ -44,7 +45,8 @@ class TemplateController extends Controller {
*
* @return type Response
*/
public function index(Template $template) {
public function index(Template $template)
{
try {
$templates = $template->get();
@@ -62,7 +64,8 @@ class TemplateController extends Controller {
*
* @return type Response
*/
public function create(Languages $language, Template $template) {
public function create(Languages $language, Template $template)
{
try {
$templates = $template->get();
$languages = $language->get();
@@ -81,7 +84,8 @@ class TemplateController extends Controller {
*
* @return type Response
*/
public function store(Template $template, TemplateRequest $request) {
public function store(Template $template, TemplateRequest $request)
{
try {
/* Check whether function success or not */
if ($template->fill($request->input())->save() == true) {
@@ -104,7 +108,8 @@ class TemplateController extends Controller {
*
* @return Response
*/
public function show($id) {
public function show($id)
{
//
}
@@ -117,37 +122,41 @@ class TemplateController extends Controller {
*
* @return type Response
*/
public function listdirectories() {
$path = \Config::get('view.paths')[0] . '/emails/';
public function listdirectories()
{
$path = \Config::get('view.paths')[0].'/emails/';
$directories = scandir($path);
$directory = str_replace('/', '-', $path);
return view('themes.default1.admin.helpdesk.emails.template.listdirectories', compact('directories', 'directory'));
}
public function listtemplates($template, $path) {
public function listtemplates($template, $path)
{
$paths = str_replace('-', '/', $path);
$directory2 = $paths . $template;
$directory2 = $paths.$template;
$templates = scandir($directory2);
$directory = str_replace('/', '-', $directory2 . '/');
$directory = str_replace('/', '-', $directory2.'/');
return view('themes.default1.admin.helpdesk.emails.template.listtemplates', compact('templates', 'directory'));
}
public function readtemplate($template, $path) {
public function readtemplate($template, $path)
{
$directory = str_replace('-', '/', $path);
$handle = fopen($directory . $template, 'r');
$contents = fread($handle, filesize($directory . $template));
$handle = fopen($directory.$template, 'r');
$contents = fread($handle, filesize($directory.$template));
fclose($handle);
return view('themes.default1.admin.helpdesk.emails.template.readtemplates', compact('contents', 'template', 'path'));
}
public function createtemplate() {
public function createtemplate()
{
$directory = '../resources/views/emails/';
$fname = Input::get('folder_name');
$filename = $directory . $fname;
$filename = $directory.$fname;
// images folder creation using php
// $mydir = dirname( __FILE__ )."/html/images";
@@ -159,7 +168,7 @@ class TemplateController extends Controller {
if (!file_exists($filename)) {
mkdir($filename, 0777);
}
$files = array_filter(scandir($directory . 'default'));
$files = array_filter(scandir($directory.'default'));
foreach ($files as $file) {
if ($file === '.' or $file === '..') {
@@ -167,27 +176,29 @@ class TemplateController extends Controller {
}
if (!is_dir($file)) {
// $file_to_go = str_replace("code/resources/views/emails/",'code/resources/views/emails/'.$fname,$file);
$destination = $directory . $fname . '/';
$destination = $directory.$fname.'/';
copy($directory . 'default/' . $file, $destination . $file);
copy($directory.'default/'.$file, $destination.$file);
}
}
return \Redirect::back()->with('success', 'Successfully copied');
}
public function writetemplate($template, $path) {
public function writetemplate($template, $path)
{
$directory = str_replace('-', '/', $path);
$b = Input::get('templatedata');
file_put_contents($directory . $template, print_r($b, true));
file_put_contents($directory.$template, print_r($b, true));
return \Redirect::back()->with('success', 'Successfully updated');
}
public function deletetemplate($template, $path) {
public function deletetemplate($template, $path)
{
$directory = str_replace('-', '/', $path);
$dir = $directory . $template;
$dir = $directory.$template;
$status = \DB::table('settings_email')->first();
if ($template == 'default' or $template == $status->template) {
return \Redirect::back()->with('fails', 'You cannot delete a default or active directory!');
@@ -196,7 +207,7 @@ class TemplateController extends Controller {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != '.' && $object != '..') {
unlink($dir . '/' . $object);
unlink($dir.'/'.$object);
}
}
rmdir($dir);
@@ -207,13 +218,15 @@ class TemplateController extends Controller {
return \Redirect::back()->with('success', 'Successfully Deleted');
}
public function activateset($setname) {
public function activateset($setname)
{
\DB::table('settings_email')->update(['template' => $setname]);
return \Redirect::back()->with('success', 'You have Successfully Activated this Set');
}
public function edit($id, Template $template, Languages $language) {
public function edit($id, Template $template, Languages $language)
{
try {
$templates = $template->whereId($id)->first();
$languages = $language->get();
@@ -233,7 +246,8 @@ class TemplateController extends Controller {
*
* @return type Response
*/
public function update($id, Template $template, TemplateUdate $request) {
public function update($id, Template $template, TemplateUdate $request)
{
try {
//TODO validation
$templates = $template->whereId($id)->first();
@@ -259,7 +273,8 @@ class TemplateController extends Controller {
*
* @return type Response
*/
public function destroy($id, Template $template) {
public function destroy($id, Template $template)
{
try {
$templates = $template->whereId($id)->first();
/* Check whether function success or not */
@@ -283,7 +298,8 @@ class TemplateController extends Controller {
*
* @return type Response
*/
public function formDiagno(Emails $email) {
public function formDiagno(Emails $email)
{
try {
$emails = $email->get();
@@ -300,7 +316,8 @@ class TemplateController extends Controller {
*
* @return type
*/
public function postDiagno(DiagnosRequest $request) {
public function postDiagno(DiagnosRequest $request)
{
try {
$email_details = Emails::where('id', '=', $request->from)->first();
if ($email_details->sending_protocol == 'mail') {
@@ -308,12 +325,12 @@ class TemplateController extends Controller {
$mail->IsSendmail(); // telling the class to use SendMail transport
$mail->SetFrom($email_details->email_address, $email_details->email_name); // sender details
$address = $request->to; // receiver email
$mail->AddAddress($address);
$mail->AddAddress($address);
$mail->Subject = $request->subject; // subject of the email
$body = $request->message; // body of the email
$mail->MsgHTML($body);
if (!$mail->Send()) {
$return = Lang::get('lang.mailer_error') . ': ' . $mail->ErrorInfo;
$mail->MsgHTML($body);
if (!$mail->Send()) {
$return = Lang::get('lang.mailer_error').': '.$mail->ErrorInfo;
} else {
$return = Lang::get('lang.message_has_been_sent');
}
@@ -323,8 +340,8 @@ class TemplateController extends Controller {
if ($email_details->smtp_validate == '1') {
$mail->SMTPOptions = [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true,
],
];
@@ -341,15 +358,15 @@ class TemplateController extends Controller {
$mail->Subject = $request->subject;
$mail->Body = utf8_decode($request->message);
if (!$mail->send()) {
$return = Lang::get('lang.mailer_error') . ': ' . $mail->ErrorInfo;
$return = Lang::get('lang.mailer_error').': '.$mail->ErrorInfo;
} else {
$return = Lang::get('lang.message_has_been_sent');
}
}
return redirect()->back()->with('success', $return);
} catch (Exception $e) {
return redirect()->back()->with('fails', $e->getMessage());
}
}
}

View File

@@ -166,7 +166,7 @@ class WorkflowController extends Controller
{
try {
// store a new workflow credentials in to the system
$workflow_name = new WorkflowName;
$workflow_name = new WorkflowName();
$workflow_name->name = $request->name;
$workflow_name->status = $request->status;
$workflow_name->order = $request->execution_order;

View File

@@ -27,15 +27,16 @@ use PhpImap\Mailbox as ImapMailbox;
*
* @author Ladybird <info@ladybirdweb.com>
*/
class MailController extends Controller {
class MailController extends Controller
{
/**
* constructor
* Create a new controller instance.
*
* @param type TicketController $TicketController
*/
public function __construct(TicketWorkflowController $TicketWorkflowController) {
public function __construct(TicketWorkflowController $TicketWorkflowController)
{
$this->middleware('board');
$this->TicketWorkflowController = $TicketWorkflowController;
}
@@ -45,7 +46,8 @@ class MailController extends Controller {
*
* @return type
*/
public function readmails(Emails $emails, Email $settings_email, System $system, Ticket $ticket) {
public function readmails(Emails $emails, Email $settings_email, System $system, Ticket $ticket)
{
// $path_url = $system->first()->url;
if ($settings_email->first()->email_fetching == 1) {
if ($settings_email->first()->all_emails == 1) {
@@ -80,7 +82,7 @@ class MailController extends Controller {
$protocol = $fetching_encryption2;
} else {
if ($e_mail->fetching_protocol) {
$fetching_protocol = '/' . $e_mail->fetching_protocol;
$fetching_protocol = '/'.$e_mail->fetching_protocol;
} else {
$fetching_protocol = '';
}
@@ -89,13 +91,13 @@ class MailController extends Controller {
} else {
$fetching_encryption = '';
}
$protocol = $fetching_protocol . $fetching_encryption;
$protocol = $fetching_protocol.$fetching_encryption;
}
$imap_config = '{' . $host . ':' . $port . $protocol . '}INBOX';
$imap_config = '{'.$host.':'.$port.$protocol.'}INBOX';
$password = Crypt::decrypt($e_mail->password);
$mailbox = new ImapMailbox($imap_config, $e_mail->email_address, $password, __DIR__);
$mails = [];
$mailsIds = $mailbox->searchMailBox('SINCE ' . date('d-M-Y', strtotime('-1 day')));
$mailsIds = $mailbox->searchMailBox('SINCE '.date('d-M-Y', strtotime('-1 day')));
if (!$mailsIds) {
die('Mailbox is empty');
}
@@ -135,7 +137,7 @@ class MailController extends Controller {
$date = $mail->date;
$datetime = $overview[0]->date;
$date_time = explode(' ', $datetime);
$date = $date_time[1] . '-' . $date_time[2] . '-' . $date_time[3] . ' ' . $date_time[4];
$date = $date_time[1].'-'.$date_time[2].'-'.$date_time[3].' '.$date_time[4];
$date = date('Y-m-d H:i:s', strtotime($date));
if (isset($mail->subject)) {
$subject = $mail->subject;
@@ -170,7 +172,7 @@ class MailController extends Controller {
// var_dump($attachment->filePath);
// dd($filepath);
// $path = $dir_img_path[0]."/code/public/".$filepath[1];
$path = public_path() . $filepath[1];
$path = public_path().$filepath[1];
// dd($path);
$filesize = filesize($path);
$file_data = file_get_contents($path);
@@ -179,7 +181,7 @@ class MailController extends Controller {
$string = str_replace('-', '', $attachment->name);
$filename = explode('src', $attachment->filePath);
$filename = str_replace('\\', '', $filename);
$body = str_replace('cid:' . $imageid, $filepath[1], $body);
$body = str_replace('cid:'.$imageid, $filepath[1], $body);
$pos = strpos($body, $filepath[1]);
if ($pos == false) {
if ($settings_email->first()->attachment == 1) {
@@ -224,7 +226,8 @@ class MailController extends Controller {
*
* @return type string
*/
public function separate_reply($body) {
public function separate_reply($body)
{
$body2 = explode('---Reply above this line---', $body);
$body3 = $body2[0];
@@ -238,7 +241,8 @@ class MailController extends Controller {
*
* @return type string
*/
public function decode_imap_text($str) {
public function decode_imap_text($str)
{
$result = '';
$decode_header = imap_mime_header_decode($str);
foreach ($decode_header as $obj) {
@@ -253,7 +257,8 @@ class MailController extends Controller {
*
* @return type
*/
public function fetch_attachments() {
public function fetch_attachments()
{
$uploads = Upload::all();
foreach ($uploads as $attachment) {
$image = @imagecreatefromstring($attachment->file);
@@ -261,8 +266,8 @@ class MailController extends Controller {
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
$var = '<a href="" target="_blank"><img src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
echo '<br/><span class="mailbox-attachment-icon has-img">' . $var . '</span>';
$var = '<a href="" target="_blank"><img src="data:image/jpg;base64,'.base64_encode($data).'"/></a>';
echo '<br/><span class="mailbox-attachment-icon has-img">'.$var.'</span>';
}
}
@@ -273,17 +278,19 @@ class MailController extends Controller {
*
* @return type file
*/
public function get_data($id) {
public function get_data($id)
{
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('id', '=', $id)->get();
foreach ($attachments as $attachment) {
header('Content-type: application/' . $attachment->type . '');
header('Content-Disposition: inline; filename=' . $attachment->name . '');
header('Content-type: application/'.$attachment->type.'');
header('Content-Disposition: inline; filename='.$attachment->name.'');
header('Content-Transfer-Encoding: binary');
echo $attachment->file;
}
}
public static function trimTableTag($html) {
public static function trimTableTag($html)
{
if (strpos('<table>', $html) != false) {
$first_pos = strpos($html, '<table');
$fist_string = substr_replace($html, '', 0, $first_pos);
@@ -292,23 +299,28 @@ class MailController extends Controller {
$diff = $total - $last_pos;
$str = substr_replace($fist_string, '', $last_pos, -1);
$final_str = str_finish($str, '</table>');
return $final_str;
}
return $html;
}
public static function trim3D($html) {
public static function trim3D($html)
{
$body = str_replace('=3D', '', $html);
return $body;
}
public static function trimInjections($html, $tags = ['<script>', '</script>', '<style>', '</style>', '<?php', '?>']) {
public static function trimInjections($html, $tags = ['<script>', '</script>', '<style>', '</style>', '<?php', '?>'])
{
$replace = [];
foreach ($tags as $key => $tag) {
$replace[$key] = htmlspecialchars($tag);
}
$body = str_replace($tags, $replace, $html);
return $body;
}
}

View File

@@ -91,6 +91,7 @@ class UserController extends Controller
} else {
$stringCut = $model->user_name;
}
return $stringCut;
})
/* column email */

View File

@@ -29,8 +29,8 @@ use Redirect;
*
* @author Ladybird <info@ladybirdweb.com>
*/
class ArticleController extends Controller {
class ArticleController extends Controller
{
/**
* Create a new controller instance.
* constructor to check
@@ -40,7 +40,8 @@ class ArticleController extends Controller {
*
* @return void
*/
public function __construct() {
public function __construct()
{
// checking authentication
$this->middleware('auth');
// checking roles
@@ -48,7 +49,8 @@ class ArticleController extends Controller {
SettingsController::language();
}
public function test() {
public function test()
{
//$table = $this->setDatatable();
return view('themes.default1.agent.kb.article.test');
}
@@ -58,7 +60,8 @@ class ArticleController extends Controller {
*
* @return type void
*/
public function getData() {
public function getData()
{
$article = new Article();
// returns chumper datatable
return Datatable::query($article)
@@ -68,7 +71,6 @@ class ArticleController extends Controller {
->orderColumns('name', 'description')
/* add column name */
->addColumn('name', function ($model) {
$string = strip_tags($model->name);
if (strlen($string) > 40) {
// truncate string
@@ -76,7 +78,8 @@ class ArticleController extends Controller {
} else {
$stringCut = $model->name;
}
return $stringCut . '...';
return $stringCut.'...';
})
/* add column Created */
->addColumn('publish_time', function ($model) {
@@ -87,8 +90,8 @@ class ArticleController extends Controller {
/* add column action */
->addColumn('Actions', function ($model) {
/* here are all the action buttons and modal popup to delete articles with confirmations */
return '<span data-toggle="modal" data-target="#deletearticle' . $model->id . '"><a href="#" ><button class="btn btn-danger btn-xs"></a> ' . \Lang::get('lang.delete') . ' </button></span>&nbsp;<a href=article/' . $model->id . '/edit class="btn btn-warning btn-xs">' . \Lang::get('lang.edit') . '</a>&nbsp;<a href=show/' . $model->slug . ' class="btn btn-primary btn-xs">' . \Lang::get('lang.view') . '</a>
<div class="modal fade" id="deletearticle' . $model->id . '">
return '<span data-toggle="modal" data-target="#deletearticle'.$model->id.'"><a href="#" ><button class="btn btn-danger btn-xs"></a> '.\Lang::get('lang.delete').' </button></span>&nbsp;<a href=article/'.$model->id.'/edit class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a>&nbsp;<a href=show/'.$model->slug.' class="btn btn-primary btn-xs">'.\Lang::get('lang.view').'</a>
<div class="modal fade" id="deletearticle'.$model->id.'">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
@@ -96,11 +99,11 @@ class ArticleController extends Controller {
<h4 class="modal-title">Are You Sure ?</h4>
</div>
<div class="modal-body">
' . $model->name . '
'.$model->name.'
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">Close</button>
<a href="article/delete/' . $model->slug . '"><button class="btn btn-danger">delete</button></a>
<a href="article/delete/'.$model->slug.'"><button class="btn btn-danger">delete</button></a>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
@@ -114,7 +117,8 @@ class ArticleController extends Controller {
*
* @return type view
*/
public function index() {
public function index()
{
/* show article list */
try {
return view('themes.default1.agent.kb.article.index');
@@ -130,7 +134,8 @@ class ArticleController extends Controller {
*
* @return type view
*/
public function create(Category $category) {
public function create(Category $category)
{
/* get the attributes of the category */
$category = $category->lists('id', 'name');
/* get the create page */
@@ -149,9 +154,10 @@ class ArticleController extends Controller {
*
* @return type redirect
*/
public function store(Article $article, ArticleRequest $request) {
public function store(Article $article, ArticleRequest $request)
{
// requesting the values to store article data
$publishTime = $request->input('year') . '-' . $request->input('month') . '-' . $request->input('day') . ' ' . $request->input('hour') . ':' . $request->input('minute') . ':00';
$publishTime = $request->input('year').'-'.$request->input('month').'-'.$request->input('day').' '.$request->input('hour').':'.$request->input('minute').':00';
$sl = $request->input('name');
$slug = str_slug($sl, '-');
@@ -171,7 +177,7 @@ class ArticleController extends Controller {
return redirect('article')->with('success', Lang::get('lang.article_inserted_successfully'));
} catch (Exception $e) {
return redirect('article')->with('fails', Lang::get('lang.article_not_inserted') . '<li>' . $e->getMessage() . '</li>');
return redirect('article')->with('fails', Lang::get('lang.article_not_inserted').'<li>'.$e->getMessage().'</li>');
}
}
@@ -185,7 +191,8 @@ class ArticleController extends Controller {
*
* @return view
*/
public function edit($slug) {
public function edit($slug)
{
$article = new Article();
$relation = new Relationship();
$category = new Category();
@@ -216,11 +223,12 @@ class ArticleController extends Controller {
*
* @return Response
*/
public function update($slug, ArticleUpdate $request) {
public function update($slug, ArticleUpdate $request)
{
$article = new Article();
$relation = new Relationship();
$aid = $article->where('id', $slug)->first();
$publishTime = $request->input('year') . '-' . $request->input('month') . '-' . $request->input('day') . ' ' . $request->input('hour') . ':' . $request->input('minute') . ':00';
$publishTime = $request->input('year').'-'.$request->input('month').'-'.$request->input('day').' '.$request->input('hour').':'.$request->input('minute').':00';
$id = $aid->id;
$sl = $request->input('slug');
@@ -247,7 +255,7 @@ class ArticleController extends Controller {
return redirect('article')->with('success', Lang::get('lang.article_updated_successfully'));
} catch (Exception $e) {
return redirect('article')->with('fails', Lang::get('lang.article_not_updated') . '<li>' . $e->getMessage() . '</li>');
return redirect('article')->with('fails', Lang::get('lang.article_not_updated').'<li>'.$e->getMessage().'</li>');
}
}
@@ -259,7 +267,8 @@ class ArticleController extends Controller {
*
* @return Response
*/
public function destroy($slug, Article $article, Relationship $relation, Comment $comment) {
public function destroy($slug, Article $article, Relationship $relation, Comment $comment)
{
/* delete the selected article from the table */
$article = $article->where('slug', $slug)->first(); //get the selected article via id
$id = $article->id;
@@ -293,7 +302,8 @@ class ArticleController extends Controller {
*
* @return type
*/
public static function usertimezone($utc) {
public static function usertimezone($utc)
{
$user = Auth::user();
$tz = $user->timezone;
$set = Settings::whereId('1')->first();
@@ -304,5 +314,4 @@ class ArticleController extends Controller {
$date = date($format, strtotime($utc) + $offset);
echo $date;
}
}

View File

@@ -23,8 +23,8 @@ use Redirect;
*
* @author Ladybird <info@ladybirdweb.com>
*/
class CategoryController extends Controller {
class CategoryController extends Controller
{
/**
* Create a new controller instance.
* constructor to check
@@ -34,7 +34,8 @@ class CategoryController extends Controller {
*
* @return void
*/
public function __construct() {
public function __construct()
{
// checking authentication
$this->middleware('auth');
// checking roles
@@ -49,7 +50,8 @@ class CategoryController extends Controller {
*
* @return Response
*/
public function index() {
public function index()
{
/* get the view of index of the catogorys with all attributes
of category model */
try {
@@ -64,7 +66,8 @@ class CategoryController extends Controller {
*
* @return type chumper datatable
*/
public function getData() {
public function getData()
{
/* fetching chumper datatables */
return Datatable::collection(Category::All())
/* search column name */
@@ -73,7 +76,6 @@ class CategoryController extends Controller {
->orderColumns('name', 'description')
/* add column name */
->addColumn('name', function ($model) {
$string = strip_tags($model->name);
if (strlen($string) > 40) {
// truncate string
@@ -81,6 +83,7 @@ class CategoryController extends Controller {
} else {
$stringCut = $model->name;
}
return $stringCut.'...';
})
/* add column Created */
@@ -92,20 +95,20 @@ class CategoryController extends Controller {
/* add column Actions */
/* there are action buttons and modal popup to delete a data column */
->addColumn('Actions', function ($model) {
return '<span data-toggle="modal" data-target="#deletecategory' . $model->slug . '"><a href="#" ><button class="btn btn-danger btn-xs"></a>' . \Lang::get('lang.delete') . '</button></span>&nbsp;<a href=category/' . $model->id . '/edit class="btn btn-warning btn-xs">' . \Lang::get('lang.edit') . '</a>&nbsp;<a href=article-list class="btn btn-primary btn-xs">' . \Lang::get('lang.view') . '</a>
<div class="modal fade" id="deletecategory' . $model->slug . '">
return '<span data-toggle="modal" data-target="#deletecategory'.$model->slug.'"><a href="#" ><button class="btn btn-danger btn-xs"></a>'.\Lang::get('lang.delete').'</button></span>&nbsp;<a href=category/'.$model->id.'/edit class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a>&nbsp;<a href=article-list class="btn btn-primary btn-xs">'.\Lang::get('lang.view').'</a>
<div class="modal fade" id="deletecategory'.$model->slug.'">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">' . Lang::get('lang.are_you_sure_you_want_to_delete') . '</h4>
<h4 class="modal-title">'.Lang::get('lang.are_you_sure_you_want_to_delete').'</h4>
</div>
<div class="modal-body">
' . $model->name . '
'.$model->name.'
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">' . Lang::get('lang.close') . '</button>
<a href="category/delete/' . $model->id . '"><button class="btn btn-danger">' . Lang::get('lang.delete') . '</button></a>
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">'.Lang::get('lang.close').'</button>
<a href="category/delete/'.$model->id.'"><button class="btn btn-danger">'.Lang::get('lang.delete').'</button></a>
</div>
</div>
</div>
@@ -121,7 +124,8 @@ class CategoryController extends Controller {
*
* @return type view
*/
public function create(Category $category) {
public function create(Category $category)
{
/* Get the all attributes in the category model */
$category = $category->get();
/* get the view page to create new category with all attributes
@@ -141,7 +145,8 @@ class CategoryController extends Controller {
*
* @return type Redirect
*/
public function store(Category $category, CategoryRequest $request) {
public function store(Category $category, CategoryRequest $request)
{
/* Get the whole request from the form and insert into table via model */
$sl = $request->input('slug');
$slug = str_slug($sl, '-');
@@ -152,7 +157,7 @@ class CategoryController extends Controller {
return Redirect::back()->with('success', Lang::get('lang.category_inserted_successfully'));
} catch (Exception $e) {
return Redirect::back()->with('fails', Lang::get('lang.category_not_inserted') . '<li>' . $e->getMessage() . '</li>');
return Redirect::back()->with('fails', Lang::get('lang.category_not_inserted').'<li>'.$e->getMessage().'</li>');
}
}
@@ -164,7 +169,8 @@ class CategoryController extends Controller {
*
* @return type view
*/
public function edit($slug) {
public function edit($slug)
{
// fetch the category
$cid = Category::where('id', $slug)->first();
$id = $cid->id;
@@ -183,7 +189,8 @@ class CategoryController extends Controller {
*
* @return type redirect
*/
public function update($slug, CategoryUpdate $request) {
public function update($slug, CategoryUpdate $request)
{
/* Edit the selected category via id */
$category = Category::where('id', $slug)->first();
@@ -197,10 +204,11 @@ class CategoryController extends Controller {
$category->fill($request->all())->save();
$category->slug = $slug;
$category->save();
return redirect('category')->with('success', Lang::get('lang.category_updated_successfully'));
} catch (Exception $e) {
//redirect to index with fails message
return redirect('category')->with('fails', Lang::get('lang.category_not_updated') . '<li>' . $e->getMessage() . '</li>');
return redirect('category')->with('fails', Lang::get('lang.category_not_updated').'<li>'.$e->getMessage().'</li>');
}
}
@@ -213,7 +221,8 @@ class CategoryController extends Controller {
*
* @return type Redirect
*/
public function destroy($id, Category $category, Relationship $relation) {
public function destroy($id, Category $category, Relationship $relation)
{
$relation = $relation->where('category_id', $id)->first();
if ($relation != null) {
return Redirect::back()->with('fails', Lang::get('lang.category_not_deleted'));
@@ -226,9 +235,8 @@ class CategoryController extends Controller {
return Redirect::back()->with('success', Lang::get('lang.category_deleted_successfully'));
} catch (Exception $e) {
return Redirect::back()->with('fails', Lang::get('lang.category_not_deleted') . '<li>' . $e->getMessage() . '</li>');
return Redirect::back()->with('fails', Lang::get('lang.category_not_deleted').'<li>'.$e->getMessage().'</li>');
}
}
}
}

View File

@@ -21,8 +21,8 @@ use Lang;
*
* @author Ladybird <info@ladybirdweb.com>
*/
class PageController extends Controller {
class PageController extends Controller
{
/**
* Create a new controller instance.
* constructor to check
@@ -32,7 +32,8 @@ class PageController extends Controller {
*
* @return void
*/
public function __construct(Page $page) {
public function __construct(Page $page)
{
// checking authentication
$this->middleware('auth');
// checking roles
@@ -46,7 +47,8 @@ class PageController extends Controller {
*
* @return type
*/
public function index() {
public function index()
{
$pages = $this->page->paginate(3);
$pages->setPath('page');
try {
@@ -61,7 +63,8 @@ class PageController extends Controller {
*
* @return type
*/
public function getData() {
public function getData()
{
/* fetching chumper datatables */
return Datatable::collection(Page::All())
/* search column name */
@@ -81,8 +84,8 @@ class PageController extends Controller {
/* add column Actions */
/* there are action buttons and modal popup to delete a data column */
->addColumn('Actions', function ($model) {
return '<span data-toggle="modal" data-target="#deletepage' . $model->id . '"><a href="#" ><button class="btn btn-danger btn-xs"></a> ' . \Lang::get('lang.delete') . '</button></span>&nbsp;<a href=page/' . $model->slug . '/edit class="btn btn-warning btn-xs">' . \Lang::get('lang.edit') . '</a>&nbsp;<a href=pages/' . $model->slug . ' class="btn btn-primary btn-xs">' . \Lang::get('lang.view') . '</a>
<div class="modal fade" id="deletepage' . $model->id . '">
return '<span data-toggle="modal" data-target="#deletepage'.$model->id.'"><a href="#" ><button class="btn btn-danger btn-xs"></a> '.\Lang::get('lang.delete').'</button></span>&nbsp;<a href=page/'.$model->slug.'/edit class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a>&nbsp;<a href=pages/'.$model->slug.' class="btn btn-primary btn-xs">'.\Lang::get('lang.view').'</a>
<div class="modal fade" id="deletepage'.$model->id.'">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
@@ -90,11 +93,11 @@ class PageController extends Controller {
<h4 class="modal-title">Are You Sure ?</h4>
</div>
<div class="modal-body">
' . $model->name . '
'.$model->name.'
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">Close</button>
<a href="page/delete/' . $model->id . '"><button class="btn btn-danger">delete</button></a>
<a href="page/delete/'.$model->id.'"><button class="btn btn-danger">delete</button></a>
</div>
</div>
</div>
@@ -108,7 +111,8 @@ class PageController extends Controller {
*
* @return type view
*/
public function create() {
public function create()
{
return view('themes.default1.agent.kb.pages.create');
}
@@ -119,7 +123,8 @@ class PageController extends Controller {
*
* @return type
*/
public function store(PageRequest $request) {
public function store(PageRequest $request)
{
$sl = $request->input('slug');
$slug = str_slug($sl, '-');
$this->page->slug = $slug;
@@ -139,7 +144,8 @@ class PageController extends Controller {
*
* @return type view
*/
public function edit($slug) {
public function edit($slug)
{
try {
$page = $this->page->where('slug', $slug)->first();
@@ -157,7 +163,8 @@ class PageController extends Controller {
*
* @return type redirect
*/
public function update($slug, PageUpdate $request) {
public function update($slug, PageUpdate $request)
{
// get pages with respect to slug
$pages = $this->page->where('slug', $slug)->first();
$sl = $request->input('slug');
@@ -181,7 +188,8 @@ class PageController extends Controller {
*
* @return type redirect
*/
public function destroy($id) {
public function destroy($id)
{
try {
// get the page to be deleted
$page = $this->page->whereId($id)->first();
@@ -192,5 +200,4 @@ class PageController extends Controller {
return redirect('page')->with('fails', $e->getMessage());
}
}
}

View File

@@ -29,8 +29,8 @@ use Mail;
*
* @author Ladybird <info@ladybirdweb.com>
*/
class AuthController extends Controller {
class AuthController extends Controller
{
use AuthenticatesAndRegistersUsers;
/* to redirect after login */
@@ -50,7 +50,8 @@ class AuthController extends Controller {
*
* @return void
*/
public function __construct(PhpMailController $PhpMailController) {
public function __construct(PhpMailController $PhpMailController)
{
$this->PhpMailController = $PhpMailController;
SettingsController::smtp();
$this->middleware('guest', ['except' => 'getLogout']);
@@ -61,7 +62,8 @@ class AuthController extends Controller {
*
* @return type Response
*/
public function getRegister() {
public function getRegister()
{
// Event for login
\Event::fire(new \App\Events\FormRegisterEvent());
if (Auth::user()) {
@@ -83,7 +85,8 @@ class AuthController extends Controller {
*
* @return type Response
*/
public function postRegister(User $user, RegisterRequest $request) {
public function postRegister(User $user, RegisterRequest $request)
{
// Event for login
\Event::fire(new \App\Events\LoginEvent($request));
$password = Hash::make($request->input('password'));
@@ -97,22 +100,26 @@ class AuthController extends Controller {
$user->remember_token = $code;
$user->save();
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $name, 'email' => $request->input('email')], $message = ['subject' => 'Activate your Account', 'scenario' => 'registration'], $template_variables = ['user' => $name, 'email_address' => $request->input('email'), 'password_reset_link' => url('account/activate/' . $code)]);
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $name, 'email' => $request->input('email')], $message = ['subject' => 'Activate your Account', 'scenario' => 'registration'], $template_variables = ['user' => $name, 'email_address' => $request->input('email'), 'password_reset_link' => url('account/activate/'.$code)]);
return redirect('home')->with('success', Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail'));
}
/**
* Function to activate account
* Function to activate account.
*
* @param type $token
*
* @return type redirect
*/
public function accountActivate($token) {
public function accountActivate($token)
{
$user = User::where('remember_token', '=', $token)->first();
if ($user) {
$user->active = 1;
$user->remember_token = NULL;
$user->remember_token = null;
$user->save();
return redirect('/auth/login')->with('status', 'Acount activated. Login to start');
} else {
return redirect('/auth/login')->with('fails', 'Invalid Token');
@@ -127,7 +134,8 @@ class AuthController extends Controller {
*
* @return type Response
*/
public function getMail($token, User $user) {
public function getMail($token, User $user)
{
$user = $user->where('remember_token', $token)->where('active', 0)->first();
if ($user) {
$user->active = 1;
@@ -144,7 +152,8 @@ class AuthController extends Controller {
*
* @return type Response
*/
public function getLogin() {
public function getLogin()
{
if (Auth::user()) {
if (Auth::user()->role == 'admin' || Auth::user()->role == 'agent') {
return \Redirect::route('dashboard');
@@ -163,7 +172,8 @@ class AuthController extends Controller {
*
* @return type Response
*/
public function postLogin(LoginRequest $request) {
public function postLogin(LoginRequest $request)
{
// Set login attempts and login time
$value = $_SERVER['REMOTE_ADDR'];
$usernameinput = $request->input('email');
@@ -182,7 +192,7 @@ class AuthController extends Controller {
return redirect()->back()
->withInput($request->only('email', 'remember'))
->withErrors([
'email' => $this->getFailedLoginMessage(),
'email' => $this->getFailedLoginMessage(),
'password' => $this->getFailedLoginMessage(),
])->with('error', Lang::get('lang.this_account_is_currently_inactive'));
}
@@ -190,7 +200,7 @@ class AuthController extends Controller {
return redirect()->back()
->withInput($request->only('email', 'remember'))
->withErrors([
'email' => $this->getFailedLoginMessage(),
'email' => $this->getFailedLoginMessage(),
'password' => $this->getFailedLoginMessage(),
])->with('error', Lang::get('lang.this_account_is_currently_inactive'));
}
@@ -233,7 +243,7 @@ class AuthController extends Controller {
return redirect()->back()
->withInput($request->only('email', 'remember'))
->withErrors([
'email' => $this->getFailedLoginMessage(),
'email' => $this->getFailedLoginMessage(),
'password' => $this->getFailedLoginMessage(),
])->with('error', Lang::get('lang.invalid'));
// Increment login attempts
@@ -246,7 +256,8 @@ class AuthController extends Controller {
*
* @return type Response
*/
public function addLoginAttempt($value, $field) {
public function addLoginAttempt($value, $field)
{
$result = DB::table('login_attempts')->where('IP', '=', $value)->first();
$data = $result;
$security = Security::whereId('1')->first();
@@ -254,7 +265,7 @@ class AuthController extends Controller {
if ($data) {
$attempts = $data->Attempts + 1;
if ($attempts == $apt) {
$result = DB::select('UPDATE login_attempts SET Attempts=' . $attempts . ", LastLogin=NOW() WHERE IP = '$value' OR User = '$field'");
$result = DB::select('UPDATE login_attempts SET Attempts='.$attempts.", LastLogin=NOW() WHERE IP = '$value' OR User = '$field'");
} else {
$result = DB::table('login_attempts')->where('IP', '=', $value)->orWhere('User', '=', $field)->update(['Attempts' => $attempts]);
// $result = DB::select("UPDATE login_attempts SET Attempts=".$attempts." WHERE IP = '$value' OR User = '$field'");
@@ -271,7 +282,8 @@ class AuthController extends Controller {
*
* @return type Response
*/
public function clearLoginAttempts($value, $field) {
public function clearLoginAttempts($value, $field)
{
$data = DB::table('login_attempts')->where('IP', '=', $value)->orWhere('User', '=', $field)->update(['attempts' => '0']);
return $data;
@@ -284,13 +296,14 @@ class AuthController extends Controller {
*
* @return type Response
*/
public function confirmIPAddress($value, $field) {
public function confirmIPAddress($value, $field)
{
$security = Security::whereId('1')->first();
$time = $security->lockout_period;
$max_attempts = $security->backlist_threshold;
$table = 'login_attempts';
$result = DB::select('SELECT Attempts, (CASE when LastLogin is not NULL and DATE_ADD(LastLogin, INTERVAL ' . $time . ' MINUTE)>NOW() then 1 else 0 end) as Denied ' .
' FROM ' . $table . " WHERE IP = '$value' OR User = '$field'");
$result = DB::select('SELECT Attempts, (CASE when LastLogin is not NULL and DATE_ADD(LastLogin, INTERVAL '.$time.' MINUTE)>NOW() then 1 else 0 end) as Denied '.
' FROM '.$table." WHERE IP = '$value' OR User = '$field'");
$data = $result;
//Verify that at least one login attempt is in database
if (!$data) {
@@ -314,8 +327,8 @@ class AuthController extends Controller {
*
* @return type string
*/
protected function getFailedLoginMessage() {
protected function getFailedLoginMessage()
{
return Lang::get('lang.this_field_do_not_match_our_records');
}
}

View File

@@ -57,7 +57,7 @@ class ClientTicketController extends Controller
* @return type view
*/
public function reply($id, Request $request)
{
{
$tickets = Tickets::where('id', '=', $id)->first();
$thread = Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();

View File

@@ -33,15 +33,16 @@ use Redirect;
*
* @author Ladybird <info@ladybirdweb.com>
*/
class FormController extends Controller {
class FormController extends Controller
{
/**
* Create a new controller instance.
* Constructor to check.
*
* @return void
*/
public function __construct(TicketWorkflowController $TicketWorkflowController) {
public function __construct(TicketWorkflowController $TicketWorkflowController)
{
$this->middleware('board');
// creating a TicketController instance
$this->TicketWorkflowController = $TicketWorkflowController;
@@ -54,7 +55,8 @@ class FormController extends Controller {
*
* @return type
*/
public function getForm(Help_topic $topic, CountryCode $code) {
public function getForm(Help_topic $topic, CountryCode $code)
{
if (\Config::get('database.install') == '%0%') {
return \Redirect::route('license');
}
@@ -78,13 +80,13 @@ class FormController extends Controller {
*
* @return type string
*/
public function postForm($id, Help_topic $topic) {
public function postForm($id, Help_topic $topic)
{
if ($id != 0) {
$helptopic = $topic->where('id', '=', $id)->first();
$custom_form = $helptopic->custom_form;
$values = Fields::where('forms_id', '=', $custom_form)->get();
if (!$values) {
}
if ($values) {
foreach ($values as $value) {
@@ -93,29 +95,29 @@ class FormController extends Controller {
$value = explode(',', $data);
echo '<select class="form-control">';
foreach ($value as $option) {
echo '<option>' . $option . '</option>';
echo '<option>'.$option.'</option>';
}
echo '</select></br>';
} elseif ($value->type == 'radio') {
$type2 = $value->value;
$val = explode(',', $type2);
echo '<label class="radio-inline">' . $value->label . '</label>&nbsp&nbsp&nbsp<input type="' . $value->type . '" name="' . $value->name . '">&nbsp;&nbsp;' . $val[0] . '
&nbsp&nbsp&nbsp<input type="' . $value->type . '" name="' . $value->name . '">&nbsp;&nbsp;' . $val[1] . '</br>';
echo '<label class="radio-inline">'.$value->label.'</label>&nbsp&nbsp&nbsp<input type="'.$value->type.'" name="'.$value->name.'">&nbsp;&nbsp;'.$val[0].'
&nbsp&nbsp&nbsp<input type="'.$value->type.'" name="'.$value->name.'">&nbsp;&nbsp;'.$val[1].'</br>';
} elseif ($value->type == 'textarea') {
$type3 = $value->value;
$v = explode(',', $type3);
//dd($v);
if (array_key_exists(1, $v)) {
echo '<label>' . $value->label . '</label></br><textarea class=form-control rows="' . $v[0] . '" cols="' . $v[1] . '"></textarea></br>';
echo '<label>'.$value->label.'</label></br><textarea class=form-control rows="'.$v[0].'" cols="'.$v[1].'"></textarea></br>';
} else {
echo '<label>' . $value->label . '</label></br><textarea class=form-control rows="10" cols="60"></textarea></br>';
echo '<label>'.$value->label.'</label></br><textarea class=form-control rows="10" cols="60"></textarea></br>';
}
} elseif ($value->type == 'checkbox') {
$type4 = $value->value;
$check = explode(',', $type4);
echo '<label class="radio-inline">' . $value->label . '&nbsp&nbsp&nbsp<input type="' . $value->type . '" name="' . $value->name . '">&nbsp&nbsp' . $check[0] . '</label><label class="radio-inline"><input type="' . $value->type . '" name="' . $value->name . '">&nbsp&nbsp' . $check[1] . '</label></br>';
echo '<label class="radio-inline">'.$value->label.'&nbsp&nbsp&nbsp<input type="'.$value->type.'" name="'.$value->name.'">&nbsp&nbsp'.$check[0].'</label><label class="radio-inline"><input type="'.$value->type.'" name="'.$value->name.'">&nbsp&nbsp'.$check[1].'</label></br>';
} else {
echo '<label>' . $value->label . '</label><input type="' . $value->type . '" class="form-control" name="' . $value->name . '" /></br>';
echo '<label>'.$value->label.'</label><input type="'.$value->type.'" class="form-control" name="'.$value->name.'" /></br>';
}
}
}
@@ -130,8 +132,8 @@ class FormController extends Controller {
* @param type Request $request
* @param type User $user
*/
public function postedForm(User $user, ClientRequest $request, Ticket $ticket_settings, Ticket_source $ticket_source, Ticket_attachments $ta, CountryCode $code) {
public function postedForm(User $user, ClientRequest $request, Ticket $ticket_settings, Ticket_source $ticket_source, Ticket_attachments $ta, CountryCode $code)
{
$form_extras = $request->except('Name', 'Phone', 'Email', 'Subject', 'Details', 'helptopic', '_wysihtml5_mode', '_token');
$name = $request->input('Name');
@@ -159,8 +161,8 @@ class FormController extends Controller {
$geoipcode = $code->where('iso', '=', $location['isoCode'])->first();
if ($phonecode == null) {
$data = [
'fails' => Lang::get('lang.country-code-required-error'),
'phonecode' => $geoipcode->phonecode,
'fails' => Lang::get('lang.country-code-required-error'),
'phonecode' => $geoipcode->phonecode,
'country_code_error' => 1,
];
@@ -169,8 +171,8 @@ class FormController extends Controller {
$code = CountryCode::select('phonecode')->where('phonecode', '=', $phonecode)->get();
if (!count($code)) {
$data = [
'fails' => Lang::get('lang.incorrect-country-code-error'),
'phonecode' => $geoipcode->phonecode,
'fails' => Lang::get('lang.incorrect-country-code-error'),
'phonecode' => $geoipcode->phonecode,
'country_code_error' => 1,
];
@@ -196,7 +198,7 @@ class FormController extends Controller {
}
}
return Redirect::back()->with('success', Lang::get('lang.Ticket-has-been-created-successfully-your-ticket-number-is') . ' ' . $result[0] . '. ' . Lang::get('lang.Please-save-this-for-future-reference'));
return Redirect::back()->with('success', Lang::get('lang.Ticket-has-been-created-successfully-your-ticket-number-is').' '.$result[0].'. '.Lang::get('lang.Please-save-this-for-future-reference'));
}
}
@@ -207,13 +209,14 @@ class FormController extends Controller {
*
* @return type view
*/
public function post_ticket_reply($id, Request $request) {
public function post_ticket_reply($id, Request $request)
{
try {
if ($comment != null) {
$tickets = Tickets::where('id', '=', $id)->first();
$thread = Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
$subject = $thread->title . '[#' . $tickets->ticket_number . ']';
$subject = $thread->title.'[#'.$tickets->ticket_number.']';
$body = $request->input('comment');
$user_cred = User::where('id', '=', $tickets->user_id)->first();
@@ -245,7 +248,7 @@ class FormController extends Controller {
} catch (Exception $e) {
return \Redirect::back()->with('fails1', $e->getMessage());
}
//
//
// $comment = $request->input('comment');
// if ($comment != null) {
// $tickets = Tickets::where('id', '=', $id)->first();
@@ -270,5 +273,4 @@ class FormController extends Controller {
// return \Redirect::back()->with('fails1', Lang::get('lang.please_fill_some_data'));
// }
}
}

View File

@@ -15,10 +15,11 @@ use Redirect;
*
* @author Ladybird <info@ladybirdweb.com>
*/
class WelcomepageController extends Controller {
public function __construct() {
// $this->middleware('board');
class WelcomepageController extends Controller
{
public function __construct()
{
// $this->middleware('board');
}
/**
@@ -26,7 +27,8 @@ class WelcomepageController extends Controller {
*
* @return Response
*/
public function get(System $note) {
public function get(System $note)
{
if (Config::get('database.install') == '%0%') {
return Redirect::route('licence');
}
@@ -38,12 +40,12 @@ class WelcomepageController extends Controller {
return view('themes.default1.client.guest-user.guest', compact('heading', 'content'));
}
public function index() {
public function index()
{
if (Config::get('database.install') == '%0%') {
return Redirect::route('licence');
}
return view('themes.default1.client.helpdesk.guest-user.index');
}
}

View File

@@ -11,9 +11,10 @@ use App\Model\helpdesk\Settings\Email;
use App\User;
use Auth;
class PhpMailController extends Controller {
public function fetch_smtp_details($id) {
class PhpMailController extends Controller
{
public function fetch_smtp_details($id)
{
$emails = Emails::where('id', '=', $id)->first();
if ($emails->sending_status == 1) {
return $emails;
@@ -29,7 +30,8 @@ class PhpMailController extends Controller {
*
* @return Mail
*/
public function sendmail($from, $to, $message, $template_variables) {
public function sendmail($from, $to, $message, $template_variables)
{
// dd($from);
$from_address = $this->fetch_smtp_details($from);
if ($from_address == null) {
@@ -221,8 +223,7 @@ class PhpMailController extends Controller {
// dd($messagebody);
//$mail->SMTPDebug = 3; // Enable verbose debug output
if ($protocol == "smtp") {
if ($protocol == 'smtp') {
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = $host; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
@@ -231,7 +232,7 @@ class PhpMailController extends Controller {
$mail->SMTPSecure = $smtpsecure; // Enable TLS encryption, `ssl` also accepted
$mail->Port = $port; // TCP port to connect to
$mail->setFrom($username, $fromname);
} elseif ($protocol == "mail") {
} elseif ($protocol == 'mail') {
$mail->IsSendmail(); // telling the class to use SendMail transport
if ($username == $fromname) {
$mail->setFrom($username);
@@ -269,7 +270,7 @@ class PhpMailController extends Controller {
$mail->Subject = $subject;
if ($template == 'ticket-reply-agent') {
$line = '---Reply above this line--- <br/><br/>';
$mail->Body = utf8_decode($line . $messagebody);
$mail->Body = utf8_decode($line.$messagebody);
} else {
$mail->Body = utf8_decode($messagebody);
}
@@ -292,7 +293,8 @@ class PhpMailController extends Controller {
*
* @return MailNotification
*/
public function sendEmail($from, $to, $message) {
public function sendEmail($from, $to, $message)
{
// dd($from);
$from_address = $this->fetch_smtp_details($from);
@@ -418,7 +420,8 @@ class PhpMailController extends Controller {
*
* @return type
*/
public function company() {
public function company()
{
$company = Company::Where('id', '=', '1')->first();
if ($company->company_name == null) {
$company = 'Support Center';
@@ -480,7 +483,8 @@ class PhpMailController extends Controller {
*
* @return type integer
*/
public function mailfrom($reg, $dept_id) {
public function mailfrom($reg, $dept_id)
{
$email = Email::where('id', '=', '1')->first();
if ($reg == 1) {
return $email->sys_email;
@@ -493,5 +497,4 @@ class PhpMailController extends Controller {
}
}
}
}

View File

@@ -41,6 +41,6 @@ class Kernel extends HttpKernel
'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,
'jwt.refresh' => \Tymon\JWTAuth\Middleware\RefreshToken::class,
'update' => \App\Http\Middleware\CheckUpdate::class,
'board' => \App\Http\Middleware\CheckBoard::class,
'board' => \App\Http\Middleware\CheckBoard::class,
];
}

View File

@@ -7,19 +7,22 @@ use Closure;
/**
* CheckBoard.
* Checking if the system board is online or offline
* Checking if the system board is online or offline.
*
* @author Ladybird <info@ladybirdweb.com>
*/
class CheckBoard {
class CheckBoard
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
*
* @return type Mixed
*/
public function handle($request, Closure $next) {
public function handle($request, Closure $next)
{
if ($this->checkBoard() == '1') {
return $next($request);
} else {
@@ -28,16 +31,18 @@ class CheckBoard {
}
/**
* Function to get the system offline details
* Function to get the system offline details.
*
* @return type Mixed
*/
public function checkBoard() {
public function checkBoard()
{
$res = 0;
$system = new System;
$system = new System();
if ($system->first()) {
$res = $system->first()->status;
}
return $res;
}
}

View File

@@ -31,6 +31,7 @@ class CheckUpdate
return redirect('file-update');
}
}
return $next($request);
}
@@ -46,11 +47,11 @@ class CheckUpdate
public function checkNewUpdate()
{
$notify = new BarNotification();
if(!\Schema::hasTable('bar_notifications')){
if (!\Schema::hasTable('bar_notifications')) {
$url = url('database-upgrade');
//$string = "Your Database is outdated please upgrade <a href=$url>Now !</a>";
echo view('themes.default1.update.database', compact('url'));
exit;
exit;
}
$not = $notify->get();
if ($not->count() > 0) {

View File

@@ -13,7 +13,7 @@
Route::group(['middleware' => 'update'], function () {
Route::controllers([
'auth' => 'Auth\AuthController',
'auth' => 'Auth\AuthController',
'password' => 'Auth\PasswordController',
]);
});
@@ -335,12 +335,12 @@ Route::group(['middleware' => 'roles', 'middleware' => 'auth', 'middleware' => '
//route for submit error and debugging setting form page
Route::post('post-settings', ['as' => 'post.error.debug.settings',
'uses' => 'Admin\helpdesk\ErrorAndDebuggingController@postSettings']);
'uses' => 'Admin\helpdesk\ErrorAndDebuggingController@postSettings', ]);
//route to error logs table page
Route::get('show-error-logs', [
'as' => 'error.logs',
'uses' => 'Admin\helpdesk\ErrorAndDebuggingController@showErrorLogs'
'as' => 'error.logs',
'uses' => 'Admin\helpdesk\ErrorAndDebuggingController@showErrorLogs',
]);
});
@@ -565,7 +565,7 @@ Route::POST('tickets/search/', function () {
});
Route::any('getdata', function () {
$term = Illuminate\Support\Str::lower(Input::get('term'));
$data = Illuminate\Support\Facades\DB::table('tickets')->distinct()->select('ticket_number')->where('ticket_number', 'LIKE', $term . '%')->groupBy('ticket_number')->take(10)->get();
$data = Illuminate\Support\Facades\DB::table('tickets')->distinct()->select('ticket_number')->where('ticket_number', 'LIKE', $term.'%')->groupBy('ticket_number')->take(10)->get();
foreach ($data as $v) {
return [
'value' => $v->ticket_number,
@@ -714,7 +714,7 @@ Route::get('auto-close-tickets', ['as' => 'auto.close', 'uses' => 'Agent\helpdes
|=============================================================
*/
Route::get('500', ['as' => 'error500', function () {
return view('errors.500');
return view('errors.500');
}]);
Breadcrumbs::register('error500', function ($breadcrumbs) {
@@ -722,7 +722,7 @@ Breadcrumbs::register('error500', function ($breadcrumbs) {
});
Route::get('404', ['as' => 'error404', function () {
return view('errors.404');
return view('errors.404');
}]);
Breadcrumbs::register('error404', function ($breadcrumbs) {
@@ -730,7 +730,7 @@ Breadcrumbs::register('error404', function ($breadcrumbs) {
});
Route::get('board-offline', ['as' => 'board.offline', function () {
return view('errors.offline');
return view('errors.offline');
}]);
Breadcrumbs::register('board.offline', function ($breadcrumbs) {

View File

@@ -21,12 +21,13 @@ class Ticket_Thread extends BaseModel
$this->attach()->delete();
parent::delete();
}
// public function setTitleAttribute($value) {
// $this->attributes['title'] = str_replace('"', "'", $value);
// }
public function getTitleAttribute($value) {
return str_replace('"', "'", $value);
}
public function getTitleAttribute($value)
{
return str_replace('"', "'", $value);
}
}

View File

@@ -88,7 +88,7 @@ return [
| will not be safe. Please do this before deploying an application!
|
*/
'key' => env('APP_KEY'),
'key' => env('APP_KEY'),
'cipher' => MCRYPT_RIJNDAEL_128,
/*
|--------------------------------------------------------------------------
@@ -183,54 +183,54 @@ return [
|
*/
'aliases' => [
'App' => 'Illuminate\Support\Facades\App',
'Artisan' => 'Illuminate\Support\Facades\Artisan',
'Auth' => 'Illuminate\Support\Facades\Auth',
'Blade' => 'Illuminate\Support\Facades\Blade',
'Cache' => 'Illuminate\Support\Facades\Cache',
'Config' => 'Illuminate\Support\Facades\Config',
'Cookie' => 'Illuminate\Support\Facades\Cookie',
'Crypt' => 'Illuminate\Support\Facades\Crypt',
'DB' => 'Illuminate\Support\Facades\DB',
'Eloquent' => 'Illuminate\Database\Eloquent\Model',
'Event' => 'Illuminate\Support\Facades\Event',
'File' => 'Illuminate\Support\Facades\File',
'Hash' => 'Illuminate\Support\Facades\Hash',
'Input' => 'Illuminate\Support\Facades\Input',
'Inspiring' => 'Illuminate\Foundation\Inspiring',
'Lang' => 'Illuminate\Support\Facades\Lang',
'Log' => 'Illuminate\Support\Facades\Log',
'Mail' => 'Illuminate\Support\Facades\Mail',
'Password' => 'Illuminate\Support\Facades\Password',
'Queue' => 'Illuminate\Support\Facades\Queue',
'Redirect' => 'Illuminate\Support\Facades\Redirect',
'Redis' => 'Illuminate\Support\Facades\Redis',
'Request' => 'Illuminate\Support\Facades\Request',
'Response' => 'Illuminate\Support\Facades\Response',
'Route' => 'Illuminate\Support\Facades\Route',
'Schema' => 'Illuminate\Support\Facades\Schema',
'Session' => 'Illuminate\Support\Facades\Session',
'Storage' => 'Illuminate\Support\Facades\Storage',
'URL' => 'Illuminate\Support\Facades\URL',
'Validator' => 'Illuminate\Support\Facades\Validator',
'View' => 'Illuminate\Support\Facades\View',
'Form' => 'Illuminate\Html\FormFacade',
'HTML' => 'Illuminate\Html\HtmlFacade',
'phone' => 'The :attribute field contains an invalid number.',
'Bugsnag' => 'Bugsnag\BugsnagLaravel\BugsnagFacade',
'PDF' => 'Vsmoraes\Pdf\PdfFacade',
'Gravatar' => 'Thomaswelton\LaravelGravatar\Facades\Gravatar',
'UTC' => 'App\Http\Controllers\Agent\helpdesk\TicketController',
'Ttable' => 'App\Http\Controllers\Agent\helpdesk\TicketController', //to use getTable function.
'SMTPS' => 'App\Http\Controllers\HomeController',
'Datatable' => 'Chumper\Datatable\Facades\DatatableFacade',
'Zipper' => 'Chumper\Zipper\Zipper',
'Image' => 'Intervention\Image\Facades\Image',
'JWTAuth' => 'Tymon\JWTAuth\Facades\JWTAuth',
'JWTFactory' => 'Tymon\JWTAuth\Facades\JWTFactory',
'App' => 'Illuminate\Support\Facades\App',
'Artisan' => 'Illuminate\Support\Facades\Artisan',
'Auth' => 'Illuminate\Support\Facades\Auth',
'Blade' => 'Illuminate\Support\Facades\Blade',
'Cache' => 'Illuminate\Support\Facades\Cache',
'Config' => 'Illuminate\Support\Facades\Config',
'Cookie' => 'Illuminate\Support\Facades\Cookie',
'Crypt' => 'Illuminate\Support\Facades\Crypt',
'DB' => 'Illuminate\Support\Facades\DB',
'Eloquent' => 'Illuminate\Database\Eloquent\Model',
'Event' => 'Illuminate\Support\Facades\Event',
'File' => 'Illuminate\Support\Facades\File',
'Hash' => 'Illuminate\Support\Facades\Hash',
'Input' => 'Illuminate\Support\Facades\Input',
'Inspiring' => 'Illuminate\Foundation\Inspiring',
'Lang' => 'Illuminate\Support\Facades\Lang',
'Log' => 'Illuminate\Support\Facades\Log',
'Mail' => 'Illuminate\Support\Facades\Mail',
'Password' => 'Illuminate\Support\Facades\Password',
'Queue' => 'Illuminate\Support\Facades\Queue',
'Redirect' => 'Illuminate\Support\Facades\Redirect',
'Redis' => 'Illuminate\Support\Facades\Redis',
'Request' => 'Illuminate\Support\Facades\Request',
'Response' => 'Illuminate\Support\Facades\Response',
'Route' => 'Illuminate\Support\Facades\Route',
'Schema' => 'Illuminate\Support\Facades\Schema',
'Session' => 'Illuminate\Support\Facades\Session',
'Storage' => 'Illuminate\Support\Facades\Storage',
'URL' => 'Illuminate\Support\Facades\URL',
'Validator' => 'Illuminate\Support\Facades\Validator',
'View' => 'Illuminate\Support\Facades\View',
'Form' => 'Illuminate\Html\FormFacade',
'HTML' => 'Illuminate\Html\HtmlFacade',
'phone' => 'The :attribute field contains an invalid number.',
'Bugsnag' => 'Bugsnag\BugsnagLaravel\BugsnagFacade',
'PDF' => 'Vsmoraes\Pdf\PdfFacade',
'Gravatar' => 'Thomaswelton\LaravelGravatar\Facades\Gravatar',
'UTC' => 'App\Http\Controllers\Agent\helpdesk\TicketController',
'Ttable' => 'App\Http\Controllers\Agent\helpdesk\TicketController', //to use getTable function.
'SMTPS' => 'App\Http\Controllers\HomeController',
'Datatable' => 'Chumper\Datatable\Facades\DatatableFacade',
'Zipper' => 'Chumper\Zipper\Zipper',
'Image' => 'Intervention\Image\Facades\Image',
'JWTAuth' => 'Tymon\JWTAuth\Facades\JWTAuth',
'JWTFactory' => 'Tymon\JWTAuth\Facades\JWTFactory',
'Breadcrumbs' => 'DaveJamesMiller\Breadcrumbs\Facade',
'GeoIP' => 'Torann\GeoIP\GeoIPFacade',
'GeoIP' => 'Torann\GeoIP\GeoIPFacade',
],
'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaXNzIjoiaHR0cDpcL1wvbG9jYWxob3N0XC9mYXZlby1oZWxwZGVzay1naXRodWJcL3B1YmxpY1wvYXBpXC92MVwvYXV0aGVudGljYXRlIiwiaWF0IjoxNDU1NzAyNDEyLCJleHAiOjE0NTU3MDYwMTIsIm5iZiI6MTQ1NTcwMjQxMiwianRpIjoiOTdlODg1ODNjOWQyNDIzNWQ4MzI3Y2ExNzI1NDY1MDQifQ.37E7H2kRCQuz5oBRkQLKhNNpaNXyk4FiEYS9RQ7HZPY',
'name' => 'faveo helpdesk community',
'name' => 'faveo helpdesk community',
];

View File

@@ -1,77 +1,77 @@
<?php
return array(
return [
/*
|--------------------------------------------------------------------------
| API Key
|--------------------------------------------------------------------------
|
| You can find your API key on your Bugsnag dashboard.
|
| This api key points the Bugsnag notifier to the project in your account
| which should receive your application's uncaught exceptions.
|
*/
'api_key' => '280264db78f78f46e37169b2b65bed2d',
/*
|--------------------------------------------------------------------------
| API Key
|--------------------------------------------------------------------------
|
| You can find your API key on your Bugsnag dashboard.
|
| This api key points the Bugsnag notifier to the project in your account
| which should receive your application's uncaught exceptions.
|
*/
'api_key' => '280264db78f78f46e37169b2b65bed2d',
/*
|--------------------------------------------------------------------------
| Notify Release Stages
|--------------------------------------------------------------------------
|
| Set which release stages should send notifications to Bugsnag.
|
| Example: array('development', 'production')
|
*/
'notify_release_stages' => env('BUGSNAG_NOTIFY_RELEASE_STAGES', null),
/*
|--------------------------------------------------------------------------
| Notify Release Stages
|--------------------------------------------------------------------------
|
| Set which release stages should send notifications to Bugsnag.
|
| Example: array('development', 'production')
|
*/
'notify_release_stages' => env('BUGSNAG_NOTIFY_RELEASE_STAGES', null),
/*
|--------------------------------------------------------------------------
| Endpoint
|--------------------------------------------------------------------------
|
| Set what server the Bugsnag notifier should send errors to. By default
| this is set to 'https://notify.bugsnag.com', but for Bugsnag Enterprise
| this should be the URL to your Bugsnag instance.
|
*/
'endpoint' => 'https://notify.bugsnag.com',
/*
|--------------------------------------------------------------------------
| Endpoint
|--------------------------------------------------------------------------
|
| Set what server the Bugsnag notifier should send errors to. By default
| this is set to 'https://notify.bugsnag.com', but for Bugsnag Enterprise
| this should be the URL to your Bugsnag instance.
|
*/
'endpoint' => 'https://notify.bugsnag.com',
/*
|--------------------------------------------------------------------------
| Filters
|--------------------------------------------------------------------------
|
| Use this if you want to ensure you don't send sensitive data such as
| passwords, and credit card numbers to our servers. Any keys which
| contain these strings will be filtered.
|
*/
'filters' => env('BUGSNAG_FILTERS', array('password')),
/*
|--------------------------------------------------------------------------
| Filters
|--------------------------------------------------------------------------
|
| Use this if you want to ensure you don't send sensitive data such as
| passwords, and credit card numbers to our servers. Any keys which
| contain these strings will be filtered.
|
*/
'filters' => env('BUGSNAG_FILTERS', ['password']),
/*
|--------------------------------------------------------------------------
| Proxy
|--------------------------------------------------------------------------
|
| If your server is behind a proxy server, you can configure this as well.
| Other than the host, none of these settings are mandatory.
|
| Note: Proxy configuration is only possible if the PHP cURL extension
| is installed.
|
| Example:
|
| 'proxy' => array(
| 'host' => 'bugsnag.com',
| 'port' => 42,
| 'user' => 'username',
| 'password' => 'password123'
| )
|
*/
'proxy' => env('BUGSNAG_PROXY', null)
/*
|--------------------------------------------------------------------------
| Proxy
|--------------------------------------------------------------------------
|
| If your server is behind a proxy server, you can configure this as well.
| Other than the host, none of these settings are mandatory.
|
| Note: Proxy configuration is only possible if the PHP cURL extension
| is installed.
|
| Example:
|
| 'proxy' => array(
| 'host' => 'bugsnag.com',
| 'port' => 42,
| 'user' => 'username',
| 'password' => 'password123'
| )
|
*/
'proxy' => env('BUGSNAG_PROXY', null),
);
];

View File

@@ -10,7 +10,9 @@ use App\Model\helpdesk\Email\Smtp;
use App\Model\helpdesk\Manage\Help_topic;
use App\Model\helpdesk\Manage\Sla_plan;
use App\Model\helpdesk\Notification\NotificationType;
use App\Model\helpdesk\Ratings\Rating;
use App\Model\helpdesk\Settings\Alert;
use App\Model\helpdesk\Settings\CommonSettings;
use App\Model\helpdesk\Settings\Company;
use App\Model\helpdesk\Settings\Email;
use App\Model\helpdesk\Settings\Responder;
@@ -31,8 +33,6 @@ use App\Model\helpdesk\Utility\Time_format;
use App\Model\helpdesk\Utility\Timezones;
use App\Model\helpdesk\Utility\Version_Check;
use App\Model\helpdesk\Workflow\WorkflowClose;
use App\Model\helpdesk\Settings\CommonSettings;
use App\Model\helpdesk\Ratings\Rating;
use App\Model\kb\Settings;
// Knowledge base
use Illuminate\Database\Seeder;
@@ -2007,17 +2007,17 @@ class DatabaseSeeder extends Seeder
Template::create(['id' => '10', 'name' => 'ticket-reply', 'type' => '10', 'message' => '<span><div><span><p>{!!$content!!} &nbsp;&nbsp;<br></p><p>{!!$agent_sign!!}&nbsp;</p><p>Ticket Details</p><p>Ticket ID: {!!$ticket_number!!} &nbsp;&nbsp;&nbsp;&nbsp;</p><div><br></div></span><br></div><div><br></div></span>', 'set_id' => '1']);
Template::create(['id' => '11', 'name' => 'ticket-reply-agent', 'type' => '11', 'message' => '<div>Hello {!!$ticket_agent_name!!},<b><br></b>A reply been made to ticket {!!$ticket_number!!}<b><br></b>From<br>Name: {!!$ticket_client_name!!}<br>E-mail: {!!$ticket_client_email!!}<b><br></b>{!!$content!!}<b><br></b>Kind Regards,<br>{!!$system_from!!}</div>', 'set_id' => '1']);
Template::create(['id' => '12', 'name' => 'registration', 'type' => '12', 'message' => '<span><p>Hello {!!$user!!} ,&nbsp;</p><p>This email is confirmation that you are now registered at our helpdesk.</p><p>Registered Email: {!!$email_address!!}</p><p>Please click on the below link to activate your account and Login to the system {!!$password_reset_link!!}</p><p>Thank You.</p><p>Kind Regards,</p><p>{!!$system_from!!}&nbsp;</p></span>', 'set_id' => '1']);
/**
/*
* All the common settings will be listed here
*/
CommonSettings::create(['id' => '1', 'option_name' => 'ticket_token_time_duration', 'option_value' => '1']);
/**
/*
* Ratings
*/
Rating::create(['id'=>'1','name'=>'OverAll Satisfaction','display_order'=>'1','allow_modification' => '1', 'rating_scale'=>'5','rating_area'=>'Helpdesk Area']);
Rating::create(['id'=>'2','name'=>'Reply Rating','display_order'=>'1','allow_modification' => '1', 'rating_scale'=>'5','rating_area'=>'Comment Area']);
}
Rating::create(['id' => '1', 'name' => 'OverAll Satisfaction', 'display_order' => '1', 'allow_modification' => '1', 'rating_scale' => '5', 'rating_area' => 'Helpdesk Area']);
Rating::create(['id' => '2', 'name' => 'Reply Rating', 'display_order' => '1', 'allow_modification' => '1', 'rating_scale' => '5', 'rating_area' => 'Comment Area']);
}
}

View File

@@ -1,4 +1,4 @@

<?php
return [
@@ -840,44 +840,44 @@ return [
| Error Pages
|------------------------------------------------
*/
'not_found' => 'Not Found',
'oops_page_not_found' => 'Oops! Page not found',
'we_could_not_find_the_page_you_were_looking_for' => 'We could not find the page you were looking for',
'internal_server_error' => 'Internal server Error',
'be_right_back' => 'Be right back',
'sorry' => 'Sorry',
'we_are_working_on_it' => 'We are working on it',
'category' => 'Category',
'addcategory' => 'Add Category',
'allcategory' => 'All Category',
'article' => 'Article',
'articles' => 'Articles',
'addarticle' => 'Add Article',
'allarticle' => 'All Article',
'pages' => 'Pages',
'addpages' => 'Add Pages',
'allpages' => 'All Pages',
'widgets' => 'Widgets',
'footer1' => 'Footer 1',
'footer2' => 'Footer 2',
'footer3' => 'Footer 3',
'footer4' => 'Footer 4',
'sidewidget1' => 'Side Widget 1',
'sidewidget2' => 'Side Widget 2',
'comments' => 'Comments',
'settings' => 'Settings',
'parent' => 'Parent',
'not_found' => 'Not Found',
'oops_page_not_found' => 'Oops! Page not found',
'we_could_not_find_the_page_you_were_looking_for' => 'We could not find the page you were looking for',
'internal_server_error' => 'Internal server Error',
'be_right_back' => 'Be right back',
'sorry' => 'Sorry',
'we_are_working_on_it' => 'We are working on it',
'category' => 'Category',
'addcategory' => 'Add Category',
'allcategory' => 'All Category',
'article' => 'Article',
'articles' => 'Articles',
'addarticle' => 'Add Article',
'allarticle' => 'All Article',
'pages' => 'Pages',
'addpages' => 'Add Pages',
'allpages' => 'All Pages',
'widgets' => 'Widgets',
'footer1' => 'Footer 1',
'footer2' => 'Footer 2',
'footer3' => 'Footer 3',
'footer4' => 'Footer 4',
'sidewidget1' => 'Side Widget 1',
'sidewidget2' => 'Side Widget 2',
'comments' => 'Comments',
'settings' => 'Settings',
'parent' => 'Parent',
'Beschreibung' => 'Beschreibung',
'enter_the_description' => 'Enter the Description',
'publish' => 'Publish',
'published' => 'Published',
'draft' => 'Draft',
'create_a_category' => 'Create a Category',
'add' => 'Add',
'social' => 'Social',
'comment' => 'Comment',
'not_published' => 'Not Published',
'numberofelementstodisplay' => 'Number of elements to display',
'enter_the_description' => 'Enter the Description',
'publish' => 'Publish',
'published' => 'Published',
'draft' => 'Draft',
'create_a_category' => 'Create a Category',
'add' => 'Add',
'social' => 'Social',
'comment' => 'Comment',
'not_published' => 'Not Published',
'numberofelementstodisplay' => 'Number of elements to display',
//======================================
'language' => 'Language',
'save' => 'Save',

View File

@@ -1,4 +1,4 @@
<?php
<?php
return [

View File

@@ -1,4 +1,4 @@
<?php
<?php
return [
@@ -14,7 +14,7 @@ return [
*/
'password' => 'Passwörter müssen mindestens sechs Zeichen lang sein und der Bestätigung entsprechen.',
'user' => "Wir können keinen Benutzer mit dieser E-Mail-Adresse finden.",
'user' => 'Wir können keinen Benutzer mit dieser E-Mail-Adresse finden.',
'token' => 'Dieser Passwort-Reset-Token ist ungültig.',
'sent' => 'Wir haben dir einen Passwort-Reset-Link per E-Mail zukommen lassen!',
'reset' => 'Dein Passwort wurde zurückgesetzt!',

View File

@@ -1,4 +1,4 @@
<?php
<?php
return [

View File

@@ -105,42 +105,42 @@ return [
| Emails Create Page
|--------------------------------------
*/
'emails' => 'Emails',
'incoming_emails' => 'Incoming Emails',
'reuired_authentication' => 'Reuired Authentication',
'fetching_email_via_imap' => 'Fetching Email via IMAP',
'create_email' => 'Create Email',
'email_address' => 'Email Address',
'email_name' => 'Email Name',
'help_topic' => 'Help Topic',
'auto_response' => 'Auto Response',
'host_name' => 'Host Name',
'port_number' => 'Port Number',
'mail_box_protocol' => 'Mail Box Protocol',
'authentication_required' => 'Authentication Required',
'yes' => 'Yes',
'no' => 'No',
'header_spoofing' => 'Header Spoofing',
'allow_for_this_email' => 'Allow For This Email',
'imap_config' => 'IMAP Configuration',
'email_information_and_settings' => 'Email Information and Settings',
'incoming_email_information' => 'Incoming Email Information',
'outgoing_email_information' => 'Outgoing Email Information',
'new_ticket_settings' => 'New Ticket Settings',
'protocol' => 'Protocol',
'fetching_protocol' => 'Fetching Protocol',
'transfer_protocol' => 'Transfer Protocol',
'from_name' => 'From Name',
'add_an_email' => 'Add an Email',
'edit_an_email' => 'Edit an Email',
'disable_for_this_email_address' => 'Disable for this Email address',
'validate_certificates_from_tls_or_ssl_server' => 'Validate Certificates from TLS/SSL server',
'authentication' => 'Authentication',
'incoming_email_connection_failed_please_check_email_credentials_or_imap_settings' => 'Incoming email connection failed! Please check email credentials or Imap Settings',
'outgoing_email_connection_failed' => 'Outgoing email connection failed',
'you_cannot_delete_system_default_email' => 'You cannot delete system default Email',
'email_deleted_sucessfully' => 'Email Deleted sucessfully',
'email_can_not_delete' => 'Email can not Delete',
'emails' => 'Emails',
'incoming_emails' => 'Incoming Emails',
'reuired_authentication' => 'Reuired Authentication',
'fetching_email_via_imap' => 'Fetching Email via IMAP',
'create_email' => 'Create Email',
'email_address' => 'Email Address',
'email_name' => 'Email Name',
'help_topic' => 'Help Topic',
'auto_response' => 'Auto Response',
'host_name' => 'Host Name',
'port_number' => 'Port Number',
'mail_box_protocol' => 'Mail Box Protocol',
'authentication_required' => 'Authentication Required',
'yes' => 'Yes',
'no' => 'No',
'header_spoofing' => 'Header Spoofing',
'allow_for_this_email' => 'Allow For This Email',
'imap_config' => 'IMAP Configuration',
'email_information_and_settings' => 'Email Information and Settings',
'incoming_email_information' => 'Incoming Email Information',
'outgoing_email_information' => 'Outgoing Email Information',
'new_ticket_settings' => 'New Ticket Settings',
'protocol' => 'Protocol',
'fetching_protocol' => 'Fetching Protocol',
'transfer_protocol' => 'Transfer Protocol',
'from_name' => 'From Name',
'add_an_email' => 'Add an Email',
'edit_an_email' => 'Edit an Email',
'disable_for_this_email_address' => 'Disable for this Email address',
'validate_certificates_from_tls_or_ssl_server' => 'Validate Certificates from TLS/SSL server',
'authentication' => 'Authentication',
'incoming_email_connection_failed_please_check_email_credentials_or_imap_settings' => 'Incoming email connection failed! Please check email credentials or Imap Settings',
'outgoing_email_connection_failed' => 'Outgoing email connection failed',
'you_cannot_delete_system_default_email' => 'You cannot delete system default Email',
'email_deleted_sucessfully' => 'Email Deleted sucessfully',
'email_can_not_delete' => 'Email can not Delete',
/*
|--------------------------------------
| Ban Emails Create Page

View File

@@ -14,7 +14,7 @@ return [
*/
'password' => 'Le Passwords devono essere almeno di sei caratteri e combaciare.',
'user' => "Non esiste un utente con questo indirizzo e-mail.",
'user' => 'Non esiste un utente con questo indirizzo e-mail.',
'token' => 'Il token per il reset della password non è valido.',
'sent' => 'Una email con il link al reset della passowrd ti è stato inviato!',
'reset' => 'La tua password è stata resettata!',

File diff suppressed because it is too large Load Diff

View File

@@ -2,18 +2,18 @@
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; Предыдущая',
'next' => 'Следующий &raquo;',
'previous' => '&laquo; Предыдущая',
'next' => 'Следующий &raquo;',
];

View File

@@ -2,21 +2,21 @@
return [
/*
|--------------------------------------------------------------------------
| Password Reminder Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
/*
|--------------------------------------------------------------------------
| Password Reminder Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
"password" => "Пароль должен содержать не менее шести символов и соответствовать подтверждения.",
"user" => "Мы не можем найти пользователя с данным адресом электронной почты.",
"token" => "Этот пароль сбросить маркер недействителен.",
"sent" => "Мы по электронной почте Ваш пароль сбросить ссылку!",
"reset" => "Ваш пароль был сброшен!",
'password' => 'Пароль должен содержать не менее шести символов и соответствовать подтверждения.',
'user' => 'Мы не можем найти пользователя с данным адресом электронной почты.',
'token' => 'Этот пароль сбросить маркер недействителен.',
'sent' => 'Мы по электронной почте Ваш пароль сбросить ссылку!',
'reset' => 'Ваш пароль был сброшен!',
];

View File

@@ -2,25 +2,25 @@
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'filename' => 'ISO CODE',
'language' => 'Язык',
'Action' => 'Действие',
'status' => 'stature',
'not-active'=> 'Не Активный',
'active' => 'Активный',
'hello' => 'Привет',
'enable' => 'Включен',
'disable' => 'Выключен',
'filename' => 'ISO CODE',
'language' => 'Язык',
'Action' => 'Действие',
'status' => 'stature',
'not-active' => 'Не Активный',
'active' => 'Активный',
'hello' => 'Привет',
'enable' => 'Включен',
'disable' => 'Выключен',
];
];

View File

@@ -2,106 +2,106 @@
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
"accepted" => "The :attribute must be accepted.",
"active_url" => "The :attribute is not a valid URL.",
"after" => "The :attribute must be a date after :date.",
"alpha" => "The :attribute may only contain letters.",
"alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.",
"alpha_num" => "The :attribute may only contain letters and numbers.",
"array" => "The :attribute must be an array.",
"before" => "The :attribute must be a date before :date.",
"between" => [
"numeric" => "The :attribute must be between :min and :max.",
"file" => "The :attribute must be between :min and :max kilobytes.",
"string" => "The :attribute must be between :min and :max characters.",
"array" => "The :attribute must have between :min and :max items.",
],
"boolean" => "The :attribute field must be true or false.",
"confirmed" => "The :attribute confirmation does not match.",
"date" => "The :attribute is not a valid date.",
"date_format" => "The :attribute does not match the format :format.",
"different" => "The :attribute and :other must be different.",
"digits" => "The :attribute must be :digits digits.",
"digits_between" => "The :attribute must be between :min and :max digits.",
"email" => "The :attribute must be a valid email address.",
"filled" => "The :attribute field is required.",
"exists" => "The selected :attribute is invalid.",
"image" => "The :attribute must be an image.",
"in" => "The selected :attribute is invalid.",
"integer" => "The :attribute must be an integer.",
"ip" => "The :attribute must be a valid IP address.",
"max" => [
"numeric" => "The :attribute may not be greater than :max.",
"file" => "The :attribute may not be greater than :max kilobytes.",
"string" => "The :attribute may not be greater than :max characters.",
"array" => "The :attribute may not have more than :max items.",
],
"mimes" => "The :attribute must be a file of type: :values.",
"min" => [
"numeric" => "The :attribute must be at least :min.",
"file" => "The :attribute must be at least :min kilobytes.",
"string" => "The :attribute must be at least :min characters.",
"array" => "The :attribute must have at least :min items.",
],
"not_in" => "The selected :attribute is invalid.",
"numeric" => "The :attribute must be a number.",
"regex" => "The :attribute format is invalid.",
"required" => "The :attribute field is required.",
"required_if" => "The :attribute field is required when :other is :value.",
"required_with" => "The :attribute field is required when :values is present.",
"required_with_all" => "The :attribute field is required when :values is present.",
"required_without" => "The :attribute field is required when :values is not present.",
"required_without_all" => "The :attribute field is required when none of :values are present.",
"same" => "The :attribute and :other must match.",
"size" => [
"numeric" => "The :attribute must be :size.",
"file" => "The :attribute must be :size kilobytes.",
"string" => "The :attribute must be :size characters.",
"array" => "The :attribute must contain :size items.",
],
"unique" => "The :attribute has already been taken.",
"url" => "The :attribute format is invalid.",
"timezone" => "The :attribute must be a valid zone.",
'accepted' => 'The :attribute must be accepted.',
'active_url' => 'The :attribute is not a valid URL.',
'after' => 'The :attribute must be a date after :date.',
'alpha' => 'The :attribute may only contain letters.',
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
'alpha_num' => 'The :attribute may only contain letters and numbers.',
'array' => 'The :attribute must be an array.',
'before' => 'The :attribute must be a date before :date.',
'between' => [
'numeric' => 'The :attribute must be between :min and :max.',
'file' => 'The :attribute must be between :min and :max kilobytes.',
'string' => 'The :attribute must be between :min and :max characters.',
'array' => 'The :attribute must have between :min and :max items.',
],
'boolean' => 'The :attribute field must be true or false.',
'confirmed' => 'The :attribute confirmation does not match.',
'date' => 'The :attribute is not a valid date.',
'date_format' => 'The :attribute does not match the format :format.',
'different' => 'The :attribute and :other must be different.',
'digits' => 'The :attribute must be :digits digits.',
'digits_between' => 'The :attribute must be between :min and :max digits.',
'email' => 'The :attribute must be a valid email address.',
'filled' => 'The :attribute field is required.',
'exists' => 'The selected :attribute is invalid.',
'image' => 'The :attribute must be an image.',
'in' => 'The selected :attribute is invalid.',
'integer' => 'The :attribute must be an integer.',
'ip' => 'The :attribute must be a valid IP address.',
'max' => [
'numeric' => 'The :attribute may not be greater than :max.',
'file' => 'The :attribute may not be greater than :max kilobytes.',
'string' => 'The :attribute may not be greater than :max characters.',
'array' => 'The :attribute may not have more than :max items.',
],
'mimes' => 'The :attribute must be a file of type: :values.',
'min' => [
'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.',
'string' => 'The :attribute must be at least :min characters.',
'array' => 'The :attribute must have at least :min items.',
],
'not_in' => 'The selected :attribute is invalid.',
'numeric' => 'The :attribute must be a number.',
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',
'required_if' => 'The :attribute field is required when :other is :value.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values is present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
'same' => 'The :attribute and :other must match.',
'size' => [
'numeric' => 'The :attribute must be :size.',
'file' => 'The :attribute must be :size kilobytes.',
'string' => 'The :attribute must be :size characters.',
'array' => 'The :attribute must contain :size items.',
],
'unique' => 'The :attribute has already been taken.',
'url' => 'The :attribute format is invalid.',
'timezone' => 'The :attribute must be a valid zone.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap attribute place-holders
| with something more reader friendly such as E-Mail Address instead
| of "email". This simply helps us make messages a little cleaner.
|
*/
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap attribute place-holders
| with something more reader friendly such as E-Mail Address instead
| of "email". This simply helps us make messages a little cleaner.
|
*/
'attributes' => [],
'attributes' => [],
];