@@ -43,12 +43,12 @@ |
||
| 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) |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * |
| 31 | 31 | * @var array |
| 32 | 32 | */ |
| 33 | - protected $fillable = ['name', 'email', 'password','status','photo']; |
|
| 33 | + protected $fillable = ['name', 'email', 'password', 'status', 'photo']; |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * The attributes excluded from the model's JSON form. |
@@ -55,10 +55,10 @@ discard block |
||
| 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() |
@@ -9,11 +9,11 @@ |
||
| 9 | 9 | protected $table = 'trn_access_log'; |
| 10 | 10 | |
| 11 | 11 | protected $fillable = [ |
| 12 | - 'user_id', |
|
| 13 | - 'action', |
|
| 14 | - 'module', |
|
| 15 | - 'record', |
|
| 16 | - 'created_at' |
|
| 12 | + 'user_id', |
|
| 13 | + 'action', |
|
| 14 | + 'module', |
|
| 15 | + 'record', |
|
| 16 | + 'created_at' |
|
| 17 | 17 | ]; |
| 18 | 18 | |
| 19 | 19 | public $timestamps = false; |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | * @return mixed |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | - public function handle($request, Closure $next,$permissions) |
|
| 17 | + public function handle($request, Closure $next, $permissions) |
|
| 18 | 18 | { |
| 19 | 19 | if (!Auth::User()->can($permissions)) |
| 20 | 20 | { |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | |
| 18 | 18 | try { |
| 19 | 19 | // attempt to verify the credentials and create a token for the user |
| 20 | - if (! $token = JWTAuth::attempt($credentials)) { |
|
| 20 | + if (!$token = JWTAuth::attempt($credentials)) { |
|
| 21 | 21 | return response()->json(['error' => 'invalid_credentials'], 401); |
| 22 | 22 | } |
| 23 | 23 | } catch (JWTException $e) { |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | { |
| 15 | 15 | $expenseCategories = expenseCategory::excludeArchive()->get(); |
| 16 | 16 | |
| 17 | - return response()->json($expenseCategories); |
|
| 17 | + return response()->json($expenseCategories); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | public function show($id) |
@@ -10,17 +10,17 @@ |
||
| 10 | 10 | |
| 11 | 11 | class PaymentsController extends Controller |
| 12 | 12 | { |
| 13 | - public function index() |
|
| 14 | - { |
|
| 15 | - $payment_details = payment_detail::all(); |
|
| 13 | + public function index() |
|
| 14 | + { |
|
| 15 | + $payment_details = payment_detail::all(); |
|
| 16 | 16 | |
| 17 | - return response()->json($payment_details); |
|
| 18 | - } |
|
| 17 | + return response()->json($payment_details); |
|
| 18 | + } |
|
| 19 | 19 | |
| 20 | - public function show($id) |
|
| 21 | - { |
|
| 22 | - $payment_detail = payment_detail::findOrFail($id); |
|
| 20 | + public function show($id) |
|
| 21 | + { |
|
| 22 | + $payment_detail = payment_detail::findOrFail($id); |
|
| 23 | 23 | |
| 24 | - return response()->json($payment_detail); |
|
| 25 | - } |
|
| 24 | + return response()->json($payment_detail); |
|
| 25 | + } |
|
| 26 | 26 | } |
| 27 | 27 | \ No newline at end of file |
@@ -10,31 +10,31 @@ |
||
| 10 | 10 | |
| 11 | 11 | class SubscriptionsController extends Controller |
| 12 | 12 | { |
| 13 | - public function index() |
|
| 14 | - { |
|
| 15 | - $subscriptions = subscription::all(); |
|
| 13 | + public function index() |
|
| 14 | + { |
|
| 15 | + $subscriptions = subscription::all(); |
|
| 16 | 16 | |
| 17 | - return response()->json($subscriptions); |
|
| 18 | - } |
|
| 17 | + return response()->json($subscriptions); |
|
| 18 | + } |
|
| 19 | 19 | |
| 20 | - public function expiring() |
|
| 21 | - { |
|
| 22 | - $expiring = subscription::expiring()->get(); |
|
| 20 | + public function expiring() |
|
| 21 | + { |
|
| 22 | + $expiring = subscription::expiring()->get(); |
|
| 23 | 23 | |
| 24 | - return response()->json($expiring); |
|
| 25 | - } |
|
| 24 | + return response()->json($expiring); |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - public function expired() |
|
| 28 | - { |
|
| 29 | - $expired = subscription::expired()->get(); |
|
| 27 | + public function expired() |
|
| 28 | + { |
|
| 29 | + $expired = subscription::expired()->get(); |
|
| 30 | 30 | |
| 31 | - return response()->json($expired); |
|
| 32 | - } |
|
| 31 | + return response()->json($expired); |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | - public function show($id) |
|
| 35 | - { |
|
| 36 | - $subscription = subscription::findOrFail($id); |
|
| 34 | + public function show($id) |
|
| 35 | + { |
|
| 36 | + $subscription = subscription::findOrFail($id); |
|
| 37 | 37 | |
| 38 | - return response()->json($subscription); |
|
| 39 | - } |
|
| 38 | + return response()->json($subscription); |
|
| 39 | + } |
|
| 40 | 40 | } |
| 41 | 41 | \ No newline at end of file |
@@ -10,45 +10,45 @@ |
||
| 10 | 10 | |
| 11 | 11 | class InvoicesController extends Controller |
| 12 | 12 | { |
| 13 | - public function index() |
|
| 14 | - { |
|
| 15 | - $invoices = invoice::all(); |
|
| 13 | + public function index() |
|
| 14 | + { |
|
| 15 | + $invoices = invoice::all(); |
|
| 16 | 16 | |
| 17 | - return response()->json($invoices); |
|
| 18 | - } |
|
| 17 | + return response()->json($invoices); |
|
| 18 | + } |
|
| 19 | 19 | |
| 20 | - public function show($id) |
|
| 21 | - { |
|
| 22 | - $invoice = invoice::findOrFail($id); |
|
| 20 | + public function show($id) |
|
| 21 | + { |
|
| 22 | + $invoice = invoice::findOrFail($id); |
|
| 23 | 23 | |
| 24 | - return response()->json($invoice); |
|
| 25 | - } |
|
| 24 | + return response()->json($invoice); |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - public function unpaid() |
|
| 27 | + public function unpaid() |
|
| 28 | 28 | { |
| 29 | - $invoices = Invoice::where('status',0)->get(); |
|
| 29 | + $invoices = Invoice::where('status',0)->get(); |
|
| 30 | 30 | |
| 31 | - return response()->json($invoices); |
|
| 31 | + return response()->json($invoices); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public function paid() |
| 35 | 35 | { |
| 36 | - $invoices = Invoice::where('status',1)->get(); |
|
| 36 | + $invoices = Invoice::where('status',1)->get(); |
|
| 37 | 37 | |
| 38 | - return response()->json($invoices); |
|
| 38 | + return response()->json($invoices); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | public function partial() |
| 42 | 42 | { |
| 43 | - $invoices = Invoice::where('status',2)->get(); |
|
| 43 | + $invoices = Invoice::where('status',2)->get(); |
|
| 44 | 44 | |
| 45 | - return response()->json($invoices); |
|
| 45 | + return response()->json($invoices); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function overpaid() |
| 49 | 49 | { |
| 50 | - $invoices = Invoice::where('status',3)->get(); |
|
| 50 | + $invoices = Invoice::where('status',3)->get(); |
|
| 51 | 51 | |
| 52 | - return response()->json($invoices); |
|
| 52 | + return response()->json($invoices); |
|
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | \ No newline at end of file |
@@ -26,28 +26,28 @@ |
||
| 26 | 26 | |
| 27 | 27 | public function unpaid() |
| 28 | 28 | { |
| 29 | - $invoices = Invoice::where('status',0)->get(); |
|
| 29 | + $invoices = Invoice::where('status', 0)->get(); |
|
| 30 | 30 | |
| 31 | 31 | return response()->json($invoices); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public function paid() |
| 35 | 35 | { |
| 36 | - $invoices = Invoice::where('status',1)->get(); |
|
| 36 | + $invoices = Invoice::where('status', 1)->get(); |
|
| 37 | 37 | |
| 38 | 38 | return response()->json($invoices); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | public function partial() |
| 42 | 42 | { |
| 43 | - $invoices = Invoice::where('status',2)->get(); |
|
| 43 | + $invoices = Invoice::where('status', 2)->get(); |
|
| 44 | 44 | |
| 45 | 45 | return response()->json($invoices); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function overpaid() |
| 49 | 49 | { |
| 50 | - $invoices = Invoice::where('status',3)->get(); |
|
| 50 | + $invoices = Invoice::where('status', 3)->get(); |
|
| 51 | 51 | |
| 52 | 52 | return response()->json($invoices); |
| 53 | 53 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | { |
| 15 | 15 | $expenses = expense::all(); |
| 16 | 16 | |
| 17 | - return response()->json($expenses); |
|
| 17 | + return response()->json($expenses); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | public function show($id) |