{!! Lang::get('lang.read_more') !!} + {!! $excerpt !!}
{!! Lang::get('lang.read_more') !!} @endforeach
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
index acb681a80..773d0cbe4 100644
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -59,7 +59,7 @@ class Handler extends ExceptionHandler {
// }
// return response()->view('errors.500', []);
// }
- // return parent::render($request, $e);
+ return parent::render($request, $e);
if ($this->isHttpException($e))
{
diff --git a/app/Http/Controllers/Admin/helpdesk/SettingsController.php b/app/Http/Controllers/Admin/helpdesk/SettingsController.php
index 45347f937..84d08da93 100644
--- a/app/Http/Controllers/Admin/helpdesk/SettingsController.php
+++ b/app/Http/Controllers/Admin/helpdesk/SettingsController.php
@@ -248,6 +248,7 @@ class SettingsController extends Controller {
$emails->fill($request->except('email_fetching', 'all_emails', 'email_collaborator', 'strip', 'attachment'))->save();
/* insert checkboxes to database */
$emails->email_fetching = $request->input('email_fetching');
+ $emails->notification_cron = $request->input('notification_cron');
$emails->all_emails = $request->input('all_emails');
$emails->email_collaborator = $request->input('email_collaborator');
$emails->strip = $request->input('strip');
diff --git a/app/Http/Controllers/Agent/helpdesk/MailController.php b/app/Http/Controllers/Agent/helpdesk/MailController.php
index 80b97bb3e..d2b678aa0 100644
--- a/app/Http/Controllers/Agent/helpdesk/MailController.php
+++ b/app/Http/Controllers/Agent/helpdesk/MailController.php
@@ -115,10 +115,9 @@ class MailController extends Controller {
// echo $_SERVER['DOCUMENT_ROOT'];
$dir_img_paths = __DIR__;
$dir_img_path = explode('/code', $dir_img_paths);
- $filepath = explode('../../../../../../public/',$attachment->filePath);
- // dd($filepath);
- // $path = $dir_img_path[0]."/public/".$filepath[1];
- $path = public_path().'/'.$filepath[1];
+ $filepath = explode('../../../../../public/',$attachment->filePath);
+
+ $path = $dir_img_path[0]."/code/public/".$filepath[1];
// dd($path);
$filesize = filesize($path);
$file_data = file_get_contents($path);
diff --git a/app/Http/Controllers/Agent/helpdesk/NotificationController.php b/app/Http/Controllers/Agent/helpdesk/NotificationController.php
index 56d4d2f20..3995e2f5c 100644
--- a/app/Http/Controllers/Agent/helpdesk/NotificationController.php
+++ b/app/Http/Controllers/Agent/helpdesk/NotificationController.php
@@ -7,6 +7,8 @@ use App\User;
use App\Model\helpdesk\Settings\Company;
use App\Model\helpdesk\Agent\Teams;
use App\Model\helpdesk\Agent\Department;
+use App\Model\helpdesk\Utility\Log_notification;
+use App\Model\hrlpdesk\settings\Email;
/**
* UserController
@@ -22,12 +24,20 @@ class NotificationController extends Controller {
* @return mail
**/
public function send_notification() {
- // $this->test();
- $company = $this->company();
- // $this->send_notification_to_admin($company);
- // $this->send_notification_to_team_lead($company);
- // $this->send_notification_to_manager($company);
- // $this->send_notification_to_agent($company);
+ $email = Email::where('id','=','1')->first();
+ if($email->notification_cron == 1){
+ $notification = Log_notification::where('log','=','NOT-1')->orderBy('id','DESC')->first();
+ $date = explode(" " , $notification->created_at);
+ if(Date('Y-m-d') == $date[0]){
+ } else {
+ Log_notification::create(['log'=>'NOT-1']);
+ $company = $this->company();
+ $this->send_notification_to_admin($company);
+ $this->send_notification_to_team_lead($company);
+ $this->send_notification_to_manager($company);
+ $this->send_notification_to_agent($company);
+ }
+ }
}
/**
diff --git a/app/Http/Controllers/Agent/helpdesk/TicketController.php b/app/Http/Controllers/Agent/helpdesk/TicketController.php
index ce133ec9e..62a54382d 100644
--- a/app/Http/Controllers/Agent/helpdesk/TicketController.php
+++ b/app/Http/Controllers/Agent/helpdesk/TicketController.php
@@ -1118,7 +1118,7 @@ class TicketController extends Controller {
$create_user->password = Hash::make($password);
$create_user->save();
$user_id = $create_user->id;
- Mail::send('emails.pass', ['password' => $password, 'name' => $name, 'from'=>$company], function ($message) use ($email, $name) {
+ Mail::send('emails.pass', ['password' => $password, 'name' => $name, 'from'=>$company,'emailadd' => $email], function ($message) use ($email, $name) {
$message->to($email, $name)->subject('password');
});
}
@@ -1308,7 +1308,7 @@ class TicketController extends Controller {
$user->role = 'user';
if ($user->save()) {
$user_id = $user->id;
- Mail::send('emails.pass', ['password' => $password, 'name' => $name, 'from'=>$company], function ($message) use ($email, $name) {
+ Mail::send('emails.pass', ['password' => $password, 'name' => $name, 'from'=>$company,'emailadd'=>$email], function ($message) use ($email, $name) {
$message->to($email, $name)->subject('password');
});
}
diff --git a/app/Model/helpdesk/Utility/Log_notification.php b/app/Model/helpdesk/Utility/Log_notification.php
new file mode 100644
index 000000000..e15465fc6
--- /dev/null
+++ b/app/Model/helpdesk/Utility/Log_notification.php
@@ -0,0 +1,11 @@
+ true,
+ /*
+ |--------------------------------------------------------------------------
+ | Error Log
+ |--------------------------------------------------------------------------
+ |
+ | This error log will send email to faveo about the errors. So that before
+ | reporting about the errors we at faveo will start solving the issues already.
+ | The errors mails will never share your files or data. it will only share
+ | the line number and error occured.
+ | To dissable you may just change '%1%' to 0.
+ */
+
+ 'ErrorLog' => '%1%',
+
/*
|--------------------------------------------------------------------------
| Application Version
@@ -24,7 +38,7 @@ return [
|
*/
- 'version' => '1.0.3.3',
+ 'version' => 'Community 1.0.3.4',
/*
|--------------------------------------------------------------------------
diff --git a/database/migrations/2015_05_07_043904_create_email_table.php b/database/migrations/2015_05_07_043904_create_email_table.php
index 26ab44dbc..a374035a3 100644
--- a/database/migrations/2015_05_07_043904_create_email_table.php
+++ b/database/migrations/2015_05_07_043904_create_email_table.php
@@ -19,6 +19,7 @@ class CreateEmailTable extends Migration {
$table->string('admin_email');
$table->string('mta');
$table->boolean('email_fetching');
+ $table->boolean('notification_cron');
$table->boolean('strip');
$table->boolean('separator');
$table->boolean('all_emails');
diff --git a/database/migrations/2015_12_23_074831_create_notification_log_table.php b/database/migrations/2015_12_23_074831_create_notification_log_table.php
new file mode 100644
index 000000000..096e8d6ed
--- /dev/null
+++ b/database/migrations/2015_12_23_074831_create_notification_log_table.php
@@ -0,0 +1,32 @@
+increments('id');
+ $table->string('log');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::drop('log_notification');
+ }
+
+}
diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php
index 65c9e032e..a5cbd123a 100644
--- a/database/seeds/DatabaseSeeder.php
+++ b/database/seeds/DatabaseSeeder.php
@@ -34,6 +34,7 @@ use App\Model\helpdesk\Theme\Footer4;
use App\Model\helpdesk\Email\Smtp;
use App\Model\helpdesk\Utility\Version_Check;
use App\Model\kb\Options;
+use App\Model\helpdesk\Utility\Log_notification;
// Knowledge base
@@ -278,6 +279,8 @@ class DatabaseSeeder extends Seeder {
Priority::create(array('name' => 'low'));
Priority::create(array('name' => 'high'));
+ Log_notification::create(['log'=>'NOT-1']);
+
Access::create(array('id' => '1'));
Alert::create(array('id' => '1'));
Company::create(array('id' => '1'));
@@ -335,5 +338,7 @@ class DatabaseSeeder extends Seeder {
Side2::create(['id'=>'1']);
Settings::create(['id'=>'id','paagination' => '10']);
+
+
}
}
\ No newline at end of file
diff --git a/resources/lang/en/lang.php b/resources/lang/en/lang.php
index 58192faa0..8c9df92ec 100644
--- a/resources/lang/en/lang.php
+++ b/resources/lang/en/lang.php
@@ -216,6 +216,7 @@ return array(
'default_alert_email' =>'Default Alert Email',
'attachments' =>'Attachments',
'email_attahment_user' =>'Email attachments to the user',
+ 'cron_notification' => 'Enable Notification cron',
/*
|--------------------------------------
diff --git a/resources/views/themes/default1/admin/helpdesk/agent/agents/create.blade.php b/resources/views/themes/default1/admin/helpdesk/agent/agents/create.blade.php
index 6c326f738..437fcb705 100644
--- a/resources/views/themes/default1/admin/helpdesk/agent/agents/create.blade.php
+++ b/resources/views/themes/default1/admin/helpdesk/agent/agents/create.blade.php
@@ -179,7 +179,7 @@ class="active"
{!! Form::label('primary_dpt',Lang::get('lang.primary_department')) !!}
{!! $errors->first('primary_dpt', '