PHP Class App\Http\Controllers\CreditController

Inheritance: extends BaseController
ファイルを表示 Open project: hillelcoren/invoice-ninja Class Usage Examples

Protected Properties

Property Type Description
$creditRepo
$creditService
$entityType

Public Methods

Method Description
__construct ( CreditRepository $creditRepo, CreditService $creditService )
bulk ( )
create ( App\Http\Requests\CreditRequest $request )
getDatatable ( $clientPublicId = null )
index ( ) : Response Display a listing of the resource.
store ( App\Http\Requests\CreateCreditRequest $request ) * public function edit($publicId) { $credit = Credit::scope($publicId)->firstOrFail();

Method Details

__construct() public method

public __construct ( CreditRepository $creditRepo, CreditService $creditService )
$creditRepo App\Ninja\Repositories\CreditRepository
$creditService App\services\CreditService

bulk() public method

public bulk ( )

create() public method

public create ( App\Http\Requests\CreditRequest $request )
$request App\Http\Requests\CreditRequest

getDatatable() public method

public getDatatable ( $clientPublicId = null )

index() public method

Display a listing of the resource.
public index ( ) : Response
return Response

store() public method

$this->authorize('edit', $credit); $credit->credit_date = Utils::fromSqlDate($credit->credit_date); $data = array( 'client' => null, 'credit' => $credit, 'method' => 'PUT', 'url' => 'credits/'.$publicId, 'title' => 'Edit Credit', 'clients' => Client::scope()->with('contacts')->orderBy('name')->get(), ); return View::make('credit.edit', $data); }
public store ( App\Http\Requests\CreateCreditRequest $request )
$request App\Http\Requests\CreateCreditRequest

Property Details

$creditRepo protected_oe property

protected $creditRepo

$creditService protected_oe property

protected $creditService

$entityType protected_oe property

protected $entityType