Questions tagged as 'laravel'

1
answer

Mutator as Default Attribute

I have a mutator similar to this: public function getLastTotalAttribute() { return $this->produto->sold_on_register; } I want the last_total attribute to be automatically generated in the query, as well as the common attributes of...
asked by 21.03.2018 / 18:36
1
answer

Function AngularJS is not respecting the condition!

I have this function, which gets two parameters, however, when I pass the different name, it falls into if in the same way. $scope.deleteCategory = function(id, nome) { if(nome == 'Despesas Administrativas' || 'Despesas com Empreg...
asked by 07.05.2018 / 15:26
1
answer

Load dynamic content in navbar

I have a select in the navbar with the cities registered in the bank. For this I am using ajax to load them. But I wanted a solution without needing to use ajax , but also without having to mount the query on each method that points...
asked by 18.03.2018 / 13:13
1
answer

How to determine the most suitable data type for a fixed-size numeric field?

I have a question about the characteristics of some attributes of my table. Problem: I have to store an identification number of my items, this is always composed of 3 digits (zero left in case of numbers less than 3 digits). I can literally...
asked by 20.03.2018 / 15:55
1
answer

Sending two or more request by form with ajax or HTML

Good afternoon people, I want to know how I can send more than one form request to my Controller to make the relationship in the bank? I have a N: M relationship with User and Group, but when I submit it on the form it only considers one valu...
asked by 12.03.2018 / 17:48
2
answers

Error in customizing the default user registry Laravel Auth

Error after registering and redirecting PS: it does the registration normally, and I can access normally, but this error always! I MAKE A MODIFICATION ONLY IN THE USER REGISTRATION, MAKE THE PARAMETERIZATION OF MY MANY TO MANY R...
asked by 08.03.2018 / 13:26
1
answer

What is the real benefit of using Controller Resource in Laravel?

What is the real benefit of using Controller Resource in Laravel? It is possible to observe that the route file gets cleaner, since the controller methods are called based on the call verbs and routes, but the only benefit would be an organizati...
asked by 17.03.2018 / 00:01
1
answer

Use field returned from find to add more results in same query

In the code below I look for a product and get its "related" field to search the bank for all products (including itself) that have the same value in that field. Is it possible to do all this with just one query instead of two? $produto =...
asked by 03.03.2018 / 03:10
1
answer

Transaction in different banks

In a certain part of the system I need to do transaction control, but this operation involves tables that are in different databases. I made a test by inserting two tables into different banks and at the end of them doing a rollback , a...
asked by 13.02.2018 / 13:56
1
answer

Pass array on route Laravel

I need to pass an array to a controller. I made the form below but I get the error: Missing required parameters for [Route: site.add.cart] [URI: adiciona-carrinho/{product}/{option}]. (View: /var/www/html/ecommerce/resources/views/site/pages/p...
asked by 09.02.2018 / 02:31