Skip to content

Commit

Permalink
fixed code an namings
Browse files Browse the repository at this point in the history
  • Loading branch information
checkitsedo committed Dec 23, 2019
1 parent a99c44b commit 5e4554f
Show file tree
Hide file tree
Showing 5 changed files with 274 additions and 281 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"license": "MIT",
"authors": [
{
"name": "John Doe",
"email": "john@doe.com"
"name": "checkitsedo",
"email": "checkitsedo@mail.com"
}
],
"minimum-stability": "stable",
"require": {
"apphostbd/laravel-fpdf": "^1.0",
"checkitsedo/laravel-fpdf": "^1.0",
"laravel/ui": "^1.1"
},
"autoload": {
Expand Down
18 changes: 12 additions & 6 deletions src/Controllers/EsrpaymentslipController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Checkitsedo\Esrpaymentslip\Controllers;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Checkitsedo\Esrpaymentslip\Esrpaymentslip;
use EsrpaymentslipHelper;
use Checkitsedo\Esrpaymentslip\Pdf\Download;
use EsrpaymentslipHelper;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class EsrpaymentslipController extends Controller
{
Expand Down Expand Up @@ -78,7 +78,7 @@ public function show(Esrpaymentslip $esrpaymentslip, $id)
/**
* Show the form for editing the specified resource.
*
* @param \App\Esrpaymentslip $esrpaymentslip
* @param \Checkitsedo\Esrpaymentslip $esrpaymentslip
* @return \Illuminate\Http\Response
*/
public function edit(Esrpaymentslip $esrpaymentslip, $id)
Expand All @@ -91,7 +91,7 @@ public function edit(Esrpaymentslip $esrpaymentslip, $id)
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Esrpaymentslip $esrpaymentslip
* @param \Checkitsedo\Esrpaymentslip $esrpaymentslip
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
Expand Down Expand Up @@ -141,7 +141,7 @@ public function update(Request $request, $id)
/**
* Remove the specified resource from storage.
*
* @param \App\Esrpaymentslip $esrpaymentslip
* @param \Checkitsedo\Esrpaymentslip $esrpaymentslip
* @return \Illuminate\Http\Response
*/
public function destroy(Esrpaymentslip $esrpaymentslip, $id)
Expand All @@ -153,6 +153,12 @@ public function destroy(Esrpaymentslip $esrpaymentslip, $id)
->with('success','ESR Payment Slip deleted successfully');
}

/**
* Download the specified resource as PDF-File.
*
* @param \Checkitsedo\Esrpaymentslip $esrpaymentslip
* @return \Illuminate\Http\Response
*/
public function download($id)
{
$esrpaymentslip = Esrpaymentslip::find($id);
Expand Down
4 changes: 2 additions & 2 deletions src/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Checkitsedo\Esrpaymentslip\Controllers;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Checkitsedo\Esrpaymentslip\Home;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class HomeController extends Controller
{
Expand Down
7 changes: 6 additions & 1 deletion src/Helpers/EsrpaymentslipHelper.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
<?php
//packages/chceckitsedo/esrpaymentslip/src/Helpers/EsrpaymentslipHelper.php

namespace Checkitsedo\Esrpaymentslip\Helpers;

use Illuminate\Support\Facades\DB;

class EsrpaymentslipHelper
{
/**
* Convert invoice number from alpha-numeric to numeric (A=1, B=2, C=3, ...)
* @param string $text
* @return bool
*/
public static function calculateReference($text)
{
$invoiceNumber = $text;
Expand Down
Loading

0 comments on commit 5e4554f

Please sign in to comment.