progress indicators, bug fixes, after a while
This commit is contained in:
15
app/Models/BranchFile.php
Normal file
15
app/Models/BranchFile.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class BranchFile extends Model
|
||||
{
|
||||
protected $guarded = array('id');
|
||||
public $table = "branch_files";
|
||||
|
||||
public function branch_info(){
|
||||
return $this->hasOne('App\Models\OfficeLocation', 'id', 'branch_id');
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,14 @@ class Client extends Model
|
||||
public $table = "clients";
|
||||
protected $appends = ['client_services'];
|
||||
|
||||
/*
|
||||
public function getprogressIndicatorsAttribute($value){
|
||||
$current_indicator_count = json_decode($value, true);
|
||||
$general_indicators = Models\ClientIndicator::count();
|
||||
$indicator_score = (count($current_indicator_count)/$general_indicators) * 100;
|
||||
return number_format($indicator_score);
|
||||
}
|
||||
*/
|
||||
public function country_info(){
|
||||
return $this->hasOne('App\Models\Country', 'alpha_2_code', 'country');
|
||||
}
|
||||
|
||||
10
app/Models/ClientIndicator.php
Normal file
10
app/Models/ClientIndicator.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ClientIndicator extends Model
|
||||
{
|
||||
protected $guarded = array('id');
|
||||
}
|
||||
19
app/Models/Mnopayment.php
Normal file
19
app/Models/Mnopayment.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Mnopayment extends Model
|
||||
{
|
||||
protected $guarded = array('id');
|
||||
public $table = "mno_payments";
|
||||
|
||||
public function client_info(){
|
||||
return $this->hasOne('App\Models\NetworkOps', 'id', 'mno_id');
|
||||
}
|
||||
|
||||
public function created_by_info(){
|
||||
return $this->hasOne('App\Models\SystemUser', 'id', 'user_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user