Apply fixes from StyleCI
This commit is contained in:

committed by
RafficMohammed

parent
0975cc5dd9
commit
b3b057e0cc
@@ -3,7 +3,7 @@
|
|||||||
use App\Http\Controllers\Common;
|
use App\Http\Controllers\Common;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ================================================================================================
|
* ================================================================================================
|
||||||
* @version v1
|
* @version v1
|
||||||
* @access public
|
* @access public
|
||||||
@@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Route;
|
|||||||
* @author Vijay Sebastian<vijay.sebastian@ladybirdweb.com>
|
* @author Vijay Sebastian<vijay.sebastian@ladybirdweb.com>
|
||||||
* @name Faveo
|
* @name Faveo
|
||||||
*/
|
*/
|
||||||
Route::prefix('api/v1')->group(function () {
|
Route::prefix('api/v1')->group(function () {
|
||||||
Route::post('authenticate', [\App\Api\v1\TokenAuthController::class, 'authenticate']);
|
Route::post('authenticate', [\App\Api\v1\TokenAuthController::class, 'authenticate']);
|
||||||
Route::get('authenticate/user', [\App\Api\v1\TokenAuthController::class, 'getAuthenticatedUser']);
|
Route::get('authenticate/user', [\App\Api\v1\TokenAuthController::class, 'getAuthenticatedUser']);
|
||||||
Route::get('/database-config', [\App\Api\v1\InstallerApiController::class, 'config_database'])->name('database-config');
|
Route::get('/database-config', [\App\Api\v1\InstallerApiController::class, 'config_database'])->name('database-config');
|
||||||
@@ -64,8 +64,8 @@ use Illuminate\Support\Facades\Route;
|
|||||||
* FCM token response
|
* FCM token response
|
||||||
*/
|
*/
|
||||||
Route::post('fcmtoken', [Common\PushNotificationController::class, 'fcmToken'])->name('fcmtoken');
|
Route::post('fcmtoken', [Common\PushNotificationController::class, 'fcmToken'])->name('fcmtoken');
|
||||||
});
|
});
|
||||||
/*
|
/*
|
||||||
* ================================================================================================
|
* ================================================================================================
|
||||||
* @version v1
|
* @version v1
|
||||||
* @access public
|
* @access public
|
||||||
@@ -73,11 +73,11 @@ use Illuminate\Support\Facades\Route;
|
|||||||
* @author Manish Verma<manish.verma@ladybirdweb.com>
|
* @author Manish Verma<manish.verma@ladybirdweb.com>
|
||||||
* @name Faveo
|
* @name Faveo
|
||||||
*/
|
*/
|
||||||
Route::prefix('api/v2')->group(function () {
|
Route::prefix('api/v2')->group(function () {
|
||||||
/*
|
/*
|
||||||
* Helpdesk
|
* Helpdesk
|
||||||
*/
|
*/
|
||||||
Route::prefix('helpdesk')->group(function () {
|
Route::prefix('helpdesk')->group(function () {
|
||||||
Route::get('tickets', [\App\Api\v2\TicketController::class, 'getTickets']);
|
Route::get('tickets', [\App\Api\v2\TicketController::class, 'getTickets']);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -32,6 +32,7 @@ use Illuminate\Support\Str;
|
|||||||
*
|
*
|
||||||
* @author Vijay Sebastian <vijay.sebastian@ladybirdweb.com>
|
* @author Vijay Sebastian <vijay.sebastian@ladybirdweb.com>
|
||||||
* @copyright (c) 2016, Ladybird Web Solution
|
* @copyright (c) 2016, Ladybird Web Solution
|
||||||
|
*
|
||||||
* @name Faveo HELPDESK
|
* @name Faveo HELPDESK
|
||||||
*
|
*
|
||||||
* @version v1
|
* @version v1
|
||||||
|
@@ -26,6 +26,7 @@ use Mail;
|
|||||||
*
|
*
|
||||||
* @author Vijay Sebastian <vijay.sebastian@ladybirdweb.com>
|
* @author Vijay Sebastian <vijay.sebastian@ladybirdweb.com>
|
||||||
* @copyright (c) 2016, Ladybird Web Solution
|
* @copyright (c) 2016, Ladybird Web Solution
|
||||||
|
*
|
||||||
* @name Faveo HELPDESK
|
* @name Faveo HELPDESK
|
||||||
*
|
*
|
||||||
* @version v1
|
* @version v1
|
||||||
|
@@ -19,6 +19,7 @@ use Tymon\JWTAuth\Exceptions\JWTException;
|
|||||||
*
|
*
|
||||||
* @author Vijay Sebastian <vijay.sebastian@ladybirdweb.com>
|
* @author Vijay Sebastian <vijay.sebastian@ladybirdweb.com>
|
||||||
* @copyright (c) 2016, Ladybird Web Solution
|
* @copyright (c) 2016, Ladybird Web Solution
|
||||||
|
*
|
||||||
* @name Faveo HELPDESK
|
* @name Faveo HELPDESK
|
||||||
*
|
*
|
||||||
* @version v1
|
* @version v1
|
||||||
|
@@ -70,7 +70,7 @@ class SecureFaveoAPPKey extends Command
|
|||||||
}
|
}
|
||||||
$this->line("\r\nAPP_KEY has been updated in the environment.");
|
$this->line("\r\nAPP_KEY has been updated in the environment.");
|
||||||
$this->line("\r\nNext you might want to check if your configured email is working fine or not. If it has any problem you can update the password and restart your queue workers if you are processing mail jobs in queue.\r\n");
|
$this->line("\r\nNext you might want to check if your configured email is working fine or not. If it has any problem you can update the password and restart your queue workers if you are processing mail jobs in queue.\r\n");
|
||||||
exit();
|
exit;
|
||||||
}
|
}
|
||||||
$this->info('Alright, calm down we did not make any changes to your environment. But if you think your APP_KEY was compromised or you were using Faveo without generating APP_KEY explicitly(for version v1.10.* or older) we recommend you to run this command on priority basis.');
|
$this->info('Alright, calm down we did not make any changes to your environment. But if you think your APP_KEY was compromised or you were using Faveo without generating APP_KEY explicitly(for version v1.10.* or older) we recommend you to run this command on priority basis.');
|
||||||
}
|
}
|
||||||
|
@@ -29,6 +29,7 @@ class Sync extends Command
|
|||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
(new SyncFaveoToLatestVersion())->sync();
|
(new SyncFaveoToLatestVersion())->sync();
|
||||||
|
|
||||||
return Command::SUCCESS;
|
return Command::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,7 @@ class Kernel extends ConsoleKernel
|
|||||||
\App\Console\Commands\InstallDB::class,
|
\App\Console\Commands\InstallDB::class,
|
||||||
\App\Console\Commands\SetupTestEnv::class,
|
\App\Console\Commands\SetupTestEnv::class,
|
||||||
\App\Console\Commands\SecureFaveoAPPKey::class,
|
\App\Console\Commands\SecureFaveoAPPKey::class,
|
||||||
SyncFaveoToLatestVersion::class
|
SyncFaveoToLatestVersion::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\ModelNotFoundException;
|
|||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
use Illuminate\Http\Exceptions\HttpResponseException;
|
use Illuminate\Http\Exceptions\HttpResponseException;
|
||||||
use Illuminate\Session\TokenMismatchException;
|
use Illuminate\Session\TokenMismatchException;
|
||||||
use Illuminate\Support\Facades\App;
|
|
||||||
use Illuminate\Support\Facades\Config;
|
use Illuminate\Support\Facades\Config;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
namespace App\Exports;
|
namespace App\Exports;
|
||||||
|
|
||||||
use Maatwebsite\Excel\Concerns\FromArray;
|
use Maatwebsite\Excel\Concerns\FromArray;
|
||||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
|
||||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||||
|
|
||||||
class UserExport implements FromArray, WithHeadings
|
class UserExport implements FromArray, WithHeadings
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Http\Controllers\App;
|
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
Breadcrumbs::register('logs', function ($breadcrumbs) {
|
Breadcrumbs::register('logs', function ($breadcrumbs) {
|
||||||
|
@@ -149,15 +149,12 @@ class LanguageController extends Controller
|
|||||||
// doing the validation, passing post data, rules and the messages
|
// doing the validation, passing post data, rules and the messages
|
||||||
$validator = Validator::make($file, $rules);
|
$validator = Validator::make($file, $rules);
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
|
|
||||||
// send back to the page with the input data and errors
|
// send back to the page with the input data and errors
|
||||||
return Redirect::back()->withInput()->withErrors($validator);
|
return Redirect::back()->withInput()->withErrors($validator);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
//Checking if package already exists or not in lang folder
|
//Checking if package already exists or not in lang folder
|
||||||
$path = base_path('lang');
|
$path = base_path('lang');
|
||||||
if (in_array(strtolower(Request::get('iso-code')), scandir($path))) {
|
if (in_array(strtolower(Request::get('iso-code')), scandir($path))) {
|
||||||
|
|
||||||
//sending back with error message
|
//sending back with error message
|
||||||
Session::flash('fails', Lang::get('lang.package_exist'));
|
Session::flash('fails', Lang::get('lang.package_exist'));
|
||||||
Session::flash('link', 'change-language/'.strtolower(Request::get('iso-code')));
|
Session::flash('link', 'change-language/'.strtolower(Request::get('iso-code')));
|
||||||
@@ -169,7 +166,6 @@ class LanguageController extends Controller
|
|||||||
|
|
||||||
return Redirect::back()->withInput();
|
return Redirect::back()->withInput();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// checking file is valid.
|
// checking file is valid.
|
||||||
if (Request::file('File')->isValid()) {
|
if (Request::file('File')->isValid()) {
|
||||||
$name = Request::file('File')->getClientOriginalName(); //uploaded file's original name
|
$name = Request::file('File')->getClientOriginalName(); //uploaded file's original name
|
||||||
|
@@ -159,7 +159,7 @@ class PriorityController extends Controller
|
|||||||
->update(['is_default' => 1]);
|
->update(['is_default' => 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return \Redirect::route('priority.index')->with('success', (Lang::get('lang.priority_successfully_updated')));
|
return \Redirect::route('priority.index')->with('success', Lang::get('lang.priority_successfully_updated'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -187,6 +187,6 @@ class PriorityController extends Controller
|
|||||||
|
|
||||||
$tk_priority->delete();
|
$tk_priority->delete();
|
||||||
|
|
||||||
return \Redirect::route('priority.index')->with('success', (Lang::get('lang.delete_successfully')));
|
return \Redirect::route('priority.index')->with('success', Lang::get('lang.delete_successfully'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -952,6 +952,7 @@ class FilterController extends Controller
|
|||||||
* @category function to filter tickets by SLA
|
* @category function to filter tickets by SLA
|
||||||
*
|
*
|
||||||
* @param string array $value, builder $table
|
* @param string array $value, builder $table
|
||||||
|
*
|
||||||
* @
|
* @
|
||||||
*
|
*
|
||||||
* @return builder
|
* @return builder
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
namespace App\Http\Controllers\Agent\helpdesk;
|
namespace App\Http\Controllers\Agent\helpdesk;
|
||||||
|
|
||||||
// controllers
|
// controllers
|
||||||
use App\Http\Controllers\Agent\helpdesk\Filter\FilterControllerOld;
|
|
||||||
use App\Http\Controllers\Common\FileuploadController;
|
use App\Http\Controllers\Common\FileuploadController;
|
||||||
use App\Http\Controllers\Common\NotificationController as Notify;
|
use App\Http\Controllers\Common\NotificationController as Notify;
|
||||||
use App\Http\Controllers\Common\PhpMailController;
|
use App\Http\Controllers\Common\PhpMailController;
|
||||||
@@ -51,7 +50,6 @@ use Illuminate\Support\Str;
|
|||||||
use Lang;
|
use Lang;
|
||||||
use Mail;
|
use Mail;
|
||||||
use UTC;
|
use UTC;
|
||||||
use Vsmoraes\Pdf\Pdf;
|
|
||||||
use Vsmoraes\Pdf\PdfFacade;
|
use Vsmoraes\Pdf\PdfFacade;
|
||||||
use Yajra\DataTables\Facades\DataTables;
|
use Yajra\DataTables\Facades\DataTables;
|
||||||
|
|
||||||
|
@@ -640,7 +640,6 @@ class UserController extends Controller
|
|||||||
public function edit($id, CountryCode $code)
|
public function edit($id, CountryCode $code)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// dd('here');
|
// dd('here');
|
||||||
$settings = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first();
|
$settings = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first();
|
||||||
$email_mandatory = CommonSettings::select('status')->where('option_name', '=', 'email_mandatory')->first();
|
$email_mandatory = CommonSettings::select('status')->where('option_name', '=', 'email_mandatory')->first();
|
||||||
@@ -996,6 +995,7 @@ class UserController extends Controller
|
|||||||
$users = $this->getUsers($first_date, $second_date);
|
$users = $this->getUsers($first_date, $second_date);
|
||||||
$excel_controller = new \App\Http\Controllers\Common\ExcelController();
|
$excel_controller = new \App\Http\Controllers\Common\ExcelController();
|
||||||
$filename = 'users'.$date;
|
$filename = 'users'.$date;
|
||||||
|
|
||||||
return $excel_controller->export($filename, $users);
|
return $excel_controller->export($filename, $users);
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
return redirect()->back()->with('fails', $ex->getMessage());
|
return redirect()->back()->with('fails', $ex->getMessage());
|
||||||
@@ -1046,7 +1046,7 @@ class UserController extends Controller
|
|||||||
->first();
|
->first();
|
||||||
if ($otp != null) {
|
if ($otp != null) {
|
||||||
$otp_length = strlen(Input::get('otp'));
|
$otp_length = strlen(Input::get('otp'));
|
||||||
if (($otp_length == 6 && !preg_match('/[a-z]/i', Input::get('otp')))) {
|
if ($otp_length == 6 && !preg_match('/[a-z]/i', Input::get('otp'))) {
|
||||||
$otp2 = Hash::make(Input::get('otp'));
|
$otp2 = Hash::make(Input::get('otp'));
|
||||||
$date1 = date_format($otp->updated_at, 'Y-m-d h:i:sa');
|
$date1 = date_format($otp->updated_at, 'Y-m-d h:i:sa');
|
||||||
$date2 = date('Y-m-d h:i:sa');
|
$date2 = date('Y-m-d h:i:sa');
|
||||||
|
@@ -184,7 +184,6 @@ class CategoryController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function update($id, CategoryRequest $request)
|
public function update($id, CategoryRequest $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Edit the selected category via id */
|
/* Edit the selected category via id */
|
||||||
$category = Category::where('id', $id)->first();
|
$category = Category::where('id', $id)->first();
|
||||||
$sl = $request->input('name');
|
$sl = $request->input('name');
|
||||||
|
@@ -550,7 +550,7 @@ class AuthController extends Controller
|
|||||||
$otp = Otp::select('otp', 'updated_at')->where('user_id', '=', $user->id)
|
$otp = Otp::select('otp', 'updated_at')->where('user_id', '=', $user->id)
|
||||||
->first();
|
->first();
|
||||||
if ($otp != null) {
|
if ($otp != null) {
|
||||||
if (($otp_length == 6 && !preg_match('/[a-z]/i', $request->input('otp')))) {
|
if ($otp_length == 6 && !preg_match('/[a-z]/i', $request->input('otp'))) {
|
||||||
$otp2 = Hash::make($request->input('otp'));
|
$otp2 = Hash::make($request->input('otp'));
|
||||||
$date1 = date_format($otp->updated_at, 'Y-m-d h:i:sa');
|
$date1 = date_format($otp->updated_at, 'Y-m-d h:i:sa');
|
||||||
$date2 = date('Y-m-d h:i:sa');
|
$date2 = date('Y-m-d h:i:sa');
|
||||||
|
@@ -188,7 +188,7 @@ class FormController extends Controller
|
|||||||
// $priority = $ticket_settings->first()->priority;
|
// $priority = $ticket_settings->first()->priority;
|
||||||
$default_priority = Ticket_Priority::where('is_default', '=', 1)->first();
|
$default_priority = Ticket_Priority::where('is_default', '=', 1)->first();
|
||||||
$user_priority = CommonSettings::where('option_name', '=', 'user_priority')->first();
|
$user_priority = CommonSettings::where('option_name', '=', 'user_priority')->first();
|
||||||
if (!($request->input('priority'))) {
|
if (!$request->input('priority')) {
|
||||||
$priority = $default_priority->priority_id;
|
$priority = $default_priority->priority_id;
|
||||||
if ($helpTopicObj->exists() && ($helpTopicObj->value('status') == 1)) {
|
if ($helpTopicObj->exists() && ($helpTopicObj->value('status') == 1)) {
|
||||||
$priority = $helpTopicObj->value('priority');
|
$priority = $helpTopicObj->value('priority');
|
||||||
|
@@ -409,7 +409,7 @@ class GuestController extends Controller
|
|||||||
->first();
|
->first();
|
||||||
if ($otp != null) {
|
if ($otp != null) {
|
||||||
$otp_length = strlen(Input::get('otp'));
|
$otp_length = strlen(Input::get('otp'));
|
||||||
if (($otp_length == 6 && !preg_match('/[a-z]/i', Input::get('otp')))) {
|
if ($otp_length == 6 && !preg_match('/[a-z]/i', Input::get('otp'))) {
|
||||||
$otp2 = Hash::make(Input::get('otp'));
|
$otp2 = Hash::make(Input::get('otp'));
|
||||||
$date1 = date_format($otp->updated_at, 'Y-m-d h:i:sa');
|
$date1 = date_format($otp->updated_at, 'Y-m-d h:i:sa');
|
||||||
$date2 = date('Y-m-d h:i:sa');
|
$date2 = date('Y-m-d h:i:sa');
|
||||||
|
@@ -12,20 +12,20 @@ use App\Model\helpdesk\Settings\System;
|
|||||||
use App\Model\helpdesk\Utility\Date_time_format;
|
use App\Model\helpdesk\Utility\Date_time_format;
|
||||||
use App\Model\helpdesk\Utility\Timezones;
|
use App\Model\helpdesk\Utility\Timezones;
|
||||||
use App\User;
|
use App\User;
|
||||||
Use Illuminate\Support\Facades\Artisan;
|
|
||||||
// classes
|
|
||||||
use Illuminate\Support\Facades\Cache;
|
|
||||||
use DB;
|
use DB;
|
||||||
|
// classes
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Support\Facades\File;
|
|
||||||
use Hash;
|
use Hash;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Artisan;
|
||||||
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
use Illuminate\Support\Facades\File;
|
||||||
|
use Illuminate\Support\Facades\Redirect;
|
||||||
use Illuminate\Support\Facades\Request as Input;
|
use Illuminate\Support\Facades\Request as Input;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
use Illuminate\Support\Facades\Redirect;
|
|
||||||
use Illuminate\Support\Facades\Session;
|
use Illuminate\Support\Facades\Session;
|
||||||
use UnAuth;
|
|
||||||
use Illuminate\Support\Facades\View;
|
use Illuminate\Support\Facades\View;
|
||||||
|
use UnAuth;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* |=======================================================================
|
* |=======================================================================
|
||||||
|
@@ -4,12 +4,8 @@ namespace App\Http\Controllers\Update;
|
|||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Model\helpdesk\Settings\System;
|
use App\Model\helpdesk\Settings\System;
|
||||||
use Exception;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Artisan;
|
use Illuminate\Support\Facades\Artisan;
|
||||||
use Illuminate\Support\Facades\Config;
|
use Illuminate\Support\Facades\Config;
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Support\Str;
|
|
||||||
|
|
||||||
class SyncFaveoToLatestVersion extends Controller
|
class SyncFaveoToLatestVersion extends Controller
|
||||||
{
|
{
|
||||||
@@ -35,14 +31,14 @@ class SyncFaveoToLatestVersion extends Controller
|
|||||||
|
|
||||||
$seederPath = base_path('database'.DIRECTORY_SEPARATOR.'seeders');
|
$seederPath = base_path('database'.DIRECTORY_SEPARATOR.'seeders');
|
||||||
|
|
||||||
if(file_exists($seederPath)){
|
if (file_exists($seederPath)) {
|
||||||
$seederVersions = scandir($seederPath);
|
$seederVersions = scandir($seederPath);
|
||||||
|
|
||||||
natsort($seederVersions);
|
natsort($seederVersions);
|
||||||
$formattedOlderVersion = $olderVersion;
|
$formattedOlderVersion = $olderVersion;
|
||||||
foreach ($seederVersions as $version) {
|
foreach ($seederVersions as $version) {
|
||||||
if(version_compare($this->getPhpComaptibleVersion($version), $formattedOlderVersion) == 1){
|
if (version_compare($this->getPhpComaptibleVersion($version), $formattedOlderVersion) == 1) {
|
||||||
Artisan::call('db:seed',['--class' => "Database\Seeders\\$version\DatabaseSeeder", '--force' => true]);
|
Artisan::call('db:seed', ['--class' => "Database\Seeders\\$version\DatabaseSeeder", '--force' => true]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,6 +51,7 @@ class SyncFaveoToLatestVersion extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$version = System::value('version') ?: '0.0.0';
|
$version = System::value('version') ?: '0.0.0';
|
||||||
|
|
||||||
return $this->getPhpComaptibleVersion($version);
|
return $this->getPhpComaptibleVersion($version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -98,7 +98,7 @@ class UpgradeController extends Controller
|
|||||||
$dlHandler = fopen($this->dir.'/UPDATES/'.'/faveo-helpdesk-master.zip', 'w');
|
$dlHandler = fopen($this->dir.'/UPDATES/'.'/faveo-helpdesk-master.zip', 'w');
|
||||||
if (!fwrite($dlHandler, $newUpdate)) {
|
if (!fwrite($dlHandler, $newUpdate)) {
|
||||||
echo '<p>Could not save new update. Operation aborted.</p>';
|
echo '<p>Could not save new update. Operation aborted.</p>';
|
||||||
exit();
|
exit;
|
||||||
}
|
}
|
||||||
fclose($dlHandler);
|
fclose($dlHandler);
|
||||||
echo '<p>Update Downloaded And Saved</p>';
|
echo '<p>Update Downloaded And Saved</p>';
|
||||||
@@ -205,7 +205,7 @@ class UpgradeController extends Controller
|
|||||||
echo "<li style='color:red;'>".$ex->getMessage().'</li>';
|
echo "<li style='color:red;'>".$ex->getMessage().'</li>';
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
}
|
}
|
||||||
exit();
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteBarNotification($key)
|
public function deleteBarNotification($key)
|
||||||
@@ -293,7 +293,7 @@ class UpgradeController extends Controller
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo '<p>Latest code found. <a href='.url('file-upgrade?dodownload=true').'>» Download Now?</a></p>';
|
echo '<p>Latest code found. <a href='.url('file-upgrade?dodownload=true').'>» Download Now?</a></p>';
|
||||||
exit();
|
exit;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo '<p>Update already downloaded.</p>';
|
echo '<p>Update already downloaded.</p>';
|
||||||
@@ -302,7 +302,7 @@ class UpgradeController extends Controller
|
|||||||
$updated = $this->doUpdate();
|
$updated = $this->doUpdate();
|
||||||
} else {
|
} else {
|
||||||
echo '<p>Update ready. <a href='.url('file-upgrade?doUpdate=true').'>» Install Now?</a></p>';
|
echo '<p>Update ready. <a href='.url('file-upgrade?doUpdate=true').'>» Install Now?</a></p>';
|
||||||
exit();
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($updated == true) {
|
if ($updated == true) {
|
||||||
|
@@ -4,7 +4,6 @@ namespace App\Http\Requests\helpdesk;
|
|||||||
|
|
||||||
use App\Http\Requests\Request;
|
use App\Http\Requests\Request;
|
||||||
use App\Model\helpdesk\Settings\CommonSettings;
|
use App\Model\helpdesk\Settings\CommonSettings;
|
||||||
use Illuminate\Contracts\Validation\Validator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AgentRequest.
|
* AgentRequest.
|
||||||
|
@@ -129,7 +129,7 @@ class ClientRequest extends Request
|
|||||||
{
|
{
|
||||||
$settings = $settings->select('status')->where('option_name', '=', 'send_otp')->first();
|
$settings = $settings->select('status')->where('option_name', '=', 'send_otp')->first();
|
||||||
$email_mandatory = $settings->select('status')->where('option_name', '=', 'email_mandatory')->first();
|
$email_mandatory = $settings->select('status')->where('option_name', '=', 'email_mandatory')->first();
|
||||||
if (($email_mandatory->status == 0 || $email_mandatory->status == '0')) {
|
if ($email_mandatory->status == 0 || $email_mandatory->status == '0') {
|
||||||
if (!\Auth::check()) {
|
if (!\Auth::check()) {
|
||||||
return [
|
return [
|
||||||
'Name' => 'required',
|
'Name' => 'required',
|
||||||
|
@@ -13,6 +13,6 @@ class System extends BaseModel
|
|||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
|
|
||||||
'id', 'status', 'url', 'name', 'department', 'page_size', 'log_level', 'purge_log', 'name_format',
|
'id', 'status', 'url', 'name', 'department', 'page_size', 'log_level', 'purge_log', 'name_format',
|
||||||
'time_farmat', 'date_format', 'date_time_format', 'day_date_time', 'time_zone', 'content', 'api_key', 'api_enable', 'api_key_mandatory', 'version'
|
'time_farmat', 'date_format', 'date_time_format', 'day_date_time', 'time_zone', 'content', 'api_key', 'api_enable', 'api_key_mandatory', 'version',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@@ -2,10 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use App\Model\helpdesk\Settings\System;
|
|
||||||
use App\Model\Update\BarNotification;
|
use App\Model\Update\BarNotification;
|
||||||
use Illuminate\Queue\Events\JobFailed;
|
use Illuminate\Queue\Events\JobFailed;
|
||||||
use Illuminate\Support\Facades\Config;
|
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Laravel\Dusk\DuskServiceProvider;
|
use Laravel\Dusk\DuskServiceProvider;
|
||||||
|
@@ -26,7 +26,6 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
|
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -51,18 +51,18 @@ class DatabaseSeeder extends Seeder
|
|||||||
$tables = Schema::getAllTables();
|
$tables = Schema::getAllTables();
|
||||||
|
|
||||||
foreach ($tables as $table) {
|
foreach ($tables as $table) {
|
||||||
$tableName = (array)$table;
|
$tableName = (array) $table;
|
||||||
$tableName = reset($tableName);
|
$tableName = reset($tableName);
|
||||||
|
|
||||||
$columns = Schema::getColumnListing($tableName);
|
$columns = Schema::getColumnListing($tableName);
|
||||||
|
|
||||||
foreach ($columns as $column) {
|
foreach ($columns as $column) {
|
||||||
if (Schema::getColumnType($tableName, $column) == 'string') {
|
if (Schema::getColumnType($tableName, $column) == 'string') {
|
||||||
Schema::table($tableName, function ($table) use($column) {
|
Schema::table($tableName, function ($table) use ($column) {
|
||||||
$table->string($column)->nullable()->change();
|
$table->string($column)->nullable()->change();
|
||||||
});
|
});
|
||||||
} elseif (Schema::getColumnType($tableName, $column) == 'boolean') {
|
} elseif (Schema::getColumnType($tableName, $column) == 'boolean') {
|
||||||
Schema::table($tableName, function ($table) use($column) {
|
Schema::table($tableName, function ($table) use ($column) {
|
||||||
$table->boolean($column)->default(0)->change();
|
$table->boolean($column)->default(0)->change();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -527,7 +527,7 @@ Route::middleware('web')->group(function () {
|
|||||||
// show ticket via have a ticket
|
// show ticket via have a ticket
|
||||||
Route::get('show-ticket/{id}/{code}', [Client\helpdesk\UnAuthController::class, 'showTicketCode'])->name('show.ticket'); //detail ticket information
|
Route::get('show-ticket/{id}/{code}', [Client\helpdesk\UnAuthController::class, 'showTicketCode'])->name('show.ticket'); //detail ticket information
|
||||||
|
|
||||||
//testing ckeditor
|
//testing ckeditor
|
||||||
//===================================================================================
|
//===================================================================================
|
||||||
Route::middleware('auth')->group(function () {
|
Route::middleware('auth')->group(function () {
|
||||||
Route::get('client-profile', [Client\helpdesk\GuestController::class, 'getProfile'])->name('client.profile'); /* User profile get */
|
Route::get('client-profile', [Client\helpdesk\GuestController::class, 'getProfile'])->name('client.profile'); /* User profile get */
|
||||||
|
Reference in New Issue
Block a user