Questions tagged as 'laravel-5'

1
answer

Is this object only available when I give dd ()?

I'm setting an attribute of an array, it's only accessible when I give dd() as follows: dd($categoria->categoria->NmCategoria) It works if I do it the natural way like this: @foreach($subcategorias as $categoria) <tr&...
asked by 19.10.2016 / 02:27
1
answer

Receiving an ajax request with laravel

I'm having trouble retrieving the data sent by my ajax to laravel . My ajax looks like this: var id = $(this).siblings(':hidden').val(), qtd = $(this).val(), dataUser = { "id": id, "qtd": qtd}; $.ajax({ type: 'POS...
asked by 20.10.2016 / 02:16
1
answer

Error while mounting Foreach Laravel 5.1

I'm trying to mount a filter where I'm looking for some options from the DB I made a foreach to bring this data from the DB but it's bringing an error: Trying to get property of non-object Follow my code: Controller public...
asked by 29.06.2016 / 22:16
1
answer

Is there any way to define a specific Title in the Laravel routes?

In%% 5, I'm creating a menu dynamically by making a Laravel in the list of registered routes. So, I can have a menu displayed every time a new route is created, however I'm only listing those that foreach the contém metho...
asked by 26.04.2016 / 22:31
1
answer

Search Cep in another bank in Laravel 5 [duplicate]

I'm doing a registration system using Laravel 5, I created the client schema, with some tables, such as person, address, email, phone. happens I have another bank, called zip, where it has some tables like street, us, neighborhood, city. I am...
asked by 25.04.2016 / 16:23
1
answer

Laravel - Do I do an action @list for each Controller or a Controller 'listController' receiving parameters?

I have an administrative panel with several areas of your item listings for each table itself. What's best to do: A action 'list' for each Controller responsible for each area: class aController extends Controller{ public function li...
asked by 25.04.2016 / 22:11
1
answer

How to make a "select distinct" in a model in Laravel?

I'm pulling data from a table to a select , however I have fields where information is the same, for example: Controller: $amostragens = Amostragem::all(); View: @foreach($amostragens as $amostragem) <option value="{{...
asked by 02.05.2016 / 21:22
1
answer

Sorting the results of a query - Laravel 5.1

I currently have a code that receives data from the registered companies and for each company it lists the reports of them as follows: @foreach($empresas as $empresa) // Recebe as empresas @foreach($empresa->CgrtInfo as $relatorio) // Bu...
asked by 29.01.2016 / 13:53
1
answer

Laravel - Save data in the database only if there is no ...

I have a person registration system and there is an area with several checkbox fields that represent the social groups that the current person represents: TABLES person id | nome 1 | João 2 | Maria 3 | Ana group id | grupo...
asked by 30.05.2016 / 18:27
1
answer

Creating and using Libraries in Laravel 5.1

I'm new to Laravel 5.1 (I come from CodeIgniter) and I have libraries of my own that I'd like to implement in it. In CodeIgniter, we have the folder libraries where I can play all my libraries there and if in case I need the same just nee...
asked by 30.12.2015 / 12:05