Skip to content

Instantly share code, notes, and snippets.

@danilosantosdev
Created November 19, 2014 14:33
Show Gist options
  • Save danilosantosdev/1ebc7b90d3862006f2bc to your computer and use it in GitHub Desktop.
Save danilosantosdev/1ebc7b90d3862006f2bc to your computer and use it in GitHub Desktop.
Tentando acessar o método
// CONSTRUTOR
public function __construct(InvoiceInterface $invoice, InvoiceForm $invoiceForm, EditInvoiceForm $editInvoiceForm)
{
parent::__construct();
Breadcrumbs::addCrumb(trans('pages.allinvoice'), route('invoices.index'));
$this->invoice = $invoice;
$this->invoiceForm = $invoiceForm;
$this->editInvoiceForm = $editInvoiceForm;
$this->beforeFilter('auth');
$this->beforeFilter('can_access', ['only' => ['generate']]);
}
// MÉTODO QUE ESTOU TENTANDO ACESSAR
public function generate(){
$dia = date("d");
if ($dia == 1 || $dia == 01){
$contracts = DB::table('contracts')
->select('id', 'id_student', 'valor')
->get();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment