Questions tagged as 'laravel'

1
answer

Display options with multiple select and check the options chosen in Laravel

I have a collection in the variable $paymentMethods with forms of payment: AndIhaveanothercollectioninthe$timelinesvariablethathasaManytoManyrelationshipwiththepaymentmethods.Ineedtolistintheviewinaselecttheformsofpaymentavailableandm...
asked by 12.12.2017 / 22:57
1
answer

Use the laravel diff in two collections

I'm trying to fetch items that are not in a particular product. I have, therefore, a model Produto , each product has several items, and another model Item . I'm trying to use Laravel's collections , more specifically the d...
asked by 11.12.2017 / 01:56
1
answer

Relate 4 bank tables and perform accounts

Hello I have 4 tables: Officials, Companies, Salaries and Discounts. I would like to introduce a kind of Holerite. My initial idea was to bring all the information together and treat the view as follows: (NOTE: I'm using laravel blade) @for...
asked by 04.01.2018 / 00:55
1
answer

Problem in Query Builder Laravel

I am in doubt about a query with joins in my project, when running Select directly in the database I have no problems, but when building with Query Builder, I do not get results. Where would he be missing out on her set up? Normal Query:...
asked by 04.01.2018 / 01:34
1
answer

Best way to generate Holerite, I look for a more viable solution

I developed an application that generates Holerites, and for that I need to treat data coming from 4 tables.    Officials - > Companies - > Maturities - > Discounts I want to show my user this way for example:    Rafael works...
asked by 04.01.2018 / 19:45
1
answer

ORDER BY in string date

I have a table in the database, novidades , where I have a column named date is to be stored as string in dd-mm-yyyy format, but I would like to sort by date based on this value , I calculate that you have to convert to da...
asked by 27.11.2017 / 14:32
1
answer

Find the best selling products (laravel / eloquent)

In laravel, supposing there is a 'Product' model (whose table is products), an 'Account' model (whose table is accounts), and an N: N relationship between accounts and products, in the table_product table, find an elegant way to fetch the 5 best...
asked by 28.11.2017 / 14:26
1
answer

l5-repository Package Validators

1st Is it possible to validate using the package itself? Currently, I use the package just to return the rules, eg: Validator::make($data, $this->getRules())->validate(); Onde: $data: São os meus dados que vieram do HTML. $this->ge...
asked by 28.11.2017 / 13:17
1
answer

Insert SQLite using an array - PHP / Laravel

I have the following array : array:30 [▼ 0 => "12933" 1 => "12931" 2 => "12930" 3 => "12929" 4 => "12928" 5 => "12927" 6 => "12926" 7 => "12925" 8 => "12924" 9 => "12923" 10 => "1292...
asked by 15.11.2017 / 17:46
2
answers

Parameter passage laravel

How do I step 2 or more variables on the route? View <a href="{{route('transferir.edit', [$destino->servidor->idservidor, $destino->setor])}}" class="btn btn-default btn-xs" role="button"><span class="glyphicon glyphicon-r...
asked by 14.11.2017 / 16:48