Skip to content

Instantly share code, notes, and snippets.

@danilosantosdev
danilosantosdev / AppServiceProvider.php
Created October 25, 2017 05:05
Code to change "path.public" to "public_html" on Laravel 5.4
public function register()
{
if (\App::environment('production')) {
$this->app->bind('path.public', function() {
return base_path().'/../public_html';
});
}
}
$buscas_agrupadas_clique = $this->Busca->find("all", array("conditions" => $conditions, "order" => "Busca.id DESC", "group" => "Busca.clique_id" ));
$buscas = array();
foreach($buscas_agrupadas_clique as $index => $bac):
$buscas[] = $this->Busca->find("all", array(
"conditions" => array(
"Busca.clique_id" => $bac["Busca"]["clique_id"]
)
));
$buscas_agrupadas_clique[$index]['Busca']['companhias'] = @$buscas[$index][0]['Busca']['companhia_aerea'] . ", " . @$buscas[$index][1]['Busca']['companhia_aerea'] . ", " . @$buscas[$index][2]['Busca']['companhia_aerea'];
@danilosantosdev
danilosantosdev / method
Created November 19, 2014 14:33
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;
{{Form::select('classroom',
array('Alunos' => $students, 'Turmas' => $classrooms), 'null',
array('id'=>'classroom', 'class'=>'form-control chosen-select', 'multiple'=>'true',
'data-placeholder'=>trans('words.select') .'...')
)
}}