Apply fixes from StyleCI

This commit is contained in:
StyleCI Bot
2023-01-07 20:58:45 +00:00
parent e7c679405c
commit 16083484fd
330 changed files with 14915 additions and 14631 deletions

View File

@@ -134,6 +134,7 @@ class ApiController extends Controller
* @method POST
*
* @param user_id,subject,body,helptopic,sla,priority,dept
*
* @return json
*/
public function createTicket(\App\Http\Requests\helpdesk\CreateTicketRequest $request, \App\Model\helpdesk\Utility\CountryCode $code)
@@ -194,6 +195,7 @@ class ApiController extends Controller
* Reply for the ticket.
*
* @param TicketRequest $request
*
* @return json
*/
public function ticketReply()
@@ -731,7 +733,7 @@ class ApiController extends Controller
}
$url = $this->request->input('url');
if (! Str::is('*/', $url)) {
if (!Str::is('*/', $url)) {
$url = Str::finish($url, '/');
}
@@ -764,6 +766,7 @@ class ApiController extends Controller
* Call curl function for Get Method.
*
* @param type $url
*
* @return type int|string|json
*/
public function callGetApi($url)
@@ -788,6 +791,7 @@ class ApiController extends Controller
*
* @param type $url
* @param type $data
*
* @return type int|string|json
*/
public function callPostApi($url, $data)
@@ -1256,7 +1260,7 @@ class ApiController extends Controller
return response()->json(compact('error'));
}
$id = $this->request->input('ticket_id');
if (! $this->model->where('id', $id)->first()) {
if (!$this->model->where('id', $id)->first()) {
$error = 'There is no Ticket as ticket id: '.$id;
return response()->json(compact('error'));
@@ -1315,7 +1319,7 @@ class ApiController extends Controller
$result['duedate'] = date_add($result2->created_at, date_interval_create_from_date_string($result2->grace_period))->format('Y:m:d H:i:s');
$result['title'] = utfEncoding(Ticket_Thread::where('ticket_id', $id)->orderBy('id')->first()->title);
$assigned = Tickets::where('id', $id)->select('assigned_to', 'team_id')->first()->toArray();
if (! empty($assigned)) {
if (!empty($assigned)) {
if ($assigned['assigned_to'] != null) {
$result['assignee'] = User::where('id', $assigned['assigned_to'])->first()->name();
} elseif ($assigned['team_id'] != null) {
@@ -1584,10 +1588,10 @@ class ApiController extends Controller
if ($ticket->dept_id && $ticket->help_topic_id) {
return $this->getSystem($check, $query);
}
if (! $ticket->dept_id && $ticket->help_topic_id) {
if (!$ticket->dept_id && $ticket->help_topic_id) {
return $query->select('tickets.help_topic_id');
}
if ($ticket->dept_id && ! $ticket->help_topic_id) {
if ($ticket->dept_id && !$ticket->help_topic_id) {
return $query->select('tickets.dept_id');
}
}
@@ -1611,6 +1615,7 @@ class ApiController extends Controller
* Register a user with username and password.
*
* @param Request $request
*
* @return type json
*/
public function register(Request $request)

View File

@@ -35,7 +35,7 @@ class ApiExceptAuthController extends Controller
}
$url = $this->request->input('url');
if (! Str::is('*/', $url)) {
if (!Str::is('*/', $url)) {
$url = Str::finish($url, '/');
}
@@ -73,6 +73,7 @@ class ApiExceptAuthController extends Controller
* Call curl function for Get Method.
*
* @param type $url
*
* @return type int|string|json
*/
public function callGetApi($url)
@@ -97,6 +98,7 @@ class ApiExceptAuthController extends Controller
*
* @param type $url
* @param type $data
*
* @return type int|string|json
*/
public function callPostApi($url, $data)

View File

@@ -52,6 +52,7 @@ class TicketController extends Controller
* @param type $helptopic
* @param type $sla
* @param type $priority
*
* @return type string
*/
public function createTicket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data, $attach = '')
@@ -101,7 +102,7 @@ class TicketController extends Controller
$this->storeCollaborators($headers, $id);
$thread = $this->ticketThread($subject, $body, $id, $user_id);
if (! empty($attach)) {
if (!empty($attach)) {
$this->attach($thread, $attach);
}
@@ -115,6 +116,7 @@ class TicketController extends Controller
* store_collaborators.
*
* @param type $headers
*
* @return type
*/
public function storeCollaborators($headers, $id)
@@ -168,6 +170,7 @@ class TicketController extends Controller
* @param type $body
* @param type $id
* @param type $user_id
*
* @return type
*/
public function ticketThread($subject, $body, $id, $user_id)
@@ -191,6 +194,7 @@ class TicketController extends Controller
* Generates Ticket Number.
*
* @param type $ticket_number
*
* @return type integer
*/
public function ticketNumber($ticket_number)
@@ -231,6 +235,7 @@ class TicketController extends Controller
* Generate a random string for password.
*
* @param type $length
*
* @return type string
*/
public function generateRandomString($length = 10)
@@ -254,6 +259,7 @@ class TicketController extends Controller
*
* @param type Ticket_Thread $thread
* @param type TicketRequest $request
*
* @return type bool
*/
public function reply($thread, $request, $ta, $attach = '')
@@ -299,7 +305,7 @@ class TicketController extends Controller
}
$thread->save();
if (! empty($attach)) {
if (!empty($attach)) {
$check_attachment = $this->attach($thread->id, $attach);
}
@@ -312,7 +318,7 @@ class TicketController extends Controller
$ticket_number = $tickets->ticket_number;
$company = $this->company();
$username = $ticket_user->user_name;
if (! empty(Auth::user()->agent_sign)) {
if (!empty(Auth::user()->agent_sign)) {
$agentsign = Auth::user()->agent_sign;
} else {
$agentsign = null;
@@ -400,6 +406,7 @@ class TicketController extends Controller
*
* @param type $ticket_id
* @param type Ticket_Thread $thread
*
* @return type bool
*/
public function ticketEditPost($ticket_id, $thread, $ticket)
@@ -431,6 +438,7 @@ class TicketController extends Controller
* function to assign ticket.
*
* @param type $id
*
* @return type bool
*/
public function assign($id)
@@ -440,19 +448,19 @@ class TicketController extends Controller
//dd($UserEmail);
// $UserEmail = 'sujitprasad12@yahoo.in';
$user = User::where('email', '=', $UserEmail)->first();
if (! $user) {
if (!$user) {
return ['error' => 'No agent not found'];
}
$user_id = $user->id;
$ticket = Tickets::where('id', '=', $id)->first();
if (! $ticket) {
if (!$ticket) {
return ['error' => 'No ticket not found'];
}
$ticket_number = $ticket->ticket_number;
$ticket->assigned_to = $user_id;
$ticket->save();
$ticket_thread = Ticket_Thread::where('ticket_id', '=', $id)->first();
if (! $ticket_thread) {
if (!$ticket_thread) {
return ['error' => 'No thread not found'];
}
$ticket_subject = $ticket_thread->title;
@@ -494,6 +502,7 @@ class TicketController extends Controller
*
* @param type $id
* @param type Tickets $ticket
*
* @return type string
*/
public function delete($ids, $ticket)
@@ -547,6 +556,7 @@ class TicketController extends Controller
* check email for dublicate entry.
*
* @param type $email
*
* @return type bool
*/
public function checkEmail($email)
@@ -589,6 +599,7 @@ class TicketController extends Controller
*
* @param type $thread
* @param type $attach
*
* @return int
*/
public function attach($thread, $attach)
@@ -623,6 +634,7 @@ class TicketController extends Controller
* useradd.
*
* @param type Image $image
*
* @return type json
*/
public function useradd()

View File

@@ -39,6 +39,7 @@ class TokenAuthController extends Controller
* Authenticating user with username and password and retuen token.
*
* @param Request $request
*
* @return type json
*/
public function authenticate(Request $request)
@@ -50,7 +51,7 @@ class TokenAuthController extends Controller
//$credentials = $request->only('email', 'password');
try {
if (! $token = JWTAuth::attempt([$field => $usernameinput, 'password' => $password, 'active' => 1])) {
if (!$token = JWTAuth::attempt([$field => $usernameinput, 'password' => $password, 'active' => 1])) {
return response()->json(['error' => 'invalid_credentials', 'status_code' => 401]);
}
} catch (JWTException $e) {
@@ -75,7 +76,7 @@ class TokenAuthController extends Controller
{
//dd(JWTAuth::parseToken()->authenticate());
try {
if (! $user = JWTAuth::parseToken()->authenticate()) {
if (!$user = JWTAuth::parseToken()->authenticate()) {
return response()->json(['user_not_found', 404]);
}
} catch (Tymon\JWTAuth\Exceptions\TokenExpiredException $e) {
@@ -97,6 +98,7 @@ class TokenAuthController extends Controller
* Register a user with username and password.
*
* @param Request $request
*
* @return type json
*/
// public function register(Request $request)

View File

@@ -86,7 +86,7 @@ class Install extends Command
$result = [];
foreach ($extensions as $key => $extension) {
$result[$key]['extension'] = $extension;
if (! extension_loaded($extension)) {
if (!extension_loaded($extension)) {
$result[$key]['status'] = "Not Loading, Please open '".php_ini_loaded_file()."' and add 'extension = ".$extension;
} else {
$result[$key]['status'] = 'Loading';

View File

@@ -46,12 +46,12 @@ class InstallDB extends Command
try {
if ($this->confirm('Do you want to migrate tables now?')) {
$env = base_path().DIRECTORY_SEPARATOR.'.env';
if (! is_file($env)) {
if (!is_file($env)) {
throw new \Exception("Please run 'php artisan install:faveo'");
}
$dummy_confirm = $this->confirm('Would you like to install dummy data in database to test before going live?');
$this->call('key:generate', ['--force' => true]);
if (! $dummy_confirm) {
if (!$dummy_confirm) {
$this->call('install:migrate');
$this->call('install:seed');
} else {

View File

@@ -54,10 +54,10 @@ class SecureFaveoAPPKey extends Command
{
$username = $this->ask('Enter admin account username');
$password = $this->secret('Enter admin account password');
if (! $username || ! $password) {
if (!$username || !$password) {
throw new Exception('Username and password are required.', 1);
}
if (! Hash::check($password, User::where('user_name', $username)->value('password'))) {
if (!Hash::check($password, User::where('user_name', $username)->value('password'))) {
throw new Exception('We do not recognize you, make sure the username or password you provided are correct.', 1);
}
@@ -87,12 +87,13 @@ class SecureFaveoAPPKey extends Command
*
* @param string $file
* @param string $datacontent
*
* @return voif
*/
private function updateAppKey(string $file, string $datacontent): void
{
$this->fetchAndStoreEmailPassword();
if (! $this->doesEnvVaribaleExists($datacontent, 'APP_KEY')) {
if (!$this->doesEnvVaribaleExists($datacontent, 'APP_KEY')) {
$datacontent = $datacontent."\r\nAPP_KEY=base64:h3KjrHeVxyE+j6c8whTAs2YI+7goylGZ/e2vElgXT6I=";
File::put($file, $datacontent);
}
@@ -113,11 +114,12 @@ class SecureFaveoAPPKey extends Command
*
* @param string $envContent
* @param string $key
*
* @return bool true if given key exist otherwise false
*/
private function doesEnvVaribaleExists(string $envContent, string $key): bool
{
return ! (strpos($envContent, $key) === false);
return !(strpos($envContent, $key) === false);
}
/**
@@ -148,9 +150,10 @@ class SecureFaveoAPPKey extends Command
* Extract the encryption key from the given configuration.
*
* @param array $config
* @return string
*
* @throws \RuntimeException
*
* @return string
*/
private function key()
{

View File

@@ -75,6 +75,7 @@ class SetupTestEnv extends Command
*
* @param string $dbUsername mysql username
* @param string $dbPassword mysql password
*
* @return null
*/
private function setupConfig($dbUsername, $dbPassword)
@@ -166,6 +167,7 @@ class SetupTestEnv extends Command
*
* @param string $dbUsername
* @param string $dbPassword
*
* @return null
*/
private function createEnv(string $dbUsername, string $dbPassword)

View File

@@ -30,6 +30,7 @@ class Kernel extends ConsoleKernel
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
*
* @return void
*/
protected function schedule(Schedule $schedule)

View File

@@ -90,9 +90,9 @@ class LaravelLogViewer
$pattern = '/\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\].*/';
if (! self::$file) {
if (!self::$file) {
$log_file = self::getFiles();
if (! count($log_file)) {
if (!count($log_file)) {
return [];
}
self::$file = $log_file[0];
@@ -106,7 +106,7 @@ class LaravelLogViewer
preg_match_all($pattern, $file, $headings);
if (! is_array($headings)) {
if (!is_array($headings)) {
return $log;
}
@@ -122,7 +122,7 @@ class LaravelLogViewer
if (strpos(strtolower($h[$i]), '.'.$level_value)) {
preg_match('/^\[(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})\].*?(\w+)\.'.$level_key.': (.*?)( in .*?:[0-9]+)?$/', $h[$i], $current);
if (! isset($current[3])) {
if (!isset($current[3])) {
continue;
}
@@ -161,6 +161,7 @@ class LaravelLogViewer
/**
* @param bool $basename
*
* @return array
*/
public static function getFiles($basename = false)

View File

@@ -124,7 +124,7 @@ class SettingsController extends Controller
public function activate()
{
if (! \Schema::hasColumn('ticket_attachment', 'driver')) {
if (!\Schema::hasColumn('ticket_attachment', 'driver')) {
$path = 'app'.DIRECTORY_SEPARATOR.'FaveoStorage'.DIRECTORY_SEPARATOR.'database'.DIRECTORY_SEPARATOR.'migrations';
Artisan::call('migrate', [
'--path' => $path,

View File

@@ -24,6 +24,7 @@ class Finder
*
* @param $id type int
* @param $custom type array/null
*
* @return type string
*/
public static function department($id, $custom = null)
@@ -43,6 +44,7 @@ class Finder
*
* @param $id type int
* @param $custom type array/null
*
* @return type string
*/
public static function group($id, $custom = null)
@@ -62,6 +64,7 @@ class Finder
*
* @param $id type int
* @param $custom type array/null
*
* @return type string
*/
public static function statusType($id, $custom = null)
@@ -81,6 +84,7 @@ class Finder
*
* @param $id type int
* @param $custom type array/null
*
* @return type string
*/
public static function status($id, $custom = null)
@@ -106,6 +110,7 @@ class Finder
* If the value is 1+2+4 = 7 the response is client, agent, admin.
*
* @param $id type int
*
* @return type string
*/
public static function rolesGroup($id)
@@ -137,6 +142,7 @@ class Finder
* This function is used to return the set of status which are of any type passed in the param.
*
* @param type $id
*
* @return type array
*/
public static function anyTypeStatus($id)

View File

@@ -72,6 +72,7 @@ class AgentController extends Controller
* @param Groups $group
* @param Department $department
* @param Teams $team_all
*
* @return type view
*/
public function create(Timezones $timezone, Groups $group, Department $department, Teams $team_all, CountryCode $code)
@@ -105,6 +106,7 @@ class AgentController extends Controller
* @param User $user
* @param AgentRequest $request
* @param Assign_team_agent $team_assign_agent
*
* @return type Response
*/
public function store(User $user, AgentRequest $request)
@@ -113,7 +115,7 @@ class AgentController extends Controller
return redirect()->back()->with(['fails2' => Lang::get('lang.country-code-required-error'), 'country_code' => 1])->withInput();
} else {
$code = CountryCode::select('phonecode')->where('phonecode', '=', $request->get('country_code'))->get();
if (! count($code)) {
if (!count($code)) {
return redirect()->back()->with(['fails2' => Lang::get('lang.incorrect-country-code-error'), 'country_code' => 1])->withInput();
}
}
@@ -175,6 +177,7 @@ class AgentController extends Controller
* @param type Groups $group
* @param type Department $department
* @param type Teams $team
*
* @return type Response
*/
public function edit($id, User $user, Assign_team_agent $team_assign_agent, Timezones $timezone, Groups $group, Department $department, Teams $team, CountryCode $code)
@@ -205,6 +208,7 @@ class AgentController extends Controller
* @param type User $user
* @param type AgentUpdate $request
* @param type Assign_team_agent $team_assign_agent
*
* @return type Response
*/
public function update($id, User $user, AgentUpdate $request, Assign_team_agent $team_assign_agent)
@@ -213,7 +217,7 @@ class AgentController extends Controller
return redirect()->back()->with(['fails2' => Lang::get('lang.country-code-required-error'), 'country_code' => 1])->withInput();
} else {
$code = CountryCode::select('phonecode')->where('phonecode', '=', $request->get('country_code'))->get();
if (! count($code)) {
if (!count($code)) {
return redirect()->back()->with(['fails2' => Lang::get('lang.incorrect-country-code-error'), 'country_code' => 1])->withInput();
}
}
@@ -255,9 +259,10 @@ class AgentController extends Controller
* @param type $id
* @param User $user
* @param Assign_team_agent $team_assign_agent
* @return type Response
*
* @throws Exception
*
* @return type Response
*/
public function destroy($id, User $user, Assign_team_agent $team_assign_agent)
{
@@ -284,6 +289,7 @@ class AgentController extends Controller
* Generate a random string for password.
*
* @param type $length
*
* @return string
*/
public function generateRandomString($length = 10)

View File

@@ -73,6 +73,7 @@ class BanlistController extends Controller
*
* @param BanRequest $request
* @param User $user
*
* @return type Response
*/
public function store(BanRequest $request, User $user)
@@ -107,6 +108,7 @@ class BanlistController extends Controller
*
* @param type $id
* @param User $ban
*
* @return type Response
*/
public function edit($id, User $ban)
@@ -126,6 +128,7 @@ class BanlistController extends Controller
* @param type $id
* @param User $ban
* @param BanlistRequest $request
*
* @return type Response
*/
public function update($id, User $ban, BanlistRequest $request)
@@ -149,6 +152,7 @@ class BanlistController extends Controller
*
* @param type $id
* @param \App\User $ban
*
* @return type view
*/
public function delete($id, User $ban)

View File

@@ -26,6 +26,7 @@ class CloseWrokflowController extends Controller
* get the workflow settings page.
*
* @param \App\Model\helpdesk\Workflow\WorkflowClose $securitys
*
* @return type view
*/
public function index(WorkflowClose $securitys)
@@ -44,6 +45,7 @@ class CloseWrokflowController extends Controller
*
* @param type $id
* @param \App\Http\Requests\helpdesk\WorkflowCloseRequest $request
*
* @return type redirect
*/
public function update($id, WorkflowCloseRequest $request)

View File

@@ -45,6 +45,7 @@ class DepartmentController extends Controller
* Get index page.
*
* @param type Department $department
*
* @return type Response
*/
public function index(Department $department)
@@ -68,6 +69,7 @@ class DepartmentController extends Controller
* @param type Template $template
* @param type Emails $email
* @param type Groups $group
*
* @return type Response
*/
public function create(User $user, Group_assign_department $group_assign_department, Department $department, Sla_plan $sla, Template $template, Emails $email, Groups $group)
@@ -94,6 +96,7 @@ class DepartmentController extends Controller
*
* @param type Department $department
* @param type DepartmentRequest $request
*
* @return type Response
*/
public function store(Department $department, DepartmentRequest $request)
@@ -142,6 +145,7 @@ class DepartmentController extends Controller
* @param type Sla_plan $sla
* @param type Emails $email
* @param type Groups $group
*
* @return type Response
*/
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)
@@ -175,6 +179,7 @@ class DepartmentController extends Controller
* @param type Group_assign_department $group_assign_department
* @param type Department $department
* @param type DepartmentUpdate $request
*
* @return type Response
*/
public function update($id, Group_assign_department $group_assign_department, Department $department, DepartmentUpdate $request)
@@ -223,6 +228,7 @@ class DepartmentController extends Controller
* @param type int $id
* @param type Department $department
* @param type Group_assign_department $group_assign_department
*
* @return type Response
*/
public function destroy($id, Department $department, Group_assign_department $group_assign_department, System $system, Tickets $tickets)

View File

@@ -44,6 +44,7 @@ class EmailsController extends Controller
* Display a listing of the Emails.
*
* @param type Emails $emails
*
* @return type view
*/
public function index(Emails $email)
@@ -65,6 +66,7 @@ class EmailsController extends Controller
* @param type Help_topic $help
* @param type Priority $priority
* @param type MailboxProtocol $mailbox_protocol
*
* @return type Response
*/
public function create(Department $department, Help_topic $help, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol)
@@ -94,6 +96,7 @@ class EmailsController extends Controller
* Check for email input validation.
*
* @param EmailsRequest $request
*
* @return int
*/
public function validatingEmailSettings(MailRequest $request, $id = '')
@@ -158,6 +161,7 @@ class EmailsController extends Controller
*
* @param type Emails $email
* @param type EmailsRequest $request
*
* @return type Redirect
*/
public function store($request, $service_request = [], $id = '')
@@ -202,7 +206,7 @@ class EmailsController extends Controller
$email->auto_response = 0;
}
$email->fetching_encryption = $request->input('fetching_encryption');
if (! $request->input('imap_validate')) {
if (!$request->input('imap_validate')) {
$email->mailbox_protocol = 'novalidate-cert';
}
$email->department = $this->departmentValue($request->input('department'));
@@ -325,6 +329,7 @@ class EmailsController extends Controller
* @param type Emails $email
* @param type Priority $priority
* @param type MailboxProtocol $mailbox_protocol
*
* @return type Response
*/
public function edit($id, Department $department, Help_topic $help, Emails $email, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol)
@@ -360,6 +365,7 @@ class EmailsController extends Controller
* Check for email input validation.
*
* @param EmailsRequest $request
*
* @return int
*/
public function validatingEmailSettingsUpdate($id, MailRequest $request)
@@ -384,6 +390,7 @@ class EmailsController extends Controller
* @param type $id
* @param type Emails $email
* @param type EmailsEditRequest $request
*
* @return type Response
*/
public function update($id, $request)
@@ -411,6 +418,7 @@ class EmailsController extends Controller
*
* @param type int $id
* @param type Emails $email
*
* @return type Redirect
*/
public function destroy($id, Emails $email)
@@ -441,6 +449,7 @@ class EmailsController extends Controller
* Create imap connection.
*
* @param type $request
*
* @return type int
*/
public function getImapStream($request)
@@ -460,7 +469,7 @@ class EmailsController extends Controller
if ($encryption != '') {
$server->setFlag($encryption);
}
if (! $validate) {
if (!$validate) {
$server->setFlag('novalidate-cert');
} else {
$server->setFlag('validate-cert');
@@ -476,6 +485,7 @@ class EmailsController extends Controller
* Check connection.
*
* @param type $imap_stream
*
* @return type int
*/
public function checkImapStream($imap_stream)
@@ -494,6 +504,7 @@ class EmailsController extends Controller
* Get smtp connection.
*
* @param type $request
*
* @return int
*/
public function getSmtp($request)
@@ -509,7 +520,7 @@ class EmailsController extends Controller
$mail->Password = $request->input('password'); // SMTP password
$mail->SMTPSecure = $request->input('sending_encryption'); // Enable TLS encryption, `ssl` also accepted
$mail->Port = $request->input('sending_port'); // TCP port to connect to
if (! $request->input('smtp_validate')) {
if (!$request->input('smtp_validate')) {
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->SMTPOptions = [
'ssl' => [
@@ -543,6 +554,7 @@ class EmailsController extends Controller
* Checking if department value is null.
*
* @param type $dept
*
* @return type string or null
*/
public function departmentValue($dept)
@@ -560,6 +572,7 @@ class EmailsController extends Controller
* Checking if priority value is null.
*
* @param type $priority
*
* @return type string or null
*/
public function priorityValue($priority)
@@ -577,6 +590,7 @@ class EmailsController extends Controller
* Checking if helptopic value is null.
*
* @param type $help_topic
*
* @return type string or null
*/
public function helpTopicValue($help_topic)

View File

@@ -34,6 +34,7 @@ class ErrorAndDebuggingController extends Controller
* function to show error and debugging setting page.
*
* @param void
*
* @return response
*/
public function showSettings()
@@ -48,6 +49,7 @@ class ErrorAndDebuggingController extends Controller
* funtion to update error and debugging settings.
*
* @param void
*
* @return
*/
public function postSettings()
@@ -98,6 +100,7 @@ class ErrorAndDebuggingController extends Controller
* function to show error log table page.
*
* @param void
*
* @return response view
*/
public function showErrorLogs()

View File

@@ -64,6 +64,7 @@ class FormController extends Controller
* list of forms.
*
* @param type Forms $forms
*
* @return Response
*/
public function index(Forms $forms)
@@ -93,6 +94,7 @@ class FormController extends Controller
* Show a new form.
*
* @param int $id
*
* @return Response
*/
public function show($id)
@@ -136,7 +138,7 @@ class FormController extends Controller
$count = count(Input::get('name'));
$fields = [];
for ($i = 0; $i <= $count; $i++) {
if (! empty(Input::get('name')[$i])) {
if (!empty(Input::get('name')[$i])) {
$name = Str::slug(Input::get('name')[$i], '_');
$field = Fields::create([
'forms_id' => $forms->id,
@@ -165,6 +167,7 @@ class FormController extends Controller
* @param \App\Model\helpdesk\Form\Forms $forms
* @param type $field
* @param type $help_topic
*
* @return type redirect
*/
public function delete($id, Forms $forms, Fields $field, Help_topic $help_topic)
@@ -232,12 +235,12 @@ class FormController extends Controller
]);
try {
if (! $request->input('formname')) {
if (!$request->input('formname')) {
throw new Exception(Lang::get('lang.please_fill_form_name'));
}
$form = new Forms();
$forms = $form->find($id);
if (! $forms) {
if (!$forms) {
throw new Exception('Sorry we can not find your request');
}
$forms->formname = Input::get('formname');

View File

@@ -41,6 +41,7 @@ class GroupController extends Controller
* @param type Groups $group
* @param type Department $department
* @param type Group_assign_department $group_assign_department
*
* @return type Response
*/
public function index(Groups $group, Department $department, Group_assign_department $group_assign_department)
@@ -74,6 +75,7 @@ class GroupController extends Controller
*
* @param type Groups $group
* @param type GroupRequest $request
*
* @return type Response
*/
public function store(Groups $group, GroupRequest $request)
@@ -94,6 +96,7 @@ class GroupController extends Controller
*
* @param type int $id
* @param type Groups $group
*
* @return type Response
*/
public function edit($id, Groups $group)
@@ -113,6 +116,7 @@ class GroupController extends Controller
* @param type int $id
* @param type Groups $group
* @param type Request $request
*
* @return type Response
*/
public function update($id, Groups $group, GroupUpdateRequest $request)
@@ -181,6 +185,7 @@ class GroupController extends Controller
* @param type int $id
* @param type Groups $group
* @param type Group_assign_department $group_assign_department
*
* @return type Response
*/
public function destroy($id, Groups $group, Group_assign_department $group_assign_department)

View File

@@ -43,6 +43,7 @@ class HelptopicController extends Controller
* Display a listing of the helptopic.
*
* @param type Help_topic $topic
*
* @return type Response
*/
public function index(Help_topic $topic)
@@ -65,6 +66,7 @@ class HelptopicController extends Controller
* @param type Form_name $form
* @param type Agents $agent
* @param type Sla_plan $sla
*
* @return type Response
*/
/*
@@ -98,6 +100,7 @@ class HelptopicController extends Controller
*
* @param type Help_topic $topic
* @param type HelptopicRequest $request
*
* @return type Response
*/
public function store(Help_topic $topic, HelptopicRequest $request)
@@ -134,6 +137,7 @@ class HelptopicController extends Controller
* @param type Form_name $form
* @param type Agents $agent
* @param type Sla_plan $sla
*
* @return type Response
*/
public function edit($id, Ticket_Priority $priority, Department $department, Help_topic $topic, Forms $form, Sla_plan $sla)
@@ -161,6 +165,7 @@ class HelptopicController extends Controller
* @param type $id
* @param type Help_topic $topic
* @param type HelptopicUpdate $request
*
* @return type Response
*/
public function update($id, Help_topic $topic, HelptopicUpdate $request)
@@ -200,6 +205,7 @@ class HelptopicController extends Controller
*
* @param type int $id
* @param type Help_topic $topic
*
* @return type Response
*/
public function destroy($id, Help_topic $topic, Ticket $ticket_setting)

View File

@@ -41,12 +41,13 @@ class LanguageController extends Controller
* Switch language at runtime.
*
* @param type "" $lang
*
* @return type response
*/
public function switchLanguage($lang)
{
$changed = UnAuth::changeLanguage($lang);
if (! $changed) {
if (!$changed) {
return \Redirect::back()->with('fails', Lang::get('lang.language-error'));
} else {
return \Redirect::back();
@@ -162,7 +163,7 @@ class LanguageController extends Controller
Session::flash('link', 'change-language/'.strtolower(Request::get('iso-code')));
return Redirect::back()->withInput();
} elseif (! array_key_exists(strtolower(Request::get('iso-code')), Config::get('languages'))) {//Checking Valid ISO code form Languages.php
} elseif (!array_key_exists(strtolower(Request::get('iso-code')), Config::get('languages'))) {//Checking Valid ISO code form Languages.php
//sending back with error message
Session::flash('fails', Lang::get('lang.iso-code-error'));
@@ -181,7 +182,7 @@ class LanguageController extends Controller
//check if Zip extract foldercontains any subfolder
$directories = File::directories($extractpath);
//$directories = glob($extractpath. '/*' , GLOB_ONLYDIR);
if (! empty($directories)) { //if extract folder contains subfolder
if (!empty($directories)) { //if extract folder contains subfolder
$success = File::deleteDirectory($extractpath); //remove extracted folder and it's subfolder from lang
//$success2 = File::delete($destinationPath.'/'.$name);
if ($success) {
@@ -229,6 +230,7 @@ class LanguageController extends Controller
* This function is used to delete languages.
*
* @param type $lang
*
* @return type response
*/
public function deleteLanguage($lang)

View File

@@ -127,6 +127,7 @@ class PriorityController extends Controller
/**
* @param type $priority_id
*
* @return type
*/
public function priorityEdit($priority_id)
@@ -138,6 +139,7 @@ class PriorityController extends Controller
/**
* @param PriorityRequest $request
*
* @return type
*/
public function priorityEdit1(PriorityRequest $request)
@@ -162,6 +164,7 @@ class PriorityController extends Controller
/**
* @param type $priority_id
*
* @return type
*/
public function destroy($priority_id)

View File

@@ -76,6 +76,7 @@ class ProfileController extends Controller
*
* @param type int $id
* @param type ProfileRequest $request
*
* @return type Response
*/
public function postProfile($id, ProfileRequest $request)
@@ -118,6 +119,7 @@ class ProfileController extends Controller
* @param type int $id
* @param type User $user
* @param type ProfilePassword $request
*
* @return type Response
*/
public function postProfilePassword($id, User $user, ProfilePassword $request)

View File

@@ -32,6 +32,7 @@ class SecurityController extends Controller
* list of securitys.
*
* @param type Security $securitys
*
* @return Response
*/
public function index(Security $securitys)
@@ -59,6 +60,7 @@ class SecurityController extends Controller
* Show security.
*
* @param int $id
*
* @return Response
*/
// public function show($id)
@@ -96,6 +98,7 @@ class SecurityController extends Controller
* @param \App\Model\helpdesk\Settings\Security $securitys
* @param type $field
* @param \App\Http\Controllers\Admin\helpdesk\Help_topic $help_topic
*
* @return type redirect
*/
public function delete($id, Security $securitys, Fields $field, Help_topic $help_topic)

View File

@@ -66,6 +66,7 @@ class SettingsController extends Controller
* @param $compant instance of company table
*
* get the form for company setting page
*
* @return Response
*/
public function getcompany(Company $company)
@@ -86,6 +87,7 @@ class SettingsController extends Controller
* @param type int $id
* @param type Company $company
* @param type CompanyRequest $request
*
* @return Response
*/
public function postcompany($id, Company $company, CompanyRequest $request)
@@ -121,7 +123,7 @@ class SettingsController extends Controller
public function deleteLogo()
{
$path = $_GET['data1']; //get file path of logo image
if (! unlink($path)) {
if (!unlink($path)) {
return 'false';
} else {
$companys = Company::where('id', '=', 1)->first();
@@ -143,6 +145,7 @@ class SettingsController extends Controller
* @param type Date_format $date
* @param type Date_time_format $date_time
* @param type Time_format $time
*
* @return type Response
*/
public function getsystem(System $system, Department $department, Timezones $timezone, Date_format $date, Date_time_format $date_time, Time_format $time, CommonSettings $common_settings)
@@ -177,6 +180,7 @@ class SettingsController extends Controller
* @param type int $id
* @param type System $system
* @param type SystemRequest $request
*
* @return type Response
*/
public function postsystem($id, System $system, SystemRequest $request)
@@ -226,6 +230,7 @@ class SettingsController extends Controller
* @param type Sla_plan $sla
* @param type Help_topic $topic
* @param type Priority $priority
*
* @return type Response
*/
public function getticket(Ticket $ticket, Sla_plan $sla, Help_topic $topic, Ticket_Priority $priority)
@@ -250,6 +255,7 @@ class SettingsController extends Controller
* @param type int $id
* @param type Ticket $ticket
* @param type Request $request
*
* @return type Response
*/
public function postticket($id, Ticket $ticket, Request $request)
@@ -284,6 +290,7 @@ class SettingsController extends Controller
* @param type Email $email
* @param type Template $template
* @param type Emails $email1
*
* @return type Response
*/
public function getemail(Email $email, Template $template, Emails $email1)
@@ -308,6 +315,7 @@ class SettingsController extends Controller
* @param type int $id
* @param type Email $email
* @param type EmailRequest $request
*
* @return type Response
*/
public function postemail($id, Email $email, EmailRequest $request)
@@ -340,6 +348,7 @@ class SettingsController extends Controller
* @param type Email $email
* @param type Template $template
* @param type Emails $email1
*
* @return type Response
*/
public function getSchedular(Email $email, Template $template, Emails $email1, WorkflowClose $workflow)
@@ -398,6 +407,7 @@ class SettingsController extends Controller
*
* @param type Email $email
* @param type EmailRequest $request
*
* @return type Response
*/
public function postSchedular(Email $email, Template $template, Emails $email1, TaskRequest $request, WorkflowClose $workflow)
@@ -437,6 +447,7 @@ class SettingsController extends Controller
* get the form for Responder setting page.
*
* @param type Responder $responder
*
* @return type Response
*/
public function getresponder(Responder $responder)
@@ -456,6 +467,7 @@ class SettingsController extends Controller
*
* @param type Responder $responder
* @param type Request $request
*
* @return type
*/
public function postresponder(Responder $responder, Request $request)
@@ -484,6 +496,7 @@ class SettingsController extends Controller
* get the form for Alert setting page.
*
* @param type Alert $alert
*
* @return type Response
*/
public function getalert(Alert $alert)
@@ -504,6 +517,7 @@ class SettingsController extends Controller
* @param type $id
* @param type Alert $alert
* @param type Request $request
*
* @return type Response
*/
public function postalert($id, Alert $alert, Request $request)
@@ -593,6 +607,7 @@ class SettingsController extends Controller
* @param $compant instance of company table
*
* get the form for company setting page
*
* @return Response
*/
public function getStatuses()
@@ -612,6 +627,7 @@ class SettingsController extends Controller
* @param $compant instance of company table
*
* get the form for company setting page
*
* @return Response
*/
public function getEditStatuses($id)
@@ -631,6 +647,7 @@ class SettingsController extends Controller
* @param $compant instance of company table
*
* get the form for company setting page
*
* @return Response
*/
public function editStatuses($id, StatusRequest $request)
@@ -662,6 +679,7 @@ class SettingsController extends Controller
*
* @param \App\Model\helpdesk\Ticket\Ticket_Status $statuss
* @param \App\Http\Requests\helpdesk\StatusRequest $request
*
* @return type redirect
*/
public function createStatuses(\App\Model\helpdesk\Ticket\Ticket_Status $statuss, StatusRequest $request)
@@ -691,6 +709,7 @@ class SettingsController extends Controller
* delete a status.
*
* @param type $id
*
* @return type redirect
*/
public function deleteStatuses($id)
@@ -778,6 +797,7 @@ class SettingsController extends Controller
* edit a rating.
*
* @param type $id
*
* @return type view
*/
public function editRatingSettings($id)
@@ -834,6 +854,7 @@ class SettingsController extends Controller
* @param \App\Model\helpdesk\Ratings\Rating $rating
* @param \App\Model\helpdesk\Ratings\RatingRef $ratingrefs
* @param \App\Http\Requests\helpdesk\RatingRequest $request
*
* @return type redirect
*/
public function storeRating(Rating $rating, \App\Model\helpdesk\Ratings\RatingRef $ratingrefs, \App\Http\Requests\helpdesk\RatingRequest $request)
@@ -1034,6 +1055,7 @@ class SettingsController extends Controller
* @category function to return clean data view
*
* @param null
*
* @return respone/view
*/
public function getCleanUpView()
@@ -1052,6 +1074,7 @@ class SettingsController extends Controller
* @category function to handle clean dummy data ajax request
*
* @param null
*
* @return json
*/
public function postCleanDummyData(Request $request)
@@ -1069,6 +1092,7 @@ class SettingsController extends Controller
* @category function to clean dummy database and reseed tables with default options
*
* @param null
*
* @return
* Very dangerous function should be call by admin only
*/

View File

@@ -101,6 +101,7 @@ class SettingsController2 extends Controller
* @param $compant instance of company table
*
* get the form for company setting page
*
* @return Response
*/
public function getStatuses()
@@ -120,6 +121,7 @@ class SettingsController2 extends Controller
* @param $compant instance of company table
*
* get the form for company setting page
*
* @return Response
*/
public function editStatuses($id)
@@ -190,6 +192,7 @@ class SettingsController2 extends Controller
* @param $compant instance of company table
*
* get the form for company setting page
*
* @return Response
*/
public function getcompany(Company $company)
@@ -210,6 +213,7 @@ class SettingsController2 extends Controller
* @param type int $id
* @param type Company $company
* @param type CompanyRequest $request
*
* @return Response
*/
public function postcompany($id, Company $company, CompanyRequest $request)
@@ -245,7 +249,7 @@ class SettingsController2 extends Controller
public function deleteLogo()
{
$path = $_GET['data1']; //get file path of logo image
if (! unlink($path)) {
if (!unlink($path)) {
return 'false';
} else {
$companys = Company::where('id', '=', 1)->first();
@@ -267,6 +271,7 @@ class SettingsController2 extends Controller
* @param type Date_format $date
* @param type Date_time_format $date_time
* @param type Time_format $time
*
* @return type Response
*/
public function getsystem(System $system, Department $department, Timezones $timezone, Date_format $date, Date_time_format $date_time, Time_format $time)
@@ -291,6 +296,7 @@ class SettingsController2 extends Controller
* @param type int $id
* @param type System $system
* @param type SystemRequest $request
*
* @return type Response
*/
public function postsystem($id, System $system, SystemRequest $request)
@@ -317,6 +323,7 @@ class SettingsController2 extends Controller
* @param type Sla_plan $sla
* @param type Help_topic $topic
* @param type Priority $priority
*
* @return type Response
*/
public function getticket(Ticket $ticket, Sla_plan $sla, Help_topic $topic, Ticket_Priority $priority)
@@ -341,6 +348,7 @@ class SettingsController2 extends Controller
* @param type int $id
* @param type Ticket $ticket
* @param type Request $request
*
* @return type Response
*/
public function postticket($id, Ticket $ticket, Request $request)
@@ -375,6 +383,7 @@ class SettingsController2 extends Controller
* @param type Email $email
* @param type Template $template
* @param type Emails $email1
*
* @return type Response
*/
public function getemail(Email $email, Template $template, Emails $email1)
@@ -399,6 +408,7 @@ class SettingsController2 extends Controller
* @param type int $id
* @param type Email $email
* @param type EmailRequest $request
*
* @return type Response
*/
public function postemail($id, Email $email, EmailRequest $request)
@@ -431,6 +441,7 @@ class SettingsController2 extends Controller
* @param type Email $email
* @param type Template $template
* @param type Emails $email1
*
* @return type Response
*/
public function getSchedular(Email $email, Template $template, Emails $email1)
@@ -454,6 +465,7 @@ class SettingsController2 extends Controller
*
* @param type Email $email
* @param type EmailRequest $request
*
* @return type Response
*/
public function postSchedular(Email $email, Template $template, Emails $email1, Request $request)
@@ -485,6 +497,7 @@ class SettingsController2 extends Controller
* get the form for Access setting page.
*
* @param type Access $access
*
* @return type Response
*/
// public function getaccess(Access $access) {
@@ -503,6 +516,7 @@ class SettingsController2 extends Controller
*
* @param type Access $access
* @param type Request $request
*
* @return type Response
*/
// public function postaccess(Access $access, Request $request) {
@@ -534,6 +548,7 @@ class SettingsController2 extends Controller
* get the form for Responder setting page.
*
* @param type Responder $responder
*
* @return type Response
*/
public function getresponder(Responder $responder)
@@ -553,6 +568,7 @@ class SettingsController2 extends Controller
*
* @param type Responder $responder
* @param type Request $request
*
* @return type
*/
public function postresponder(Responder $responder, Request $request)
@@ -581,6 +597,7 @@ class SettingsController2 extends Controller
* get the form for Alert setting page.
*
* @param type Alert $alert
*
* @return type Response
*/
public function getalert(Alert $alert)
@@ -601,6 +618,7 @@ class SettingsController2 extends Controller
* @param type $id
* @param type Alert $alert
* @param type Request $request
*
* @return type Response
*/
public function postalert($id, Alert $alert, Request $request)

View File

@@ -37,6 +37,7 @@ class SlaController extends Controller
* Display a listing of the resource.
*
* @param type Sla_plan $sla
*
* @return type Response
*/
public function index(Sla_plan $sla)
@@ -71,6 +72,7 @@ class SlaController extends Controller
*
* @param type Sla_plan $sla
* @param type SlaRequest $request
*
* @return type Response
*/
public function store(Sla_plan $sla, SlaRequest $request)
@@ -92,6 +94,7 @@ class SlaController extends Controller
*
* @param type int $id
* @param type Sla_plan $sla
*
* @return type Response
*/
public function edit($id)
@@ -114,6 +117,7 @@ class SlaController extends Controller
* @param type int $id
* @param type Sla_plan $sla
* @param type SlaUpdate $request
*
* @return type Response
*/
public function update($id, SlaUpdate $request)
@@ -147,6 +151,7 @@ class SlaController extends Controller
*
* @param type int $id
* @param type Sla_plan $sla
*
* @return type Response
*/
public function destroy($id)

View File

@@ -41,6 +41,7 @@ class TeamController extends Controller
*
* @param type Teams $team
* @param type Assign_team_agent $assign_team_agent
*
* @return type Response
*/
public function index(Teams $team, Assign_team_agent $assign_team_agent)
@@ -61,6 +62,7 @@ class TeamController extends Controller
* Show the form for creating a new resource.
*
* @param type User $user
*
* @return type Response
*/
public function create(User $user)
@@ -79,6 +81,7 @@ class TeamController extends Controller
*
* @param type Teams $team
* @param type TeamRequest $request
*
* @return type Response
*/
public function store(Teams $team, TeamRequest $request)
@@ -115,6 +118,7 @@ class TeamController extends Controller
* @param type User $user
* @param type Assign_team_agent $assign_team_agent
* @param type Teams $team
*
* @return type Response
*/
public function show($id, User $user, Assign_team_agent $assign_team_agent, Teams $team)
@@ -200,6 +204,7 @@ class TeamController extends Controller
* @param type User $user
* @param type Assign_team_agent $assign_team_agent
* @param type Teams $team
*
* @return type Response
*/
public function edit($id, User $user, Assign_team_agent $assign_team_agent, Teams $team)
@@ -227,6 +232,7 @@ class TeamController extends Controller
* @param type int $id
* @param type Teams $team
* @param type TeamUpdate $request
*
* @return type Response
*/
public function update($id, Teams $team, TeamUpdate $request)
@@ -262,6 +268,7 @@ class TeamController extends Controller
* @param type int $id
* @param type Teams $team
* @param type Assign_team_agent $assign_team_agent
*
* @return type Response
*/
public function destroy($id, Teams $team, Assign_team_agent $assign_team_agent)

View File

@@ -41,6 +41,7 @@ class TemplateController extends Controller
* Display a listing of the resource.
*
* @param type Template $template
*
* @return type Response
*/
public function index(Template $template)
@@ -59,6 +60,7 @@ class TemplateController extends Controller
*
* @param type Languages $language
* @param type Template $template
*
* @return type Response
*/
public function create(Languages $language, Template $template)
@@ -78,6 +80,7 @@ class TemplateController extends Controller
*
* @param type Template $template
* @param type TemplateRequest $request
*
* @return type Response
*/
public function store(Template $template, TemplateRequest $request)
@@ -101,6 +104,7 @@ class TemplateController extends Controller
* Display the specified resource.
*
* @param int $id
*
* @return Response
*/
public function show($id)
@@ -114,6 +118,7 @@ class TemplateController extends Controller
* @param type $id
* @param type Template $template
* @param type Languages $language
*
* @return type Response
*/
public function listdirectories()
@@ -159,7 +164,7 @@ class TemplateController extends Controller
// }
// Move all images files
if (! file_exists($filename)) {
if (!file_exists($filename)) {
mkdir($filename, 0777);
}
$files = array_filter(scandir($directory.'default'));
@@ -168,7 +173,7 @@ class TemplateController extends Controller
if ($file === '.' or $file === '..') {
continue;
}
if (! is_dir($file)) {
if (!is_dir($file)) {
// $file_to_go = str_replace("code/resources/views/emails/",'code/resources/views/emails/'.$fname,$file);
$destination = $directory.$fname.'/';
@@ -237,6 +242,7 @@ class TemplateController extends Controller
* @param type int $id
* @param type Template $template
* @param type TemplateUdate $request
*
* @return type Response
*/
public function update($id, Template $template, TemplateUdate $request)
@@ -263,6 +269,7 @@ class TemplateController extends Controller
*
* @param type int $id
* @param type Template $template
*
* @return type Response
*/
public function destroy($id, Template $template)
@@ -287,6 +294,7 @@ class TemplateController extends Controller
* Form for Email connection checking.
*
* @param type Emails $email
*
* @return type Response
*/
public function formDiagno(Emails $email)
@@ -304,6 +312,7 @@ class TemplateController extends Controller
* function to send emails.
*
* @param type Request $request
*
* @return type
*/
public function postDiagno(DiagnosRequest $request)
@@ -314,7 +323,7 @@ class TemplateController extends Controller
$msg = $request->input('message');
$from = $request->input('from');
$from_address = Emails::where('id', '=', $from)->first();
if (! $from_address) {
if (!$from_address) {
throw new Exception('Sorry! We can not find your request');
}
$to_address = [

View File

@@ -22,6 +22,7 @@ class ThreadController extends Controller
*
* @param type Ticket_thread $thread
* @param type Priority $priority
*
* @return type Response
*/
public function getTickets(Ticket_Thread $thread, Priority $priority)

View File

@@ -101,7 +101,7 @@ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\n";
{
//dd(public_path('.htaccess'),base_path('.htaccess'));
$file = public_path('.htaccess');
if (! \File::exists($file)) {
if (!\File::exists($file)) {
$file = base_path('/../.htaccess');
}
$this->deleteCustom();
@@ -113,7 +113,7 @@ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\n";
public function deleteCustom()
{
$file = public_path('.htaccess');
if (! \File::exists($file)) {
if (!\File::exists($file)) {
$file = base_path('/../.htaccess');
}
$content = file_get_contents($file);

View File

@@ -161,6 +161,7 @@ class WorkflowController extends Controller
* Store a new workflow in to the system.
*
* @param \App\Http\Requests\helpdesk\WorkflowCreateRequest $request
*
* @return type view
*/
public function store(WorkflowCreateRequest $request)
@@ -206,6 +207,7 @@ class WorkflowController extends Controller
*
* @param type $id
* @param User $ban
*
* @return type Response
*/
public function edit($id, WorkflowName $work_flow_name, Emails $emails, WorkflowRules $workflow_rule, WorkflowAction $workflow_action)
@@ -227,6 +229,7 @@ class WorkflowController extends Controller
*
* @param type $id
* @param \App\Http\Requests\helpdesk\WorkflowUpdateRequest $request
*
* @return type view
*/
public function update($id, WorkflowUpdateRequest $request)
@@ -294,6 +297,7 @@ class WorkflowController extends Controller
*
* @param type $id
* @param \Illuminate\Http\Request $request
*
* @return type void
*/
public function selectAction($id, Request $request)

View File

@@ -73,6 +73,7 @@ class CannedController extends Controller
*
* @param type CannedRequest $request
* @param type Canned $canned
*
* @return type Redirect
*/
public function store(CannedRequest $request, Canned $canned)
@@ -96,6 +97,7 @@ class CannedController extends Controller
*
* @param type $id
* @param type Canned $canned
*
* @return type View
*/
public function edit($id, Canned $canned)
@@ -116,6 +118,7 @@ class CannedController extends Controller
* @param type $id
* @param type CannedUpdateRequest $request
* @param type Canned $canned
*
* @return type Redirect
*/
public function update($id, CannedUpdateRequest $request, Canned $canned)
@@ -141,6 +144,7 @@ class CannedController extends Controller
*
* @param type $id
* @param type Canned $canned
*
* @return type Redirect
*/
public function destroy($id, Canned $canned)
@@ -163,6 +167,7 @@ class CannedController extends Controller
* Fetch Canned Response in the ticket detail page.
*
* @param type $id
*
* @return type json
*/
public function get_canned($id)

View File

@@ -39,6 +39,7 @@ class FilterController extends Controller
* @category constructor function
*
* @param Array/Object $request
*
* @return null
*/
public function __construct(Request $req)
@@ -52,6 +53,7 @@ class FilterController extends Controller
* @category function to handle ticket table/filteration request and build tables
*
* @param Array/Object $request
*
* @return json response //build by getTable() function in TicketController
*/
public function getFilter(Request $request)
@@ -141,6 +143,7 @@ class FilterController extends Controller
* @category function to check of all the parameters passed to the URL are correct or not
*
* @param array $inputs
*
* @return bool true/false
*/
public function checkRequestIsCorrect($table, $inputs)
@@ -171,7 +174,7 @@ class FilterController extends Controller
}
ksort($inputs);
foreach ($inputs as $key => $input) {
if (! in_array($key, $available_options)) {
if (!in_array($key, $available_options)) {
// dd('here '.$key);
$table = $table->where('tickets.id', '=', null);
} else {
@@ -186,6 +189,7 @@ class FilterController extends Controller
* @category function to filter tickets based on user input requests
*
* @param string $input, $value, $table
*
* @return builder $table
*/
public function filterByInputs($input, $value, $table, $is_mytickets)
@@ -355,6 +359,7 @@ class FilterController extends Controller
* @category function to filter the tickets based on show value in the request
*
* @param array $value(), builder object $table
*
* @return builder object $table
*/
public function showPage($value, $table)
@@ -923,6 +928,7 @@ class FilterController extends Controller
* @category function to get array of status to filter tickets
*
* @param string $status
*
* @return array $status_array
*/
// public function getStatusArray($status)
@@ -968,6 +974,7 @@ class FilterController extends Controller
* @category function to filter table builder based on requested status
*
* @param string array $status_array, builder $table
*
* @return builder $table
*/
public function filterByStatus($status_array, $table)
@@ -984,6 +991,7 @@ class FilterController extends Controller
* @category function to format and return user tickets
*
* @param string $segment
*
* @return builder
*/
public function formatUserTickets($segment)
@@ -1029,6 +1037,7 @@ class FilterController extends Controller
* @category function to filter results on basis of last replier
*
* @param string array $value, builder $ticket
*
* @return builder
*/
public function filterByLastResponder($value, $tickets)
@@ -1067,6 +1076,7 @@ class FilterController extends Controller
* @category function to apply help topic filter
*
* @param array $value, object $table
*
* @return builder
*/
public function filterByHelpTopic($value, $table)
@@ -1082,6 +1092,7 @@ class FilterController extends Controller
*
* @param bool $has_status(if request has status filter values or not),
* Object $table, string $status(basic pupose if status)
*
* @return object $table;
*/
public function returnShowPageWithStatus($has_status, $table, $status)

View File

@@ -316,6 +316,7 @@ class FilterControllerOld extends Controller
*@category function to format and return user tickets
*
*@param string $segment
*
*@return builder
*/
public function formatUserTickets($segment)

View File

@@ -18,6 +18,7 @@ class ImapMail extends Mailbox
* For example, to match all unanswered mails sent by Mom, you'd use: "UNANSWERED FROM mom".
*
* @param string $criteria See http://php.net/imap_search for a complete list of available criteria
*
* @return array mailsIds (or empty array)
*/
public function searchMailbox($criteria = 'ALL')

View File

@@ -60,6 +60,7 @@ class MailController extends Controller
* separate reply.
*
* @param type $body
*
* @return type string
*/
public function separate_reply($body)
@@ -72,12 +73,13 @@ class MailController extends Controller
/**
* @param object $email
*
* @return int
*/
public function priority($email)
{
$priority = $email->priority;
if (! $priority) {
if (!$priority) {
$priority = $this->ticketController()->getSystemDefaultPriority();
}
@@ -88,12 +90,13 @@ class MailController extends Controller
* get department.
*
* @param object $email
*
* @return int
*/
public function department($email)
{
$department = $email->department;
if (! $department) {
if (!$department) {
$department = $this->ticketController()->getSystemDefaultDepartment();
}
@@ -104,13 +107,14 @@ class MailController extends Controller
* get help topic.
*
* @param object $email
*
* @return int
*/
public function helptopic($email)
{
//dd($email);
$helptopic = $email->help_topic;
if (! $helptopic) {
if (!$helptopic) {
$helptopic = $this->ticketController()->getSystemDefaultHelpTopic();
}
@@ -121,6 +125,7 @@ class MailController extends Controller
* get sla.
*
* @param object $email
*
* @return int
*/
public function sla($email)
@@ -130,7 +135,7 @@ class MailController extends Controller
if ($help) {
$sla = $help->sla_plan;
}
if (! $sla) {
if (!$sla) {
$sla = $this->ticketController()->getSystemDefaultSla();
}
@@ -186,17 +191,17 @@ class MailController extends Controller
public function getMessageContent($message, $email)
{
$body = $message->getMessageBody(true);
if (! $body) {
if (!$body) {
$body = $message->getMessageBody();
}
$body = $this->separateReply($body);
$subject = $message->getSubject();
$address = $message->getAddresses('reply-to');
if (! $address) {
if (!$address) {
$address = $message->getAddresses('from');
}
$collaborators = $this->collaburators($message, $email);
$attachments = (! $message->getAttachments()) ? [] : $message->getAttachments();
$attachments = (!$message->getAttachments()) ? [] : $message->getAttachments();
//dd(['body' => $body, 'subject' => $subject, 'address' => $address, 'cc' => $collaborator, 'attachments' => $attachments]);
$this->workflow($address, $subject, $body, $collaborators, $attachments, $email);
}
@@ -343,6 +348,7 @@ class MailController extends Controller
* function to load data.
*
* @param type $id
*
* @return type file
*/
public function get_data($id)
@@ -367,6 +373,7 @@ class MailController extends Controller
* separate reply.
*
* @param type $body
*
* @return type string
*/
public function separateReply($body)

View File

@@ -71,6 +71,7 @@ class NotificationController extends Controller
* Admin Notification/Report.
*
* @param company
*
* @return mail
* */
public function send_notification_to_admin($company)

View File

@@ -49,6 +49,7 @@ class OrganizationController extends Controller
* Display a listing of the resource.
*
* @param type Organization $org
*
* @return type Response
*/
public function index()
@@ -143,6 +144,7 @@ class OrganizationController extends Controller
*
* @param type Organization $org
* @param type OrganizationRequest $request
*
* @return type Redirect
*/
public function store(Organization $org, OrganizationRequest $request)
@@ -168,6 +170,7 @@ class OrganizationController extends Controller
*
* @param type $id
* @param type Organization $org
*
* @return type view
*/
public function show($id, Organization $org)
@@ -187,6 +190,7 @@ class OrganizationController extends Controller
*
* @param type $id
* @param type Organization $org
*
* @return type view
*/
public function edit($id, Organization $org)
@@ -207,6 +211,7 @@ class OrganizationController extends Controller
* @param type $id
* @param type Organization $org
* @param type OrganizationUpdate $request
*
* @return type Redirect
*/
public function update($id, Organization $org, OrganizationUpdate $request)
@@ -234,6 +239,7 @@ class OrganizationController extends Controller
* Delete a specified organization from storage.
*
* @param type int $id
*
* @return type Redirect
*/
public function destroy($id, Organization $org, User_org $user_org)
@@ -260,6 +266,7 @@ class OrganizationController extends Controller
* Soring an organization head.
*
* @param type $id
*
* @return type boolean
*/
public function Head_Org($id)
@@ -281,6 +288,7 @@ class OrganizationController extends Controller
* @param type $id
* @param type $date111
* @param type $date122
*
* @return type array
*/
public function orgChartData($id, $date111 = '', $date122 = '')

View File

@@ -93,6 +93,7 @@ class TicketController extends Controller
* Save the data of new ticket and show the New ticket page with result.
*
* @param type CreateTicketRequest $request
*
* @return type response
*/
public function post_newticket(CreateTicketRequest $request, CountryCode $code, $api = false)
@@ -144,7 +145,7 @@ class TicketController extends Controller
return Redirect()->back()->with($data)->withInput($request->except('password'));
} else {
$code = CountryCode::select('phonecode')->where('phonecode', '=', $phonecode)->get();
if (! count($code)) {
if (!count($code)) {
$data = [
'fails' => Lang::get('lang.incorrect-country-code-error'),
'phonecode' => $geoipcode->phonecode,
@@ -197,6 +198,7 @@ class TicketController extends Controller
* Shows the ticket thread details.
*
* @param type $id
*
* @return type response
*/
public function thread($id)
@@ -241,7 +243,7 @@ class TicketController extends Controller
{
$size = 0;
$files = Input::file('attachment');
if (! $files) {
if (!$files) {
return $size;
}
if (count($files) > 0) {
@@ -271,6 +273,7 @@ class TicketController extends Controller
*
* @param type Ticket_Thread $thread
* @param type TicketRequest $request
*
* @return type bool
*/
public function reply(Ticket_Thread $thread, Request $request, Ticket_attachments $ta, $mail = true, $system_reply = true, $user_id = '')
@@ -374,7 +377,7 @@ class TicketController extends Controller
$ticket_number = $tickets->ticket_number;
$company = $this->company();
$username = $ticket_user->first_name;
if (! empty(Auth::user()->agent_sign)) {
if (!empty(Auth::user()->agent_sign)) {
$agentsign = Auth::user()->agent_sign;
} else {
$agentsign = null;
@@ -392,7 +395,7 @@ class TicketController extends Controller
'u_id' => $u_id,
'body' => $request->input('reply_content'),
];
if (! $request->has('do-not-send')) {
if (!$request->has('do-not-send')) {
event('Reply-Ticket', [$data]);
}
// sending attachments via php mail function
@@ -401,7 +404,7 @@ class TicketController extends Controller
$line = '---Reply above this line---<br><br>';
$collaborators = Ticket_Collaborator::where('ticket_id', '=', $ticket_id)->get();
$emails = Emails::where('department', '=', $tickets->dept_id)->first();
if (! $email) {
if (!$email) {
$mail = false;
}
@@ -441,6 +444,7 @@ class TicketController extends Controller
*
* @param type $ticket_id
* @param type Ticket_Thread $thread
*
* @return type bool
*/
public function ticketEditPost($ticket_id, Ticket_Thread $thread, Tickets $ticket)
@@ -477,6 +481,7 @@ class TicketController extends Controller
* Print Ticket Details.
*
* @param type $id
*
* @return type respponse
*/
public function ticket_print($id)
@@ -506,6 +511,7 @@ class TicketController extends Controller
* Generates Ticket Number.
*
* @param type $ticket_number
*
* @return type integer
*/
public function ticketNumberold($ticket_number)
@@ -578,6 +584,7 @@ class TicketController extends Controller
* check email for dublicate entry.
*
* @param type $email
*
* @return type bool
*/
public function checkEmail($email)
@@ -594,6 +601,7 @@ class TicketController extends Controller
* @category fucntion to check if mobile number is unqique or not
*
* @param string $mobile
*
* @return bool true(if mobile exists in users table)/false (if mobile does not exist in user table)
*/
public function checkMobile($mobile)
@@ -617,6 +625,7 @@ class TicketController extends Controller
* @param type $sla
* @param type $priority
* @param type $system
*
* @return type bool
*/
public function create_user($emailadd, $username, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data, $auto_response, $status)
@@ -624,7 +633,7 @@ class TicketController extends Controller
// define global variables
$unique = $emailadd;
if (! $emailadd) {
if (!$emailadd) {
$unique = $mobile_number;
}
// check emails
@@ -898,6 +907,7 @@ class TicketController extends Controller
* @param type $helptopic
* @param type $sla
* @param type $priority
*
* @return type string
*/
public function check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data, $status)
@@ -973,6 +983,7 @@ class TicketController extends Controller
* @param type $helptopic
* @param type $sla
* @param type $priority
*
* @return type string
*/
public function createTicket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data, $status)
@@ -1042,7 +1053,7 @@ class TicketController extends Controller
$form_name = $form->formname;
}
foreach ($form_data as $key => $form_details) {
if (! is_array($form_details)) {
if (!is_array($form_details)) {
$form_value = new Ticket_Form_Data();
$form_value->ticket_id = $id;
$form_value->title = $key;
@@ -1067,6 +1078,7 @@ class TicketController extends Controller
* @param type $body
* @param type $id
* @param type $user_id
*
* @return type
*/
public function ticketThread($subject, $body, $id, $user_id)
@@ -1088,6 +1100,7 @@ class TicketController extends Controller
* Generate a random string for password.
*
* @param type $length
*
* @return type string
*/
public function generateRandomString($length = 10)
@@ -1107,6 +1120,7 @@ class TicketController extends Controller
*
* @param type $id
* @param type Tickets $ticket
*
* @return type string
*/
public function close($id, Tickets $ticket)
@@ -1170,6 +1184,7 @@ class TicketController extends Controller
*
* @param type $id
* @param type Tickets $ticket
*
* @return type string
*/
public function resolve($id, Tickets $ticket)
@@ -1215,6 +1230,7 @@ class TicketController extends Controller
*
* @param type $id
* @param type Tickets $ticket
*
* @return type
*/
public function open($id, Tickets $ticket)
@@ -1254,6 +1270,7 @@ class TicketController extends Controller
*
* @param type $id
* @param type Tickets $ticket
*
* @return type string
*/
public function delete($id, Tickets $ticket)
@@ -1306,6 +1323,7 @@ class TicketController extends Controller
*
* @param type $id
* @param type Tickets $ticket
*
* @return type string
*/
public function ban($id, Tickets $ticket)
@@ -1324,6 +1342,7 @@ class TicketController extends Controller
* function to assign ticket.
*
* @param type $id
*
* @return type bool
*/
public function assign($id)
@@ -1396,6 +1415,7 @@ class TicketController extends Controller
* Function to post internal note.
*
* @param type $id
*
* @return type bool
*/
public function InternalNote($id)
@@ -1424,6 +1444,7 @@ class TicketController extends Controller
* Function to surrender a ticket.
*
* @param type $id
*
* @return type bool
*/
public function surrender($id)
@@ -1450,6 +1471,7 @@ class TicketController extends Controller
* Search.
*
* @param type $keyword
*
* @return type array
*/
public function search($keyword)
@@ -1467,6 +1489,7 @@ class TicketController extends Controller
* Search.
*
* @param type $keyword
*
* @return type array
*/
public function stores($ticket_number)
@@ -1486,6 +1509,7 @@ class TicketController extends Controller
* store_collaborators.
*
* @param type $headers
*
* @return type
*/
public function storeCollaborators($headers, $id)
@@ -1568,6 +1592,7 @@ class TicketController extends Controller
* cleanMe.
*
* @param type $input
*
* @return type
*/
public function cleanMe($input)
@@ -1584,6 +1609,7 @@ class TicketController extends Controller
* autosearch.
*
* @param type Image $image
*
* @return type json
*/
public function autosearch($id)
@@ -1597,6 +1623,7 @@ class TicketController extends Controller
* autosearch2.
*
* @param type Image $image
*
* @return type json
*/
public function autosearch2(User $user)
@@ -1609,6 +1636,7 @@ class TicketController extends Controller
* autosearch.
*
* @param type Image $image
*
* @return type json
*/
public function usersearch()
@@ -1625,7 +1653,7 @@ class TicketController extends Controller
.'</div>';
}
$ticket_collaborator = Ticket_Collaborator::where('ticket_id', '=', $ticket_id)->where('user_id', '=', $data->id)->first();
if (! isset($ticket_collaborator)) {
if (!isset($ticket_collaborator)) {
$ticket_collaborator = new Ticket_Collaborator();
$ticket_collaborator->isactive = 1;
$ticket_collaborator->ticket_id = $ticket_id;
@@ -1643,6 +1671,7 @@ class TicketController extends Controller
* useradd.
*
* @param type Image $image
*
* @return type json
*/
public function useradd()
@@ -1779,6 +1808,7 @@ class TicketController extends Controller
* user time zone.
*
* @param type $utc
*
* @return type date
*/
public static function usertimezone($utc)
@@ -1827,6 +1857,7 @@ class TicketController extends Controller
* lock.
*
* @param type $id
*
* @return type null
*/
public function lock($id)
@@ -1969,6 +2000,7 @@ class TicketController extends Controller
* function to check and lock ticket.
*
* @param int $id
*
* @return int
*/
public function checkLock($id)
@@ -2020,6 +2052,7 @@ class TicketController extends Controller
* function to Change owner.
*
* @param type $id
*
* @return type bool
*/
public function changeOwner($id)
@@ -2084,6 +2117,7 @@ class TicketController extends Controller
* useradd.
*
* @param type Image $image
*
* @return type json
*/
public function changeOwnerAdd($email, $name, $ticket_id)
@@ -2216,12 +2250,12 @@ class TicketController extends Controller
->update(['status' => 3]);
//event has $p_id and $value
event('ticket.merge', [['parent' => $p_id, 'child' => $value]]);
if (! empty(Input::get('reason'))) {
if (!empty(Input::get('reason'))) {
$reason = Input::get('reason');
} else {
$reason = Lang::get('lang.no-reason');
}
if (! empty(Input::get('title'))) {
if (!empty(Input::get('title'))) {
Ticket_Thread::where('ticket_id', '=', $p_id)->first()
->update(['title' => Input::get('title')]);
}
@@ -2271,6 +2305,7 @@ class TicketController extends Controller
*@category function to call and show ticket details in tool tip via ajax
*
*@param null
*
*@return string //script to load tooltip data
*/
public static function tooltip($ticketid)
@@ -2358,6 +2393,7 @@ class TicketController extends Controller
* @category function to chech if user verifcaition required for creating tickets or not
*
* @param null
*
* @return int 0/1
*/
public function checkUserVerificationStatus()
@@ -2391,7 +2427,7 @@ class TicketController extends Controller
->where('ticket_thread.id', $threadid)
->first();
//dd($thread);
if (! $thread) {
if (!$thread) {
throw new Exception('Sorry we can not find your request');
}
$company = \App\Model\helpdesk\Settings\Company::where('id', '=', '1')->first();
@@ -2613,6 +2649,7 @@ class TicketController extends Controller
*@category function to send notification of ticket merging to the owners
*
*@param srting array $t_id, $p_id
*
*@return null
*/
public function sendMergeNotification($p_id, $t_id)
@@ -2674,6 +2711,7 @@ class TicketController extends Controller
* chumper's function to return data to chumper datatable.
*
* @param array-object $tickets
*
* @return array-object
*/
public static function genreateTableJson($tickets)

View File

@@ -183,6 +183,7 @@ class TicketWorkflowController extends Controller
* @param type $to_check
* @param type $condition
* @param type $statement
*
* @return type boolean
*/
public function checkRuleCondition($to_check, $condition, $statement)
@@ -213,6 +214,7 @@ class TicketWorkflowController extends Controller
*
* @param type $statement
* @param type $to_check
*
* @return bool
*/
public function checkEqual($statement, $to_check)
@@ -229,6 +231,7 @@ class TicketWorkflowController extends Controller
*
* @param type $statement
* @param type $to_check
*
* @return bool
*/
public function checkNotEqual($statement, $to_check)
@@ -245,6 +248,7 @@ class TicketWorkflowController extends Controller
*
* @param type $statement
* @param type $to_check
*
* @return bool
*/
public function checkContains($statement, $to_check)
@@ -261,6 +265,7 @@ class TicketWorkflowController extends Controller
*
* @param type $statement
* @param type $to_check
*
* @return bool
*/
public function checkDoNotContain($statement, $to_check)
@@ -277,6 +282,7 @@ class TicketWorkflowController extends Controller
*
* @param type $statement
* @param type $to_check
*
* @return bool
*/
public function checkStarts($statement, $to_check)
@@ -293,6 +299,7 @@ class TicketWorkflowController extends Controller
*
* @param type $statement
* @param type $to_check
*
* @return bool
*/
public function checkEnds($statement, $to_check)
@@ -320,6 +327,7 @@ class TicketWorkflowController extends Controller
*
* @param type $workflow_id
* @param type $ticket_settings_details
*
* @return type array
*/
public function applyActionCondition($workflow_id, $ticket_settings_details)
@@ -352,6 +360,7 @@ class TicketWorkflowController extends Controller
* function to reject ticket.
*
* @param array $ticket_settings_details
*
* @return type array
*/
public function rejectTicket($ticket_settings_details)
@@ -366,6 +375,7 @@ class TicketWorkflowController extends Controller
*
* @param type $workflow_action
* @param type $ticket_settings_details
*
* @return type array
*/
public function changeDepartment($workflow_action, $ticket_settings_details)
@@ -385,6 +395,7 @@ class TicketWorkflowController extends Controller
*
* @param type $workflow_action
* @param type $ticket_settings_details
*
* @return type array
*/
public function changePriority($workflow_action, $ticket_settings_details)
@@ -404,6 +415,7 @@ class TicketWorkflowController extends Controller
*
* @param type $workflow_action
* @param type $ticket_settings_details
*
* @return type array
*/
public function changeSla($workflow_action, $ticket_settings_details)
@@ -423,6 +435,7 @@ class TicketWorkflowController extends Controller
*
* @param type $workflow_action
* @param type $ticket_settings_details
*
* @return type array
*/
public function changeTeam($workflow_action, $ticket_settings_details)
@@ -442,6 +455,7 @@ class TicketWorkflowController extends Controller
*
* @param type $workflow_action
* @param type $ticket_settings_details
*
* @return type array
*/
public function changeAgent($workflow_action, $ticket_settings_details)
@@ -461,6 +475,7 @@ class TicketWorkflowController extends Controller
*
* @param type $workflow_action
* @param type $ticket_settings_details
*
* @return type array
*/
public function changeHelptopic($workflow_action, $ticket_settings_details)
@@ -480,6 +495,7 @@ class TicketWorkflowController extends Controller
*
* @param type $workflow_action
* @param type $ticket_settings_details
*
* @return type array
*/
public function changeStatus($workflow_action, $ticket_settings_details)

View File

@@ -73,6 +73,7 @@ class UserController extends Controller
* Display all list of the users.
*
* @param type User $user
*
* @return type view
*/
public function index()
@@ -271,6 +272,7 @@ class UserController extends Controller
*
* @param type User $user
* @param type Sys_userRequest $request
*
* @return type redirect
*/
public function store(User $user, Sys_userRequest $request)
@@ -304,7 +306,7 @@ class UserController extends Controller
return redirect()->back()->with(['fails' => Lang::get('lang.country-code-required-error'), 'country_code_error' => 1])->withInput();
} else {
$code = CountryCode::select('phonecode')->where('phonecode', '=', $request->get('country_code'))->get();
if (! count($code)) {
if (!count($code)) {
return redirect()->back()->with(['fails' => Lang::get('lang.incorrect-country-code-error'), 'country_code_error' => 1])->withInput();
}
}
@@ -349,6 +351,7 @@ class UserController extends Controller
*
* @param type int $id
* @param type User $user
*
* @return type view
*/
public function randomPassword()
@@ -374,6 +377,7 @@ class UserController extends Controller
*
* @param type int $id
* @param type User $user
*
* @return type view
*/
public function randomPostPassword($id, ChangepasswordRequest $request)
@@ -399,6 +403,7 @@ class UserController extends Controller
/**
* @param type $id
* @param Request $request
*
* @return type
*/
public function changeRoleAdmin($id, Request $request)
@@ -420,6 +425,7 @@ class UserController extends Controller
/**
* @param type $id
* @param Request $request
*
* @return type
*/
public function changeRoleAgent($id, Request $request)
@@ -440,6 +446,7 @@ class UserController extends Controller
/**
* @param type $id
*
* @return type
*/
public function changeRoleUser($id)
@@ -466,6 +473,7 @@ class UserController extends Controller
/**
* @param type $id
*
* @return type
*/
public function deleteAgent($id)
@@ -601,6 +609,7 @@ class UserController extends Controller
*
* @param type int $id
* @param type User $user
*
* @return type view
*/
public function show($id)
@@ -624,6 +633,7 @@ class UserController extends Controller
*
* @param type int $id
* @param type User $user
*
* @return type Response
*/
public function edit($id, CountryCode $code)
@@ -658,6 +668,7 @@ class UserController extends Controller
* @param type int $id
* @param type User $user
* @param type Sys_userUpdate $request
*
* @return type Response
*/
public function update($id, Sys_userUpdate $request)
@@ -672,7 +683,7 @@ class UserController extends Controller
return redirect()->back()->with(['fails' => Lang::get('lang.country-code-required-error'), 'country_code_error' => 1])->withInput();
} else {
$code = CountryCode::select('phonecode')->where('phonecode', '=', $request->get('country_code'))->get();
if (! count($code)) {
if (!count($code)) {
return redirect()->back()->with(['fails' => Lang::get('lang.incorrect-country-code-error'), 'country_code_error' => 1])->withInput();
} else {
$users->country_code = $request->country_code;
@@ -737,6 +748,7 @@ class UserController extends Controller
*
* @param type int $id
* @param type ProfileRequest $request
*
* @return type Redirect
*/
public function postProfileedit(ProfileRequest $request)
@@ -748,7 +760,7 @@ class UserController extends Controller
return redirect()->back()->with(['fails' => Lang::get('lang.country-code-required-error'), 'country_code_error' => 1])->withInput();
} else {
$code = CountryCode::select('phonecode')->where('phonecode', '=', $request->get('country_code'))->get();
if (! count($code)) {
if (!count($code)) {
return redirect()->back()->with(['fails' => Lang::get('lang.incorrect-country-code-error'), 'country_code_error' => 1])->withInput();
}
$user->country_code = $request->country_code;
@@ -790,6 +802,7 @@ class UserController extends Controller
*
* @param type int $id
* @param type ProfilePassword $request
*
* @return type Redirect
*/
public function postProfilePassword($id, ProfilePassword $request)
@@ -816,6 +829,7 @@ class UserController extends Controller
* Assigning an user to an organization.
*
* @param type $id
*
* @return type boolean
*/
public function UserAssignOrg($id)
@@ -883,6 +897,7 @@ class UserController extends Controller
* creating an organization in user profile page via modal popup.
*
* @param type $id
*
* @return type
*/
public function User_Create_Org($id)
@@ -926,6 +941,7 @@ class UserController extends Controller
* Generate a random string for password.
*
* @param type $length
*
* @return string
*/
public function generateRandomString($length = 10)
@@ -1029,7 +1045,7 @@ class UserController extends Controller
->first();
if ($otp != null) {
$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'));
$date1 = date_format($otp->updated_at, 'Y-m-d h:i:sa');
$date2 = date('Y-m-d h:i:sa');

View File

@@ -129,6 +129,7 @@ class ArticleController extends Controller
* Creating a Article.
*
* @param type Category $category
*
* @return type view
*/
public function create(Category $category)
@@ -148,6 +149,7 @@ class ArticleController extends Controller
*
* @param type Article $article
* @param type ArticleRequest $request
*
* @return type redirect
*/
public function store(Article $article, ArticleRequest $request)
@@ -184,6 +186,7 @@ class ArticleController extends Controller
* @param type Article $article
* @param type Relationship $relation
* @param type Category $category
*
* @return view
*/
public function edit($slug)
@@ -215,6 +218,7 @@ class ArticleController extends Controller
* @param type Article $article
* @param type Relationship $relation
* @param type ArticleRequest $request
*
* @return Response
*/
public function update($slug, ArticleUpdate $request)
@@ -258,6 +262,7 @@ class ArticleController extends Controller
*
* @param type $id
* @param type Article $article
*
* @return Response
*/
public function destroy($slug, Article $article, Relationship $relation, Comment $comment)
@@ -292,6 +297,7 @@ class ArticleController extends Controller
* fetching timezone.
*
* @param type $utc
*
* @return type
*/
public static function usertimezone($utc)

View File

@@ -48,6 +48,7 @@ class CategoryController extends Controller
* Indexing all Category.
*
* @param type Category $category
*
* @return Response
*/
public function index()
@@ -115,6 +116,7 @@ class CategoryController extends Controller
* Create a Category.
*
* @param type Category $category
*
* @return type view
*/
public function create(Category $category)
@@ -135,6 +137,7 @@ class CategoryController extends Controller
*
* @param type Category $category
* @param type CategoryRequest $request
*
* @return type Redirect
*/
public function store(Category $category, CategoryRequest $request)
@@ -158,6 +161,7 @@ class CategoryController extends Controller
*
* @param type $slug
* @param type Category $category
*
* @return type view
*/
public function edit($id)
@@ -175,6 +179,7 @@ class CategoryController extends Controller
* @param type $slug
* @param type Category $category
* @param type CategoryUpdate $request
*
* @return type redirect
*/
public function update($id, CategoryRequest $request)
@@ -203,6 +208,7 @@ class CategoryController extends Controller
* @param type $id
* @param type Category $category
* @param type Relationship $relation
*
* @return type Redirect
*/
public function destroy($id, Category $category, Relationship $relation)

View File

@@ -122,6 +122,7 @@ class PageController extends Controller
* To insert a value to the table Page.
*
* @param type Request $request
*
* @return type
*/
public function store(PageRequest $request)
@@ -143,6 +144,7 @@ class PageController extends Controller
* To edit a page.
*
* @param type $slug
*
* @return type view
*/
public function edit($slug)
@@ -161,6 +163,7 @@ class PageController extends Controller
*
* @param type $slug
* @param type PageUpdate $request
*
* @return type redirect
*/
public function update($slug, PageRequest $request)
@@ -185,6 +188,7 @@ class PageController extends Controller
* To Delete a Page.
*
* @param type $id
*
* @return type redirect
*/
public function destroy($id)

View File

@@ -64,6 +64,7 @@ class SettingsController extends Controller
* Update the specified resource in storage.
*
* @param int $id
*
* @return Response
*/
public function postSettings($id, Settings $settings, SettingsRequests $request)
@@ -117,6 +118,7 @@ class SettingsController extends Controller
* To Moderate the commenting.
*
* @param type Comment $comment
*
* @return Response
*/
public function comment(Comment $comment)
@@ -167,6 +169,7 @@ class SettingsController extends Controller
*
* @param type $id
* @param type Comment $comment
*
* @return bool
*/
public function publish($id, Comment $comment)
@@ -185,6 +188,7 @@ class SettingsController extends Controller
*
* @param type $id
* @param type Comment $comment
*
* @return type
*/
public function delete($id, Comment $comment)

View File

@@ -59,6 +59,7 @@ class AuthController extends Controller
*
* @param \Illuminate\Contracts\Auth\Guard $auth
* @param \Illuminate\Contracts\Auth\Registrar $registrar
*
* @return void
*/
public function __construct()
@@ -94,7 +95,7 @@ class AuthController extends Controller
if ($user->nickname) {
$username = $user->nickname;
}
if (! $first_name) {
if (!$first_name) {
$first_name = $username;
}
$data = [
@@ -105,10 +106,10 @@ class AuthController extends Controller
'active' => 1,
];
$user = User::where('email', $data['email'])->first();
if (! $user) {
if (!$user) {
$user = User::where('user_name', $data['user_name'])->first();
}
if (! $user) {
if (!$user) {
$user = User::firstOrCreate($data);
}
Auth::login($user);
@@ -148,6 +149,7 @@ class AuthController extends Controller
*
* @param type User $user
* @param type RegisterRequest $request
*
* @return type Response
*/
public function postRegister(User $user, RegisterRequest $request, $api = false)
@@ -164,12 +166,12 @@ class AuthController extends Controller
} else {
$user->email = $request->input('email');
}
if (! checkArray('mobile', $request_array)) {
if (!checkArray('mobile', $request_array)) {
$user->mobile = null;
} else {
$user->mobile = $request->input('mobile');
}
if (! checkArray('code', $request_array)) {
if (!checkArray('code', $request_array)) {
$user->country_code = 0;
} else {
$user->country_code = $request->input('code');
@@ -226,6 +228,7 @@ class AuthController extends Controller
* Function to activate account.
*
* @param type $token
*
* @return type redirect
*/
public function accountActivate($token)
@@ -248,6 +251,7 @@ class AuthController extends Controller
*
* @param type $token
* @param type User $user
*
* @return type Response
*/
public function getMail($token, User $user)
@@ -290,6 +294,7 @@ class AuthController extends Controller
* Post of login page.
*
* @param type LoginRequest $request
*
* @return type Response
*/
public function postLogin(LoginRequest $request)
@@ -316,7 +321,7 @@ class AuthController extends Controller
}
$check_active = User::where('email', '=', $request->input('email'))->orwhere('user_name', '=', $request->input('email'))->first();
if (! $check_active) { //check if user exists or not
if (!$check_active) { //check if user exists or not
//if user deos not exist then return back with error that user is not registered
return redirect()->back()
->withInput($request->only('email', 'remember'))
@@ -337,7 +342,7 @@ class AuthController extends Controller
// plugin is installed
if ($sms->status == 1 || $sms->status === '1') { //check plugin is active or not
// plugin is active
if (! $check_active->active) { //check account is active or not
if (!$check_active->active) { //check account is active or not
// account is not active show verify otp window
if ($check_active->mobile) { //check user has mobile or not
// user has mobile number return verify OTP screen
@@ -362,7 +367,7 @@ class AuthController extends Controller
}
} else {
// setting is disabled
a: if (! $check_active->active) { //check account is active or not
a: if (!$check_active->active) { //check account is active or not
// if accoutn is not active return back with error message that account is inactive
return redirect()->back()
->withInput($request->only('email', 'remember'))
@@ -430,6 +435,7 @@ class AuthController extends Controller
* Add login attempt.
*
* @param type IPaddress $value
*
* @return type Response
*/
public function addLoginAttempt($value, $field)
@@ -457,6 +463,7 @@ class AuthController extends Controller
* Clear login attempt.
*
* @param type IPaddress $value
*
* @return type Response
*/
public function clearLoginAttempts($value, $field)
@@ -470,6 +477,7 @@ class AuthController extends Controller
* Confiem IP.
*
* @param type IPaddress $value
*
* @return type Response
*/
public function confirmIPAddress($value, $field)
@@ -482,7 +490,7 @@ class AuthController extends Controller
' FROM '.$table." WHERE IP = '$value' OR User = '$field'");
$data = $result;
//Verify that at least one login attempt is in database
if (! $data) {
if (!$data) {
return 0;
}
if ($data[0]->Attempts >= $max_attempts) {
@@ -512,6 +520,7 @@ class AuthController extends Controller
* @category function to show verify OTP page
*
* @param null
*
* @return response|view
*/
public function getVerifyOTP()
@@ -527,6 +536,7 @@ class AuthController extends Controller
* @category function to verify OTP
*
* @param $request
*
* @return int|string
*/
public function verifyOTP(LoginRequest $request)
@@ -534,13 +544,13 @@ class AuthController extends Controller
$user = User::select('id', 'mobile', 'user_name')->where('email', '=', $request->input('email'))
->orWhere('user_name', '=', $request->input('email'))->first();
$otp_length = strlen($request->input('otp'));
if (! \Schema::hasTable('user_verification')) {
if (!\Schema::hasTable('user_verification')) {
$message = Lang::get('lang.opt-can-not-be-verified');
} else {
$otp = Otp::select('otp', 'updated_at')->where('user_id', '=', $user->id)
->first();
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'));
$date1 = date_format($otp->updated_at, 'Y-m-d h:i:sa');
$date2 = date('Y-m-d h:i:sa');
@@ -580,7 +590,7 @@ class AuthController extends Controller
public function resendOTP(OtpVerifyRequest $request)
{
if (! \Schema::hasTable('user_verification') || ! \Schema::hasTable('sms')) {
if (!\Schema::hasTable('user_verification') || !\Schema::hasTable('sms')) {
$message = Lang::get('lang.opt-can-not-be-verified');
return $message;
@@ -602,6 +612,7 @@ class AuthController extends Controller
* @category function to change ticket status when user verifies his account
*
* @param int $id => user_id
*
* @return null
*
* @author manish.verma@ladybirdweb.com

View File

@@ -41,6 +41,7 @@ class ForgotPasswordController extends Controller
* Send a reset link to the given user.
*
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\RedirectResponse
*/
public function sendResetLinkEmail(Request $request)

View File

@@ -96,6 +96,7 @@ class PasswordController extends Controller
* Reset the given user's password.
*
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\Response
*/
public function reset(Request $request)

View File

@@ -45,6 +45,7 @@ class RegisterController extends Controller
* Get a validator for an incoming registration request.
*
* @param array $data
*
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
@@ -60,6 +61,7 @@ class RegisterController extends Controller
* Create a new user instance after a valid registration.
*
* @param array $data
*
* @return \App\User
*/
protected function create(array $data)

View File

@@ -54,6 +54,7 @@ class UserController extends Controller
* Display a listing of the resource.
*
* @param type User $user
*
* @return type Response
*/
public function index()
@@ -156,6 +157,7 @@ class UserController extends Controller
*
* @param type User $user
* @param type Sys_userRequest $request
*
* @return type Response
*/
public function store(User $user, Sys_userRequest $request)
@@ -189,6 +191,7 @@ class UserController extends Controller
*
* @param type int $id
* @param type User $user
*
* @return type Response
*/
public function show($id, User $user)
@@ -208,6 +211,7 @@ class UserController extends Controller
*
* @param type int $id
* @param type User $user
*
* @return type Response
*/
public function edit($id, User $user)
@@ -228,6 +232,7 @@ class UserController extends Controller
* @param type int $id
* @param type User $user
* @param type Sys_userUpdate $request
*
* @return type Response
*/
public function update($id, User $user, Sys_userUpdate $request)
@@ -255,6 +260,7 @@ class UserController extends Controller
*
* @param type int $id
* @param type User $user
*
* @return type Response
*/
public function destroy($id, User $user)
@@ -281,6 +287,7 @@ class UserController extends Controller
* User Assign Org.
*
* @param type $id
*
* @return type boolean
*/
public function UserAssignOrg($id)

View File

@@ -40,6 +40,7 @@ class ClientTicketController extends Controller
*
* @param type Tickets $ticket
* @param type User $user
*
* @return type response
*/
public function getCheckTicket(Tickets $ticket, User $user)
@@ -51,6 +52,7 @@ class ClientTicketController extends Controller
* reply.
*
* @param type $value
*
* @return type view
*/
public function reply($id, Request $request)

View File

@@ -59,6 +59,7 @@ class FormController extends Controller
* getform.
*
* @param type Help_topic $topic
*
* @return type
*/
public function getForm(Help_topic $topic, CountryCode $code)
@@ -68,7 +69,7 @@ class FormController extends Controller
}
$settings = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first();
$email_mandatory = CommonSettings::select('status')->where('option_name', '=', 'email_mandatory')->first();
if (! \Auth::check() && ($settings->status == 1 || $settings->status == '1')) {
if (!\Auth::check() && ($settings->status == 1 || $settings->status == '1')) {
return redirect('auth/login')->with(['login_require' => 'Please login to your account for submitting a ticket', 'referer' => 'form']);
}
$location = GeoIP::getLocation();
@@ -95,6 +96,7 @@ class FormController extends Controller
*
* @param type Form_name $name
* @param type Form_details $details
*
* @return type string
*/
public function postForm($id, Help_topic $topic)
@@ -103,7 +105,7 @@ class FormController extends Controller
$helptopic = $topic->where('id', '=', $id)->first();
$custom_form = $helptopic->custom_form;
$values = Fields::where('forms_id', '=', $custom_form)->get();
if (! $values) {
if (!$values) {
}
if ($values) {
foreach ($values as $form_data) {
@@ -186,7 +188,7 @@ class FormController extends Controller
// $priority = $ticket_settings->first()->priority;
$default_priority = Ticket_Priority::where('is_default', '=', 1)->first();
$user_priority = CommonSettings::where('option_name', '=', 'user_priority')->first();
if (! ($request->input('priority'))) {
if (!($request->input('priority'))) {
$priority = $default_priority->priority_id;
if ($helpTopicObj->exists() && ($helpTopicObj->value('status') == 1)) {
$priority = $helpTopicObj->value('priority');
@@ -216,7 +218,7 @@ class FormController extends Controller
return Redirect::back()->with($data)->withInput($request->except('password'));
} else {
$code = CountryCode::select('phonecode')->where('phonecode', '=', $phonecode)->get();
if (! count($code)) {
if (!count($code)) {
$data = [
'fails' => Lang::get('lang.incorrect-country-code-error'),
'phonecode' => $geoipcode->phonecode,
@@ -262,13 +264,14 @@ class FormController extends Controller
* reply.
*
* @param type $value
*
* @return type view
*/
public function post_ticket_reply($id, Request $request)
{
try {
$comment = $request->input('comment');
if (! empty($comment)) {
if (!empty($comment)) {
$tickets = Tickets::where('id', '=', $id)->first();
$thread = Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
@@ -312,7 +315,7 @@ class FormController extends Controller
$helptopic_id = $request->input('helptopic');
$helptopics = new Help_topic();
$helptopic = $helptopics->find($helptopic_id);
if (! $helptopic) {
if (!$helptopic) {
throw new Exception('We can not find your request');
}
$custom_form = $helptopic->custom_form;

View File

@@ -75,6 +75,7 @@ class GuestController extends Controller
*
* @param type $id
* @param type ProfileRequest $request
*
* @return type Response
*/
public function postProfile(ProfileRequest $request)
@@ -86,7 +87,7 @@ class GuestController extends Controller
return redirect()->back()->with(['fails' => Lang::get('lang.country-code-required-error'), 'country_code_error' => 1])->withInput();
} else {
$code = CountryCode::select('phonecode')->where('phonecode', '=', $request->get('country_code'))->get();
if (! count($code)) {
if (!count($code)) {
return redirect()->back()->with(['fails' => Lang::get('lang.incorrect-country-code-error'), 'country_code_error' => 1])->withInput();
}
$user->country_code = $request->country_code;
@@ -125,6 +126,7 @@ class GuestController extends Controller
*@category fucntion to check if mobile number is unqique or not
*
*@param string $mobile
*
*@return bool true(if mobile exists in users table)/false (if mobile does not exist in user table)
*/
public function checkMobile($mobile)
@@ -145,6 +147,7 @@ class GuestController extends Controller
* Get Ticket page.
*
* @param type Help_topic $topic
*
* @return type Response
*/
public function getTicket(Help_topic $topic)
@@ -158,6 +161,7 @@ class GuestController extends Controller
* getform.
*
* @param type Help_topic $topic
*
* @return type
*/
public function getForm(Help_topic $topic)
@@ -180,6 +184,7 @@ class GuestController extends Controller
* @param type Tickets $tickets
* @param type Ticket_Thread $thread
* @param type User $user
*
* @return type Response
*/
public function getMyticket()
@@ -193,6 +198,7 @@ class GuestController extends Controller
* @param type Ticket_Thread $thread
* @param type Tickets $tickets
* @param type User $user
*
* @return type Response
*/
public function thread(Ticket_Thread $thread, Tickets $tickets, User $user)
@@ -222,6 +228,7 @@ class GuestController extends Controller
*
* @param type $id
* @param type ProfilePassword $request
*
* @return type Response
*/
public function postProfilePassword(ProfilePassword $request)
@@ -248,6 +255,7 @@ class GuestController extends Controller
*
* @param type Ticket_Thread $thread
* @param type TicketRequest $request
*
* @return type Response
*/
public function reply(Ticket_Thread $thread, TicketRequest $request)
@@ -270,6 +278,7 @@ class GuestController extends Controller
*
* @param type Tickets $ticket
* @param type User $user
*
* @return type response
*/
public function getCheckTicket(Tickets $ticket, User $user)
@@ -284,6 +293,7 @@ class GuestController extends Controller
* @param type User $user
* @param type Tickets $ticket
* @param type Ticket_Thread $thread
*
* @return type Response
*/
public function PostCheckTicket(Request $request)
@@ -336,6 +346,7 @@ class GuestController extends Controller
* get ticket email.
*
* @param type $id
*
* @return type
*/
public function get_ticket_email($id, CommonSettings $common_settings)
@@ -351,6 +362,7 @@ class GuestController extends Controller
* get ticket status.
*
* @param type Tickets $ticket
*
* @return type
*/
public function getTicketStat(Tickets $ticket)
@@ -397,7 +409,7 @@ class GuestController extends Controller
->first();
if ($otp != null) {
$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'));
$date1 = date_format($otp->updated_at, 'Y-m-d h:i:sa');
$date2 = date('Y-m-d h:i:sa');
@@ -537,7 +549,7 @@ class GuestController extends Controller
public function changeEmail($email)
{
$user = \Auth::user();
if ($user && $email && ! $user->email) {
if ($user && $email && !$user->email) {
$user->email = $email;
$user->save();
}

View File

@@ -46,6 +46,7 @@ class UnAuthController extends Controller
* @param type User $user
* @param type Tickets $ticket
* @param type Ticket_Thread $thread
*
* @return type Response
*/
public function PostCheckTicket(Request $request)
@@ -119,6 +120,7 @@ class UnAuthController extends Controller
* generate random string token for ticket.
*
* @param type $length
*
* @return string
*/
public function generate_random_ticket_token($length = 10)
@@ -138,6 +140,7 @@ class UnAuthController extends Controller
*
* @param type $ticket_id
* @param type $token
*
* @return type view
*/
public function showTicketCode($ticket_id, $token)
@@ -236,6 +239,7 @@ class UnAuthController extends Controller
*
* @param type $status
* @param type $id
*
* @return string
*/
public function changeStatus($status, $id)
@@ -323,6 +327,7 @@ class UnAuthController extends Controller
*@category function to change system's language
*
*@param string $lang //desired language's iso code
*
*@return response
*/
public static function changeLanguage($lang)

View File

@@ -31,13 +31,14 @@ class UserController extends Controller
/**
* @param
*
* @return response
*/
public function getArticle(Article $article, Category $category, Settings $settings)
{
$setting = $settings->first();
$pagination = $setting->pagination;
if (! Auth::check() || \Auth::user()->role == 'user') {
if (!Auth::check() || \Auth::user()->role == 'user') {
$article = $article->where('status', '1');
}
$article = $article->where('type', '1');
@@ -56,6 +57,7 @@ class UserController extends Controller
* @param string $str String to get an excerpt from
* @param int $startPos Position int string to start excerpt from
* @param int $maxLength Maximum length the excerpt may be
*
* @return string excerpt
*/
public static function getExcerpt($str, $startPos = 0, $maxLength = 50)
@@ -79,6 +81,7 @@ class UserController extends Controller
* @param \App\Model\kb\Category $category
* @param \App\Model\kb\Article $article
* @param \App\Model\kb\Settings $settings
*
* @return type view
*/
public function search(SearchRequest $request, Category $category, Article $article, Settings $settings)
@@ -110,7 +113,7 @@ class UserController extends Controller
$date = \Carbon\Carbon::now()->toDateTimeString();
$arti = $article->where('slug', $slug);
if (! Auth::check() || \Auth::user()->role == 'user') {
if (!Auth::check() || \Auth::user()->role == 'user') {
$arti = $arti->where('status', '1');
$arti = $arti->where('publish_time', '<', $date);
}
@@ -130,7 +133,7 @@ class UserController extends Controller
{
/* get the article_id where category_id == current category */
$catid = $category->where('slug', $slug)->first();
if (! $catid) {
if (!$catid) {
return redirect()->back()->with('fails', Lang::get('lang.we_are_sorry_but_the_page_you_are_looking_for_can_not_be_found'));
}
$id = $catid->id;
@@ -222,12 +225,13 @@ class UserController extends Controller
* @param type Request $request
* @param type Comment $comment
* @param type Id $id
*
* @return type response
*/
public function postComment($slug, Article $article, CommentRequest $request, Comment $comment)
{
$article = $article->where('slug', $slug)->first();
if (! $article) {
if (!$article) {
return Redirect::back()->with('fails', Lang::get('lang.sorry_not_processed'));
}
$id = $article->id;

View File

@@ -9,7 +9,7 @@ class CommonMailer
public function setSmtpDriver($config)
{
try {
if (! $config) {
if (!$config) {
return false;
}
$https = [];
@@ -34,7 +34,7 @@ class CommonMailer
public function setMailGunDriver($config)
{
if (! $config) {
if (!$config) {
return false;
}

View File

@@ -71,6 +71,7 @@ class NotificationController extends Controller
* This function is to mark all ticket to read status.
*
* @param type $id
*
* @return int
*/
public function markAllRead($id)
@@ -88,6 +89,7 @@ class NotificationController extends Controller
* This function to mark read.
*
* @param type $id
*
* @return int
*/
public function markRead($id)
@@ -117,6 +119,7 @@ class NotificationController extends Controller
* function to delete notifications.
*
* @param type $id
*
* @return int
*/
public function delete($id)

View File

@@ -57,6 +57,7 @@ class PhpMailController extends Controller
*
* @param type Reg $reg
* @param type Department $dept_id
*
* @return type integer
*/
public function mailfrom($reg, $dept_id)
@@ -187,7 +188,7 @@ class PhpMailController extends Controller
'username' => $mail->email_address,
'password' => $mail->password,
];
if (! $this->commonMailer->setSmtpDriver($config)) {
if (!$this->commonMailer->setSmtpDriver($config)) {
\Log::info('Invaid configuration :- '.$config);
return 'invalid mail configuration';

View File

@@ -124,6 +124,7 @@ class SettingsController extends Controller
*
* @param type Footer $footer
* @param type Request $request
*
* @return type response
*/
public function edit_widget($id, Widgets $widgets, Request $request)
@@ -201,6 +202,7 @@ class SettingsController extends Controller
*
* @param type Footer $footer
* @param type Request $request
*
* @return type response
*/
public function edit_social_buttons($id, Widgets $widgets, Request $request)
@@ -260,6 +262,7 @@ class SettingsController extends Controller
*
* @param type Settings $set
* @param type Request $request
*
* @return type view
*/
public function PostSettings(Settings $set, Request $request)
@@ -371,6 +374,7 @@ class SettingsController extends Controller
* After plugin post.
*
* @param Request $request
*
* @return type
*/
public function PostPlugins(Request $request)
@@ -378,7 +382,7 @@ class SettingsController extends Controller
$this->validate($request, ['plugin' => 'required|mimes:application/zip,zip,Zip']);
try {
if (! extension_loaded('zip')) {
if (!extension_loaded('zip')) {
throw new Exception('Please enable zip extension in your php');
}
$plug = new Plugin();
@@ -449,14 +453,15 @@ class SettingsController extends Controller
* Delete the directory.
*
* @param type $dir
*
* @return bool
*/
public function deleteDirectory($dir)
{
if (! file_exists($dir)) {
if (!file_exists($dir)) {
return true;
}
if (! is_dir($dir)) {
if (!is_dir($dir)) {
return unlink($dir);
}
foreach (scandir($dir) as $item) {
@@ -464,7 +469,7 @@ class SettingsController extends Controller
continue;
}
chmod($dir.DIRECTORY_SEPARATOR.$item, 0777);
if (! $this->deleteDirectory($dir.DIRECTORY_SEPARATOR.$item)) {
if (!$this->deleteDirectory($dir.DIRECTORY_SEPARATOR.$item)) {
return false;
}
}
@@ -577,7 +582,7 @@ class SettingsController extends Controller
{
$plugs = new Plugin();
$plug = $plugs->where('name', $slug)->first();
if (! $plug) {
if (!$plug) {
$plugs->create(['name' => $slug, 'path' => $slug, 'status' => 1]);
return redirect()->back()->with('success', 'Status has changed');

View File

@@ -53,6 +53,7 @@ class TemplateController extends Controller
* This template to show a particular template.
*
* @param type $id
*
* @return type view
*/
public function showTemplate($id)
@@ -70,6 +71,7 @@ class TemplateController extends Controller
* This function is used to display chumper datatables of the template list.
*
* @param \Illuminate\Http\Request $request
*
* @return type datatable
*/
public function GetTemplates(Request $request)
@@ -108,6 +110,7 @@ class TemplateController extends Controller
* To store a set of templates.
*
* @param \App\Http\Requests\helpdesk\TemplateRequest $request
*
* @return type redirect
*/
public function store(TemplateRequest $request)
@@ -125,6 +128,7 @@ class TemplateController extends Controller
* function to get the edit page of template.
*
* @param type $id
*
* @return type
*/
public function edit($id)
@@ -145,6 +149,7 @@ class TemplateController extends Controller
*
* @param type $id
* @param \App\Http\Requests\helpdesk\TemplateUdate $request
*
* @return type
*/
public function update($id, TemplateUdate $request)
@@ -164,13 +169,14 @@ class TemplateController extends Controller
* function to delete a template.
*
* @param int $id
*
* @return Response
*/
public function destroy(Request $request)
{
try {
$ids = $request->input('select');
if (! empty($ids)) {
if (!empty($ids)) {
foreach ($ids as $id) {
$template = $this->template->where('id', $id)->first();
if ($template) {
@@ -212,6 +218,7 @@ class TemplateController extends Controller
* function to show the templates.
*
* @param type $id
*
* @return type Mixed
*/
public function show($id)

View File

@@ -52,6 +52,7 @@ class TemplateSetController extends Controller
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\Response
*/
public function store(TemplateSet $sets, TemplateSetRequest $request)
@@ -74,6 +75,7 @@ class TemplateSetController extends Controller
* Display the specified resource.
*
* @param int $id
*
* @return \Illuminate\Http\Response
*/
public function activateSet($id)
@@ -96,6 +98,7 @@ class TemplateSetController extends Controller
* Show the form for editing the specified resource.
*
* @param int $id
*
* @return \Illuminate\Http\Response
*/
public function show($id)
@@ -112,6 +115,7 @@ class TemplateSetController extends Controller
*
* @param \Illuminate\Http\Request $request
* @param int $id
*
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
@@ -123,6 +127,7 @@ class TemplateSetController extends Controller
* Remove the specified resource from storage.
*
* @param int $id
*
* @return \Illuminate\Http\Response
*/
public function destroy($id)

View File

@@ -218,6 +218,7 @@ class InstallController extends Controller
* checking prerequisites.
*
* @param type InstallerRequest $request
*
* @return type view
*/
public function accountcheck(Request $request)
@@ -266,7 +267,7 @@ class InstallController extends Controller
}
$changed = UnAuth::changeLanguage($language);
if (! $changed) {
if (!$changed) {
return \Redirect::back()->with('fails', 'Invalid language');
}
@@ -454,7 +455,7 @@ class InstallController extends Controller
if (is_file(base_path().DIRECTORY_SEPARATOR.'.env')) {
unlink(base_path().DIRECTORY_SEPARATOR.'.env');
}
if (! is_file(base_path().DIRECTORY_SEPARATOR.'example.env')) {
if (!is_file(base_path().DIRECTORY_SEPARATOR.'example.env')) {
fopen(base_path().DIRECTORY_SEPARATOR.'example.env', 'w');
}
@@ -493,7 +494,7 @@ class InstallController extends Controller
try {
$tableNames = \Schema::getConnection()->getDoctrineSchemaManager()->listTableNames();
if (count($tableNames) === 0) {
if (! Cache::get('dummy_data_installation')) {
if (!Cache::get('dummy_data_installation')) {
Artisan::call('migrate', ['--force' => true]);
$db_install_method = 'migrate';
} else {

View File

@@ -34,7 +34,7 @@ class QueueController extends Controller
try {
$queues = new QueueService();
$queue = $queues->find($id);
if (! $queue) {
if (!$queue) {
throw new Exception('Sorry we can not find your request');
}
@@ -50,7 +50,7 @@ class QueueController extends Controller
$values = $request->except('_token');
$queues = new QueueService();
$queue = $queues->find($id);
if (! $queue) {
if (!$queue) {
throw new Exception('Sorry we can not find your request');
}
$setting = new FaveoQueue();
@@ -82,7 +82,7 @@ class QueueController extends Controller
$queues = new QueueService();
$queue = $queues->find($id);
$active_queue = $queues->where('status', 1)->first();
if (! $queue) {
if (!$queue) {
throw new Exception('Sorry we can not find your request');
}
if ($queue->isActivate() == false && $id != 1 && $id != 2) {

View File

@@ -91,12 +91,12 @@ class UpgradeController extends Controller
);
$newUpdate = file_get_contents($download_url, false, $context);
if (! is_dir("$this->dir/UPDATES/")) {
if (!is_dir("$this->dir/UPDATES/")) {
\File::makeDirectory($this->dir.'/UPDATES/', 0777);
}
$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>';
exit();
}
@@ -115,7 +115,7 @@ class UpgradeController extends Controller
return 0;
}
if (! extension_loaded('zip')) {
if (!extension_loaded('zip')) {
echo '<ul class=list-unstyled>';
echo "<li style='color:red;'>Sorry we can not process your request because you don't have ZIP extension contact your system admin</li>";
echo '</ul>';
@@ -139,14 +139,14 @@ class UpgradeController extends Controller
}
//Make the directory if we need to...
if (! is_dir($update.'/'.$thisFileDir.'/')) {
if (!is_dir($update.'/'.$thisFileDir.'/')) {
\File::makeDirectory($update.'/'.$thisFileDir, 0775, true, true);
// mkdir($update.'/'. $thisFileDir, 0775);
echo '<li style="color:white;">Created Directory '.$thisFileDir.'</li>';
}
//Overwrite the file
if (! is_dir($update.'/'.$thisFileName)) {
if (!is_dir($update.'/'.$thisFileName)) {
echo '<li style="color:white;">'.$thisFileName.'...........';
$contents = zip_entry_read($aF, zip_entry_filesize($aF));
$contents = str_replace("\r\n", "\n", $contents);
@@ -283,7 +283,7 @@ class UpgradeController extends Controller
if ($latest_version > $current_version) {
echo '<p>New Update Found: v'.$latest_version.'</p>';
$found = true;
if (! is_file("$this->dir/UPDATES/faveo-helpdesk-master.zip")) {
if (!is_file("$this->dir/UPDATES/faveo-helpdesk-master.zip")) {
if ($request->get('dodownload') == true) {
$download_url = $this->downloadLatestCode();
if ($download_url != null) {
@@ -325,7 +325,7 @@ class UpgradeController extends Controller
{
try {
$curl = Utility::_isCurl();
if (! $curl) {
if (!$curl) {
throw new Exception('Please enable your curl function to check latest update');
}
$ch = curl_init();
@@ -347,7 +347,7 @@ class UpgradeController extends Controller
{
try {
$curl = Utility::_isCurl();
if (! $curl) {
if (!$curl) {
throw new Exception('Please enable your curl function to check latest update');
}
$ch = curl_init();
@@ -371,7 +371,7 @@ class UpgradeController extends Controller
{
try {
$curl = Utility::_isCurl();
if (! $curl) {
if (!$curl) {
throw new Exception('Please enable your curl function to check latest update');
}
$ch = curl_init();

View File

@@ -20,6 +20,7 @@ class ApiKey
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)

View File

@@ -23,6 +23,7 @@ class Authenticate
* Create a new filter instance.
*
* @param Guard $auth
*
* @return void
*/
public function __construct(Guard $auth)
@@ -35,6 +36,7 @@ class Authenticate
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)

View File

@@ -18,6 +18,7 @@ class CheckBoard
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return type Mixed
*/
public function handle($request, Closure $next)

View File

@@ -16,6 +16,7 @@ class CheckRole
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)

View File

@@ -16,6 +16,7 @@ class CheckRoleAgent
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)

View File

@@ -16,6 +16,7 @@ class CheckRoleUser
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)

View File

@@ -14,6 +14,7 @@ class CheckUpdate
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)
@@ -46,7 +47,7 @@ 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'));
@@ -64,7 +65,7 @@ class CheckUpdate
}
}
if (count($notifications) > 0) {
if (! array_key_exists('new-version', $notifications)) {
if (!array_key_exists('new-version', $notifications)) {
$check_version = $this->checkNewVersion();
if ($check_version == true) {
$notify->create(['key' => 'new-version', 'value' => 'new version found please click <a href='.url('file-update').'><b>here to download</b></a>']);

View File

@@ -11,6 +11,7 @@ class Install
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)

View File

@@ -11,11 +11,12 @@ class IsInstalled
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)
{
if (! isInstall()) {
if (!isInstall()) {
return $next($request);
} else {
if ($request->isJson()) {

View File

@@ -28,9 +28,10 @@ class JwtAuthenticate extends BaseMiddleware
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*
* @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
*
* @return mixed
*/
public function handle($request, Closure $next)
{

View File

@@ -11,6 +11,7 @@ class Redirect
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)

View File

@@ -14,6 +14,7 @@ class RedirectIfAuthenticated
* @param \Illuminate\Http\Request $request
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
* @param string|null ...$guards
*
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
*/
public function handle(Request $request, Closure $next, ...$guards)

View File

@@ -14,6 +14,7 @@ class TicketViewURL
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)
@@ -27,11 +28,11 @@ class TicketViewURL
if (count(Request::all()) == 0) {
return \Redirect::to('tickets?show%5B%5D=inbox&departments%5B%5D=All');
} else {
if (! array_key_exists('show', Request::all()) && ! array_key_exists('departments', Request::all())) {
if (!array_key_exists('show', Request::all()) && !array_key_exists('departments', Request::all())) {
return \Redirect::to($request_str.'&show%5B%5D=inbox&departments%5B%5D=All');
} elseif (! array_key_exists('show', Request::all()) && array_key_exists('departments', Request::all())) {
} elseif (!array_key_exists('show', Request::all()) && array_key_exists('departments', Request::all())) {
return \Redirect::to($request_str.'&show%5B%5D=inbox');
} elseif (array_key_exists('show', Request::all()) && ! array_key_exists('departments', Request::all())) {
} elseif (array_key_exists('show', Request::all()) && !array_key_exists('departments', Request::all())) {
return \Redirect::to($request_str.'&departments%5B%5D=All');
} else {
// do nothing

View File

@@ -25,6 +25,7 @@ class VerifyCsrfToken extends BaseVerifier
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)

View File

@@ -130,7 +130,7 @@ class ClientRequest extends Request
$settings = $settings->select('status')->where('option_name', '=', 'send_otp')->first();
$email_mandatory = $settings->select('status')->where('option_name', '=', 'email_mandatory')->first();
if (($email_mandatory->status == 0 || $email_mandatory->status == '0')) {
if (! \Auth::check()) {
if (!\Auth::check()) {
return [
'Name' => 'required',
'Email' => 'email',

View File

@@ -101,6 +101,7 @@ class CreateTicketRequest extends Request
*@category function to make only moble required rule
*
*@param null
*
*@return array
*/
public function onlyMobleRequired()

View File

@@ -82,6 +82,7 @@ class Sys_userRequest extends Request
*@category function to make only moble required rule
*
*@param null
*
*@return array
*/
public function onlyMobleRequired()

View File

@@ -47,7 +47,7 @@ class TicketRequest extends Request
public function size()
{
$files = $this->file('attachment');
if (! $files) {
if (!$files) {
throw new \Exception('exceeded', 422);
}
$size = 0;

View File

@@ -30,6 +30,7 @@ class AgentLayout
* Create a new profile composer.
*
* @param
*
* @return void
*/
public function __construct(Company $company, User $users, Tickets $tickets, Department $department, Emails $emails, CommonSettings $common_settings)
@@ -47,6 +48,7 @@ class AgentLayout
* Bind data to the view.
*
* @param View $view
*
* @return void
*/
public function compose(View $view)
@@ -223,12 +225,13 @@ class AgentLayout
* @category function to check if dummy data is installed in the system or not
*
* @param null
*
* @return builder
*/
public function getDummyDataInstallation()
{
$return_collection = $this->common_settings->select('status')->where('option_name', '=', 'dummy_data_installation')->first();
if (! $return_collection) {
if (!$return_collection) {
$return_collection = collect(['status' => 0]);
return $return_collection['status'];

View File

@@ -153,6 +153,7 @@ function faveotime($date, $hour = 0, $min = 0, $sec = 0)
* @category function to return array values if status id
*
* @param string purpose of status
*
* @return array ids of status with purpose passed as string
*/
function getStatusArray($status)
@@ -167,6 +168,7 @@ function getStatusArray($status)
* @category function to UTF encoding
*
* @param string name
*
* @return string name
*/
function utfEncoding($name)
@@ -185,20 +187,20 @@ function utfEncoding($name)
function faveoDate($date = '', $format = '', $tz = '')
{
if (! $date) {
if (!$date) {
$date = \Carbon\Carbon::now();
}
if (! is_object($date)) {
if (!is_object($date)) {
$date = carbon($date);
}
if (! $format || ! $tz) {
if (!$format || !$tz) {
$system = App\Model\helpdesk\Settings\System::select('time_zone', 'date_time_format')->first();
}
if (! $format) {
if (!$format) {
$format = is_numeric($system->date_time_format) ? DB::table('date_time_format')->where('id', $system->date_time_format)->value('format') : $system->date_time_format;
}
if (! $tz) {
if (!$tz) {
$tz = is_numeric($system->time_zone) ? DB::table('timezone')->where('id', $system->time_zone)->value('name') : $system->time_zone;
}
@@ -230,6 +232,7 @@ function timezone()
*
* @param string/array $errorMsg errorMsg can be an array of errors or string
* @param int $responseCode
*
* @return json
*/
function errorResponse($errorMsg, $responseCode = 400)
@@ -245,11 +248,12 @@ function errorResponse($errorMsg, $responseCode = 400)
* @param string $successMsg
* @param array/string $data data of the response
* @param int $responseCode
*
* @return json
*/
function successResponse($successMsg = '', $data = '', $responseCode = 200)
{
$response = ! $successMsg ? ['success' => true, 'data' => $data] : (! $data ? ['success' => true, 'message' => $successMsg] : ['success' => true, 'message' => $successMsg, 'data' => $data]);
$response = !$successMsg ? ['success' => true, 'data' => $data] : (!$data ? ['success' => true, 'message' => $successMsg] : ['success' => true, 'message' => $successMsg, 'data' => $data]);
return response()->json($response);
}
@@ -258,6 +262,7 @@ function successResponse($successMsg = '', $data = '', $responseCode = 200)
* formats exception response by giving enough information for debugginh.
*
* @param \Exception $exception exception object
*
* @return Response with json response content
*/
function exceptionResponse(Exception $exception)
@@ -273,6 +278,7 @@ function exceptionResponse(Exception $exception)
* Creates an empty DB with given name.
*
* @param string $dbName name of the DB
*
* @return null
*/
function createDB(string $dbName)
@@ -292,6 +298,7 @@ function createDB(string $dbName)
* parse the carbon.
*
* @param string $date
*
* @return \Carbon\Carbon
*/
function carbon($date)

View File

@@ -46,7 +46,7 @@ class Ticket_Thread extends Model
{
require_once base_path('vendor'.DIRECTORY_SEPARATOR.'htmlpurifier'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.'HTMLPurifier.auto.php');
$path = base_path('vendor'.DIRECTORY_SEPARATOR.'htmlpurifier'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.'HTMLPurifier'.DIRECTORY_SEPARATOR.'DefinitionCache'.DIRECTORY_SEPARATOR.'Serializer');
if (! File::exists($path)) {
if (!File::exists($path)) {
File::makeDirectory($path, $mode = 0777, true, true);
}
$config = \HTMLPurifier_Config::createDefault();

View File

@@ -46,7 +46,7 @@ class Ticket_ThreadOld extends Model
{
require_once base_path('vendor'.DIRECTORY_SEPARATOR.'htmlpurifier'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.'HTMLPurifier.auto.php');
$path = base_path('vendor'.DIRECTORY_SEPARATOR.'htmlpurifier'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.'HTMLPurifier'.DIRECTORY_SEPARATOR.'DefinitionCache'.DIRECTORY_SEPARATOR.'Serializer');
if (! File::exists($path)) {
if (!File::exists($path)) {
File::makeDirectory($path, $mode = 0777, true, true);
}
$config = \HTMLPurifier_Config::createDefault();

View File

@@ -28,7 +28,7 @@ class Ticket_attachments extends Model
$name = $this->name;
$root = $this->path;
if (($drive == 'database' || ! $drive) && $value && base64_decode($value, true) === false) {
if (($drive == 'database' || !$drive) && $value && base64_decode($value, true) === false) {
$value = base64_encode($value);
}
if ($drive && $drive !== 'database') {

View File

@@ -75,7 +75,7 @@ class Tickets extends BaseModel
public function setAssignedToAttribute($value)
{
if (! $value) {
if (!$value) {
$this->attributes['assigned_to'] = null;
} else {
$this->attributes['assigned_to'] = $value;

View File

@@ -20,6 +20,7 @@ class AuthServiceProvider extends ServiceProvider
* Register any application authentication / authorization services.
*
* @param \Illuminate\Contracts\Auth\Access\Gate $gate
*
* @return void
*/
public function boot()

View File

@@ -21,6 +21,7 @@ class EventServiceProvider extends ServiceProvider
* Register any other events for your application.
*
* @param \Illuminate\Contracts\Events\Dispatcher $events
*
* @return void
*/
public function boot()

View File

@@ -45,7 +45,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
if ($info) {
$pic = $this->checkArray('avatar', $info);
}
if (! $pic && $value) {
if (!$pic && $value) {
$pic = '';
$file = asset('uploads/profilepic/'.$value);
if ($file) {
@@ -54,7 +54,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
$pic = 'data:image/'.$type.';base64,'.base64_encode($data);
}
}
if (! $value) {
if (!$value) {
$pic = \Gravatar::src($this->attributes['email']);
}
@@ -113,7 +113,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
public function getEmailAttribute($value)
{
if (! $value) {
if (!$value) {
$value = \Lang::get('lang.not-available');
}

View File

@@ -3,8 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
return new class extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*

View File

@@ -3,8 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
return new class extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*

View File

@@ -3,8 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
return new class extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*

View File

@@ -3,8 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
return new class extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*

View File

@@ -3,8 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
return new class extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*

View File

@@ -3,8 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
return new class extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*

View File

@@ -3,8 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
return new class extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*

Some files were not shown because too many files have changed in this diff Show More