Passed
Branch develop (995037)
by Ajit
05:32
created
app/Console/Commands/SetExpired.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,6 +39,6 @@
 block discarded – undo
39 39
      */
40 40
     public function handle()
41 41
     {
42
-        Subscription::where('end_date','<',Carbon::today())->where('status','=',\constSubscription::onGoing)->update(['status' => \constSubscription::Expired]);
42
+        Subscription::where('end_date', '<', Carbon::today())->where('status', '=', \constSubscription::onGoing)->update(['status' => \constSubscription::Expired]);
43 43
     }
44 44
 }
Please login to merge, or discard this patch.
app/Plan.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -11,15 +11,15 @@  discard block
 block discarded – undo
11 11
     protected $table = 'mst_plans';
12 12
 
13 13
     protected $fillable = [
14
-    		'plan_code',
14
+            'plan_code',
15 15
             'plan_name',
16
-    		'service_id',
17
-    		'plan_details',
18
-    		'days',
19
-    		'amount',
20
-    		'status',
21
-    		'created_by',
22
-    		'updated_by'
16
+            'service_id',
17
+            'plan_details',
18
+            'days',
19
+            'amount',
20
+            'status',
21
+            'created_by',
22
+            'updated_by'
23 23
     ];
24 24
 
25 25
     //Eloquence Search mapping
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
     public function scopeExcludeArchive($query)
40 40
     {
41
-       return $query->where('status','!=', \constStatus::Archive);
41
+        return $query->where('status','!=', \constStatus::Archive);
42 42
     }
43 43
 
44 44
     public function scopeOnlyActive($query)
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,36 +33,36 @@
 block discarded – undo
33 33
 
34 34
     public function getPlanDisplayAttribute() 
35 35
     { 
36
-        return $this->plan_code . ' @ ' . $this->amount .' For '. $this->days .' Days'; 
36
+        return $this->plan_code.' @ '.$this->amount.' For '.$this->days.' Days'; 
37 37
     }
38 38
 
39 39
     public function scopeExcludeArchive($query)
40 40
     {
41
-       return $query->where('status','!=', \constStatus::Archive);
41
+       return $query->where('status', '!=', \constStatus::Archive);
42 42
     }
43 43
 
44 44
     public function scopeOnlyActive($query)
45 45
     {
46
-        return $query->where('status','=', \constStatus::Active);
46
+        return $query->where('status', '=', \constStatus::Active);
47 47
     }
48 48
 
49 49
     public function createdBy()
50 50
     {
51
-        return $this->belongsTo('App\User','created_by');
51
+        return $this->belongsTo('App\User', 'created_by');
52 52
     }
53 53
 
54 54
     public function updatedBy()
55 55
     {
56
-        return $this->belongsTo('App\User','updated_by');
56
+        return $this->belongsTo('App\User', 'updated_by');
57 57
     }
58 58
 
59 59
     public function Subscriptions()
60 60
     {
61
-        return $this->hasMany('App\Subscription','plan_id');
61
+        return $this->hasMany('App\Subscription', 'plan_id');
62 62
     }
63 63
 
64 64
     public function Service()
65 65
     {
66
-        return $this->belongsTo('App\Service','service_id');
66
+        return $this->belongsTo('App\Service', 'service_id');
67 67
     }
68 68
 }
Please login to merge, or discard this patch.
app/Payment_detail.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -7,18 +7,18 @@  discard block
 block discarded – undo
7 7
 
8 8
 class Payment_detail extends Model
9 9
 {
10
-	 protected $table = 'trn_payment_details';
10
+        protected $table = 'trn_payment_details';
11 11
 
12
-	 protected $fillable = [
13
-	 		'payment_amount',
14
-	 		'note',
15
-	 		'mode',
16
-	 		'invoice_id',
17
-	 		'created_by',
18
-    		'updated_by',
19
-	 ];
12
+        protected $fillable = [
13
+                'payment_amount',
14
+                'note',
15
+                'mode',
16
+                'invoice_id',
17
+                'created_by',
18
+            'updated_by',
19
+        ];
20 20
 
21
-     //Eloquence Search mapping
21
+        //Eloquence Search mapping
22 22
     use Eloquence;
23 23
 
24 24
     protected $searchableColumns = [
@@ -35,19 +35,19 @@  discard block
 block discarded – undo
35 35
         if ($drp_start == null or $drp_end == null) 
36 36
         {
37 37
             return $query->leftJoin('trn_invoice','trn_payment_details.invoice_id','=','trn_invoice.id')
38
-                         ->leftJoin('mst_members','trn_invoice.member_id','=','mst_members.id')
39
-                         ->select('trn_payment_details.id','trn_payment_details.created_at','trn_payment_details.payment_amount','trn_payment_details.mode','trn_payment_details.invoice_id','trn_invoice.invoice_number','mst_members.id as member_id','mst_members.name as member_name','mst_members.member_code')
40
-                         ->orderBy($sorting_field,$sorting_direction);
38
+                            ->leftJoin('mst_members','trn_invoice.member_id','=','mst_members.id')
39
+                            ->select('trn_payment_details.id','trn_payment_details.created_at','trn_payment_details.payment_amount','trn_payment_details.mode','trn_payment_details.invoice_id','trn_invoice.invoice_number','mst_members.id as member_id','mst_members.name as member_name','mst_members.member_code')
40
+                            ->orderBy($sorting_field,$sorting_direction);
41 41
         }
42 42
 
43 43
         return $query->leftJoin('trn_invoice','trn_payment_details.invoice_id','=','trn_invoice.id')
44
-                     ->leftJoin('mst_members','trn_invoice.member_id','=','mst_members.id')
45
-                     ->select('trn_payment_details.id','trn_payment_details.created_at','trn_payment_details.payment_amount','trn_payment_details.mode','trn_invoice.invoice_number','mst_members.name as member_name','mst_members.member_code')
46
-                     ->whereBetween('trn_payment_details.created_at', [$drp_start, $drp_end])
47
-                     ->orderBy($sorting_field,$sorting_direction);
44
+                        ->leftJoin('mst_members','trn_invoice.member_id','=','mst_members.id')
45
+                        ->select('trn_payment_details.id','trn_payment_details.created_at','trn_payment_details.payment_amount','trn_payment_details.mode','trn_invoice.invoice_number','mst_members.name as member_name','mst_members.member_code')
46
+                        ->whereBetween('trn_payment_details.created_at', [$drp_start, $drp_end])
47
+                        ->orderBy($sorting_field,$sorting_direction);
48 48
     }
49 49
 
50
-	public function createdBy()
50
+    public function createdBy()
51 51
     {
52 52
         return $this->belongsTo('App\User','created_by');
53 53
     }
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
 
60 60
     public function Invoice()
61 61
     {
62
-    	return $this->belongsTo('App\Invoice','invoice_id');
62
+        return $this->belongsTo('App\Invoice','invoice_id');
63 63
     }    
64 64
 	
65
-	public function Cheque()
65
+    public function Cheque()
66 66
     {
67 67
         return $this->hasOne('App\Cheque_detail','payment_id');
68 68
     }
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -27,43 +27,43 @@
 block discarded – undo
27 27
         'Invoice.member.name' => 20,
28 28
     ];  
29 29
 
30
-    public function scopeIndexQuery($query,$sorting_field,$sorting_direction,$drp_start,$drp_end)
30
+    public function scopeIndexQuery($query, $sorting_field, $sorting_direction, $drp_start, $drp_end)
31 31
     {
32 32
         $sorting_field = ($sorting_field != null ? $sorting_field : 'created_at');
33 33
         $sorting_direction = ($sorting_direction != null ? $sorting_direction : 'desc');
34 34
 
35 35
         if ($drp_start == null or $drp_end == null) 
36 36
         {
37
-            return $query->leftJoin('trn_invoice','trn_payment_details.invoice_id','=','trn_invoice.id')
38
-                         ->leftJoin('mst_members','trn_invoice.member_id','=','mst_members.id')
39
-                         ->select('trn_payment_details.id','trn_payment_details.created_at','trn_payment_details.payment_amount','trn_payment_details.mode','trn_payment_details.invoice_id','trn_invoice.invoice_number','mst_members.id as member_id','mst_members.name as member_name','mst_members.member_code')
40
-                         ->orderBy($sorting_field,$sorting_direction);
37
+            return $query->leftJoin('trn_invoice', 'trn_payment_details.invoice_id', '=', 'trn_invoice.id')
38
+                         ->leftJoin('mst_members', 'trn_invoice.member_id', '=', 'mst_members.id')
39
+                         ->select('trn_payment_details.id', 'trn_payment_details.created_at', 'trn_payment_details.payment_amount', 'trn_payment_details.mode', 'trn_payment_details.invoice_id', 'trn_invoice.invoice_number', 'mst_members.id as member_id', 'mst_members.name as member_name', 'mst_members.member_code')
40
+                         ->orderBy($sorting_field, $sorting_direction);
41 41
         }
42 42
 
43
-        return $query->leftJoin('trn_invoice','trn_payment_details.invoice_id','=','trn_invoice.id')
44
-                     ->leftJoin('mst_members','trn_invoice.member_id','=','mst_members.id')
45
-                     ->select('trn_payment_details.id','trn_payment_details.created_at','trn_payment_details.payment_amount','trn_payment_details.mode','trn_invoice.invoice_number','mst_members.name as member_name','mst_members.member_code')
43
+        return $query->leftJoin('trn_invoice', 'trn_payment_details.invoice_id', '=', 'trn_invoice.id')
44
+                     ->leftJoin('mst_members', 'trn_invoice.member_id', '=', 'mst_members.id')
45
+                     ->select('trn_payment_details.id', 'trn_payment_details.created_at', 'trn_payment_details.payment_amount', 'trn_payment_details.mode', 'trn_invoice.invoice_number', 'mst_members.name as member_name', 'mst_members.member_code')
46 46
                      ->whereBetween('trn_payment_details.created_at', [$drp_start, $drp_end])
47
-                     ->orderBy($sorting_field,$sorting_direction);
47
+                     ->orderBy($sorting_field, $sorting_direction);
48 48
     }
49 49
 
50 50
 	public function createdBy()
51 51
     {
52
-        return $this->belongsTo('App\User','created_by');
52
+        return $this->belongsTo('App\User', 'created_by');
53 53
     }
54 54
 
55 55
     public function updatedBy()
56 56
     {
57
-        return $this->belongsTo('App\User','updated_by');
57
+        return $this->belongsTo('App\User', 'updated_by');
58 58
     }  
59 59
 
60 60
     public function Invoice()
61 61
     {
62
-    	return $this->belongsTo('App\Invoice','invoice_id');
62
+    	return $this->belongsTo('App\Invoice', 'invoice_id');
63 63
     }    
64 64
 	
65 65
 	public function Cheque()
66 66
     {
67
-        return $this->hasOne('App\Cheque_detail','payment_id');
67
+        return $this->hasOne('App\Cheque_detail', 'payment_id');
68 68
     }
69 69
 }
70 70
\ No newline at end of file
Please login to merge, or discard this patch.
app/Subscription.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@  discard block
 block discarded – undo
8 8
 
9 9
 class Subscription extends Model
10 10
 {
11
-	 protected $table = 'trn_subscriptions';
11
+        protected $table = 'trn_subscriptions';
12 12
 
13
-	 protected $fillable = [
13
+        protected $fillable = [
14 14
             'member_id',
15
-	 		'invoice_id',
16
-	 		'plan_id',
15
+                'invoice_id',
16
+                'plan_id',
17 17
             'status',
18 18
             'is_renewal',
19
-	 		'start_date',
20
-	 		'end_date',
21
-    		'created_by',
22
-    		'updated_by',
23
-	 ];  
19
+                'start_date',
20
+                'end_date',
21
+            'created_by',
22
+            'updated_by',
23
+        ];  
24 24
 
25 25
     protected $dates  = ['created_at', 'updated_at', 'start_date', 'end_date'];
26 26
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         return $query->leftJoin('mst_plans', 'trn_subscriptions.plan_id', '=', 'mst_plans.id')->select('trn_subscriptions.*','mst_plans.plan_name')->where('trn_subscriptions.status','=',\constSubscription::Expired)->where('trn_subscriptions.status','!=',\constSubscription::renewed)->whereBetween('trn_subscriptions.created_at', [$drp_start, $drp_end])->orderBy($sorting_field,$sorting_direction);
86 86
     }
87 87
 
88
-	public function createdBy()
88
+    public function createdBy()
89 89
     {
90 90
         return $this->belongsTo('App\User','created_by');
91 91
     }
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
     
98 98
     public function Member()
99 99
     {
100
-    	return $this->belongsTo('App\Member','member_id');
100
+        return $this->belongsTo('App\Member','member_id');
101 101
     }
102 102
 
103 103
     public function Plan()
104 104
     {
105
-    	return $this->belongsTo('App\Plan','plan_id');
105
+        return $this->belongsTo('App\Plan','plan_id');
106 106
     }
107 107
 
108 108
     public function Invoice()
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     		'updated_by',
23 23
 	 ];  
24 24
 
25
-    protected $dates  = ['created_at', 'updated_at', 'start_date', 'end_date'];
25
+    protected $dates = ['created_at', 'updated_at', 'start_date', 'end_date'];
26 26
 
27 27
     //Eloquence Search mapping
28 28
     use Eloquence;
@@ -38,75 +38,75 @@  discard block
 block discarded – undo
38 38
 
39 39
     public function scopeDashboardExpiring($query)
40 40
     {
41
-        return $query->where('end_date','<',Carbon::today()->addDays(7))->where('status','=',\constSubscription::onGoing);
41
+        return $query->where('end_date', '<', Carbon::today()->addDays(7))->where('status', '=', \constSubscription::onGoing);
42 42
     }
43 43
 
44 44
     public function scopeDashboardExpired($query)
45 45
     {
46
-        return $query->where('status','=',\constSubscription::Expired);
46
+        return $query->where('status', '=', \constSubscription::Expired);
47 47
     }
48 48
 
49
-    public function scopeIndexQuery($query,$sorting_field,$sorting_direction,$drp_start,$drp_end)
49
+    public function scopeIndexQuery($query, $sorting_field, $sorting_direction, $drp_start, $drp_end)
50 50
     {
51 51
         $sorting_field = ($sorting_field != null ? $sorting_field : 'created_at');
52 52
         $sorting_direction = ($sorting_direction != null ? $sorting_direction : 'desc');
53 53
 
54 54
         if ($drp_start == null or $drp_end == null) 
55 55
         {
56
-            return $query->leftJoin('mst_plans', 'trn_subscriptions.plan_id', '=', 'mst_plans.id')->select('trn_subscriptions.*','mst_plans.plan_name')->orderBy($sorting_field,$sorting_direction);
56
+            return $query->leftJoin('mst_plans', 'trn_subscriptions.plan_id', '=', 'mst_plans.id')->select('trn_subscriptions.*', 'mst_plans.plan_name')->orderBy($sorting_field, $sorting_direction);
57 57
         }
58 58
 
59
-        return $query->leftJoin('mst_plans', 'trn_subscriptions.plan_id', '=', 'mst_plans.id')->select('trn_subscriptions.*','mst_plans.plan_name')->whereBetween('trn_subscriptions.created_at', [$drp_start, $drp_end])->orderBy($sorting_field,$sorting_direction);
59
+        return $query->leftJoin('mst_plans', 'trn_subscriptions.plan_id', '=', 'mst_plans.id')->select('trn_subscriptions.*', 'mst_plans.plan_name')->whereBetween('trn_subscriptions.created_at', [$drp_start, $drp_end])->orderBy($sorting_field, $sorting_direction);
60 60
     }
61 61
 
62
-    public function scopeExpiring($query,$sorting_field,$sorting_direction,$drp_start,$drp_end)
62
+    public function scopeExpiring($query, $sorting_field, $sorting_direction, $drp_start, $drp_end)
63 63
     {
64 64
         $sorting_field = ($sorting_field != null ? $sorting_field : 'created_at');
65 65
         $sorting_direction = ($sorting_direction != null ? $sorting_direction : 'desc');
66 66
 
67 67
         if ($drp_start == null or $drp_end == null) 
68 68
         {
69
-            return $query->leftJoin('mst_plans', 'trn_subscriptions.plan_id', '=', 'mst_plans.id')->select('trn_subscriptions.*','mst_plans.plan_name')->where('trn_subscriptions.end_date','<',Carbon::today()->addDays(7))->where('trn_subscriptions.status','=',\constSubscription::onGoing)->orderBy($sorting_field,$sorting_direction);
69
+            return $query->leftJoin('mst_plans', 'trn_subscriptions.plan_id', '=', 'mst_plans.id')->select('trn_subscriptions.*', 'mst_plans.plan_name')->where('trn_subscriptions.end_date', '<', Carbon::today()->addDays(7))->where('trn_subscriptions.status', '=', \constSubscription::onGoing)->orderBy($sorting_field, $sorting_direction);
70 70
         }
71 71
 
72
-        return $query->leftJoin('mst_plans', 'trn_subscriptions.plan_id', '=', 'mst_plans.id')->select('trn_subscriptions.*','mst_plans.plan_name')->where('trn_subscriptions.end_date','<',Carbon::today()->addDays(7))->where('trn_subscriptions.status','=',\constSubscription::onGoing)->whereBetween('trn_subscriptions.created_at', [$drp_start, $drp_end])->orderBy($sorting_field,$sorting_direction);
72
+        return $query->leftJoin('mst_plans', 'trn_subscriptions.plan_id', '=', 'mst_plans.id')->select('trn_subscriptions.*', 'mst_plans.plan_name')->where('trn_subscriptions.end_date', '<', Carbon::today()->addDays(7))->where('trn_subscriptions.status', '=', \constSubscription::onGoing)->whereBetween('trn_subscriptions.created_at', [$drp_start, $drp_end])->orderBy($sorting_field, $sorting_direction);
73 73
     }
74 74
 
75
-    public function scopeExpired($query,$sorting_field,$sorting_direction,$drp_start,$drp_end)
75
+    public function scopeExpired($query, $sorting_field, $sorting_direction, $drp_start, $drp_end)
76 76
     {
77 77
         $sorting_field = ($sorting_field != null ? $sorting_field : 'created_at');
78 78
         $sorting_direction = ($sorting_direction != null ? $sorting_direction : 'desc');
79 79
 
80 80
         if ($drp_start == null or $drp_end == null) 
81 81
         {
82
-            return $query->leftJoin('mst_plans', 'trn_subscriptions.plan_id', '=', 'mst_plans.id')->select('trn_subscriptions.*','mst_plans.plan_name')->where('trn_subscriptions.status','=',\constSubscription::Expired)->where('trn_subscriptions.status','!=',\constSubscription::renewed)->orderBy($sorting_field,$sorting_direction);
82
+            return $query->leftJoin('mst_plans', 'trn_subscriptions.plan_id', '=', 'mst_plans.id')->select('trn_subscriptions.*', 'mst_plans.plan_name')->where('trn_subscriptions.status', '=', \constSubscription::Expired)->where('trn_subscriptions.status', '!=', \constSubscription::renewed)->orderBy($sorting_field, $sorting_direction);
83 83
         }
84 84
 
85
-        return $query->leftJoin('mst_plans', 'trn_subscriptions.plan_id', '=', 'mst_plans.id')->select('trn_subscriptions.*','mst_plans.plan_name')->where('trn_subscriptions.status','=',\constSubscription::Expired)->where('trn_subscriptions.status','!=',\constSubscription::renewed)->whereBetween('trn_subscriptions.created_at', [$drp_start, $drp_end])->orderBy($sorting_field,$sorting_direction);
85
+        return $query->leftJoin('mst_plans', 'trn_subscriptions.plan_id', '=', 'mst_plans.id')->select('trn_subscriptions.*', 'mst_plans.plan_name')->where('trn_subscriptions.status', '=', \constSubscription::Expired)->where('trn_subscriptions.status', '!=', \constSubscription::renewed)->whereBetween('trn_subscriptions.created_at', [$drp_start, $drp_end])->orderBy($sorting_field, $sorting_direction);
86 86
     }
87 87
 
88 88
 	public function createdBy()
89 89
     {
90
-        return $this->belongsTo('App\User','created_by');
90
+        return $this->belongsTo('App\User', 'created_by');
91 91
     }
92 92
 
93 93
     public function updatedBy()
94 94
     {
95
-        return $this->belongsTo('App\User','updated_by');
95
+        return $this->belongsTo('App\User', 'updated_by');
96 96
     }  
97 97
     
98 98
     public function Member()
99 99
     {
100
-    	return $this->belongsTo('App\Member','member_id');
100
+    	return $this->belongsTo('App\Member', 'member_id');
101 101
     }
102 102
 
103 103
     public function Plan()
104 104
     {
105
-    	return $this->belongsTo('App\Plan','plan_id');
105
+    	return $this->belongsTo('App\Plan', 'plan_id');
106 106
     }
107 107
 
108 108
     public function Invoice()
109 109
     {
110
-        return $this->belongsTo('App\Invoice','invoice_id');
110
+        return $this->belongsTo('App\Invoice', 'invoice_id');
111 111
     }
112 112
 }
Please login to merge, or discard this patch.
app/Enquiry.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -7,27 +7,27 @@  discard block
 block discarded – undo
7 7
 
8 8
 class Enquiry extends Model
9 9
 {
10
-	protected $table = 'mst_enquiries';
10
+    protected $table = 'mst_enquiries';
11 11
 
12
-	protected $fillable = [
13
-		'name',
14
-		'DOB',
15
-		'email',
16
-		'address',
17
-		'status',
18
-		'gender',
19
-		'contact',
20
-		'pin_code',
21
-		'occupation',
22
-		'start_by',
23
-		'interested_in',
24
-		'aim',
25
-		'source',
26
-		'created_by',
27
-    	'updated_by'
28
-	];
12
+    protected $fillable = [
13
+        'name',
14
+        'DOB',
15
+        'email',
16
+        'address',
17
+        'status',
18
+        'gender',
19
+        'contact',
20
+        'pin_code',
21
+        'occupation',
22
+        'start_by',
23
+        'interested_in',
24
+        'aim',
25
+        'source',
26
+        'created_by',
27
+        'updated_by'
28
+    ];
29 29
 
30
-	//Eloquence Search mapping
30
+    //Eloquence Search mapping
31 31
     use Eloquence;
32 32
 
33 33
     protected $searchableColumns = [
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
         'contact' => 20,
37 37
     ];
38 38
 
39
-	public function Followups()
40
-	{
41
-		return $this->hasMany('App\Followup');
42
-	}
39
+    public function Followups()
40
+    {
41
+        return $this->hasMany('App\Followup');
42
+    }
43 43
 
44
-	public function createdBy()
44
+    public function createdBy()
45 45
     {
46 46
         return $this->belongsTo('App\User','created_by');
47 47
     }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
     public function scopeOnlyLeads($query)
68 68
     {
69
-       return $query->where('status','=', \constEnquiryStatus::Lead)->orderBy('created_at','desc')->take(10);
69
+        return $query->where('status','=', \constEnquiryStatus::Lead)->orderBy('created_at','desc')->take(10);
70 70
     }
71 71
 
72 72
 }
73 73
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,30 +43,30 @@
 block discarded – undo
43 43
 
44 44
 	public function createdBy()
45 45
     {
46
-        return $this->belongsTo('App\User','created_by');
46
+        return $this->belongsTo('App\User', 'created_by');
47 47
     }
48 48
 
49 49
     public function updatedBy()
50 50
     {
51
-        return $this->belongsTo('App\User','updated_by');
51
+        return $this->belongsTo('App\User', 'updated_by');
52 52
     }
53 53
 
54
-    public function scopeIndexQuery($query,$sorting_field,$sorting_direction,$drp_start,$drp_end)
54
+    public function scopeIndexQuery($query, $sorting_field, $sorting_direction, $drp_start, $drp_end)
55 55
     {
56 56
         $sorting_field = ($sorting_field != null ? $sorting_field : 'created_at');
57 57
         $sorting_direction = ($sorting_direction != null ? $sorting_direction : 'desc');
58 58
 
59 59
         if ($drp_start == null or $drp_end == null) 
60 60
         {
61
-            return $query->select('id','name','contact','email','address','gender','created_at','status')->orderBy($sorting_field,$sorting_direction);
61
+            return $query->select('id', 'name', 'contact', 'email', 'address', 'gender', 'created_at', 'status')->orderBy($sorting_field, $sorting_direction);
62 62
         }
63 63
 
64
-        return $query->select('id','name','contact','email','address','gender','created_at','status')->whereBetween('created_at', [$drp_start, $drp_end])->orderBy($sorting_field,$sorting_direction);
64
+        return $query->select('id', 'name', 'contact', 'email', 'address', 'gender', 'created_at', 'status')->whereBetween('created_at', [$drp_start, $drp_end])->orderBy($sorting_field, $sorting_direction);
65 65
     }
66 66
 
67 67
     public function scopeOnlyLeads($query)
68 68
     {
69
-       return $query->where('status','=', \constEnquiryStatus::Lead)->orderBy('created_at','desc')->take(10);
69
+       return $query->where('status', '=', \constEnquiryStatus::Lead)->orderBy('created_at', 'desc')->take(10);
70 70
     }
71 71
 
72 72
 }
73 73
\ No newline at end of file
Please login to merge, or discard this patch.
app/Sms_event.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@
 block discarded – undo
11 11
 
12 12
     protected $fillable = [
13 13
             'name',
14
-    		'date',
14
+            'date',
15 15
             'message',
16 16
             'description',
17 17
             'status',
18
-    		'send_to',
19
-    		'created_by',
20
-    		'updated_by'
18
+            'send_to',
19
+            'created_by',
20
+            'updated_by'
21 21
     ];
22 22
 
23 23
     protected $dates  = ['created_at', 'updated_at', 'date'];
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     		'updated_by'
21 21
     ];
22 22
 
23
-    protected $dates  = ['created_at', 'updated_at', 'date'];
23
+    protected $dates = ['created_at', 'updated_at', 'date'];
24 24
 
25 25
     //Eloquence Search mapping
26 26
     use Eloquence;
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function createdBy()
35 35
     {
36
-        return $this->belongsTo('App\User','created_by');
36
+        return $this->belongsTo('App\User', 'created_by');
37 37
     }
38 38
 
39 39
     public function updatedBy()
40 40
     {
41
-        return $this->belongsTo('App\User','updated_by');
41
+        return $this->belongsTo('App\User', 'updated_by');
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     public function map(Router $router)
39 39
     {
40
-        $router->group(['namespace' => $this->namespace], function ($router) {
40
+        $router->group(['namespace' => $this->namespace], function($router) {
41 41
             require app_path('Http/routes.php');
42 42
         });
43 43
     }
Please login to merge, or discard this patch.
app/ExpenseCategory.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
     protected $fillable = [
13 13
             'name',
14 14
             'total_expense',
15
-    		'status',
16
-    		'created_by',
17
-    		'updated_by'
15
+            'status',
16
+            'created_by',
17
+            'updated_by'
18 18
     ];
19 19
 
20 20
     public function scopeExcludeArchive($query)
21 21
     {
22
-       return $query->where('status','!=', \constStatus::Archive);
22
+        return $query->where('status','!=', \constStatus::Archive);
23 23
     }
24 24
 
25 25
     public function Expenses()
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,21 +19,21 @@
 block discarded – undo
19 19
 
20 20
     public function scopeExcludeArchive($query)
21 21
     {
22
-       return $query->where('status','!=', \constStatus::Archive);
22
+       return $query->where('status', '!=', \constStatus::Archive);
23 23
     }
24 24
 
25 25
     public function Expenses()
26 26
     {
27
-        return $this->hasMany('App\Expense','category_id');
27
+        return $this->hasMany('App\Expense', 'category_id');
28 28
     }
29 29
 
30 30
     public function createdBy()
31 31
     {
32
-        return $this->belongsTo('app\User','created_by');
32
+        return $this->belongsTo('app\User', 'created_by');
33 33
     }
34 34
 
35 35
     public function updatedBy()
36 36
     {
37
-        return $this->belongsTo('app\User','updated_by');
37
+        return $this->belongsTo('app\User', 'updated_by');
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
app/User.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,12 +43,12 @@
 block discarded – undo
43 43
     public function registerMediaConversions()
44 44
     {
45 45
         $this->addMediaConversion('thumb')
46
-             ->setManipulations(['w' => 50, 'h' => 50, 'q' => 100, 'fit' => 'crop'])
47
-             ->performOnCollections('staff');
46
+                ->setManipulations(['w' => 50, 'h' => 50, 'q' => 100, 'fit' => 'crop'])
47
+                ->performOnCollections('staff');
48 48
 
49 49
         $this->addMediaConversion('form')
50
-             ->setManipulations(['w' => 70, 'h' => 70, 'q' => 100, 'fit' => 'crop'])
51
-             ->performOnCollections('staff');
50
+                ->setManipulations(['w' => 70, 'h' => 70, 'q' => 100, 'fit' => 'crop'])
51
+                ->performOnCollections('staff');
52 52
     }
53 53
 
54 54
     public function scopeExcludeArchive($query)
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * @var array
32 32
      */
33
-    protected $fillable = ['name', 'email', 'password','status'];
33
+    protected $fillable = ['name', 'email', 'password', 'status'];
34 34
 
35 35
     /**
36 36
      * The attributes excluded from the model's JSON form.
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
     {
56 56
         if (Auth::User()->id != 1) 
57 57
         {
58
-            return $query->where('status','!=', \constStatus::Archive)->where('id','!=',1);
58
+            return $query->where('status', '!=', \constStatus::Archive)->where('id', '!=', 1);
59 59
         }
60 60
 
61
-        return $query->where('status','!=', \constStatus::Archive);
61
+        return $query->where('status', '!=', \constStatus::Archive);
62 62
     }
63 63
 
64 64
     public function Role_user()
Please login to merge, or discard this patch.