Posts by Matheus de Melo .F • 143 points
15 posts
-
0
votes1
answer68
viewsQ: "The command 'migrate:Fresh' does not exist." in a unit test (phpunit) in Laravel
I am creating unit tests on my system using Sqlite (in memory), but whenever I try to run them, they return the error: 1) Tests\Unit\UserTest::testUserCreate…
-
0
votes1
answer180
viewsQ: Integrity Constraint Violation in "Many to Many" create - Laravel
Context: When registering a company, by being "attached" several customers to it and that same customer can be "attached" in other companies. I have the following database structure: Model "Client":…
-
0
votes1
answer43
viewsQ: Transform hexcode "+" into "+" in Javascript
I am using a payment API that requires the phone numbers reported to be in E.164 default (+[Código do país][código da cidade][numero de 8~9 dígitos]) and as a string (as in the example below).…
-
0
votes1
answer203
viewsQ: Problems authenticating users of different types - Laravel
In my system I have two models, the User (User) and the Client (Client), each type of user will have their roles defined. Example: User: Administrator Official Client: Manager Accountant Human…
-
0
votes0
answers58
viewsQ: 'redirectToRoute' with query Parameters - Symfony2
I have a route /curso/{slug} which makes a 301 redirect to another route. That route /curso/{slug} can receive some parameters per query (example: /curso/{slug}?query=1234), but redirect to the…
-
1
votes1
answer1557
viewsQ: Undefined offset 0 - Laravel
I have a list of users, each user has their 'role' (role/function within the system, such as 'user' and 'admin') and this role has to be shown on the user listing screen, which I did using the code…
-
1
votes0
answers436
viewsQ: Error adding Constraint (General error 1215) - Orange
I am trying to create two related tables. When trying to 'migrate' them, the error is returned: "SQLSTATE[HY000]: General error: 1215 Cannot add Foreign key Constraint (SQL: alter table 'Companies'…
-
0
votes1
answer40
viewsQ: Linked datepicker with Jquery
I have a form with a date period ('Start Date' and 'End Date'). The start date may not be less than the end date and the end date may not be less than the start date. These inputs are using the…
-
5
votes1
answer486
viewsQ: Applying datepicker to a dynamic input with Jquery
I have a form where you can add several fields with datepicker. However, when adding a new field to the form, the Jquery datepicker is not loaded. This is the JS responsible for cloning and adding…
-
0
votes1
answer43
viewsQ: Print output of CRON in the terminal - Laravel
I created a CRON on Laravel and wanted to print information on the terminal where the command is running (Ubuntu terminal, in this case). What is the command for this in the Laravel? Example: public…
-
1
votes1
answer728
viewsQ: Dynamically add form fields in Laravel
I have a company registration form, within this register, the company can have 'n' certificates. These certificates should be added to the form as required. How can I do this in Laravel? I’ve tried…
-
1
votes1
answer157
viewsQ: Capturing "radio" input data and transforming into JSON
(This project is being developed with Spring Boot + Thymeleaf) I have an html page that will work as a questionnaire containing about 100 questions (the code below is just an example). Each question…
-
0
votes0
answers442
viewsQ: Error "Concurrentmodificationexception" when modifying (insert data into) Arraylist
I am trying to create a small login system in Java. I have the following classes: Logincontroller: public static void main(String[] args) { ArrayList<Usuario> listaUsuarios =…
-
1
votes2
answers150
viewsQ: Query with JOIN in 3 tables
I have the following tables: livroautor id idautor idlivro ------ ------- --------- 1 1 (NULL) 2 2 2 3 3 3 4 4 4 5 5 5 6 6 (NULL) 7 7 5 8 8 2 9 9 2 10 10 (NULL) book id titulo resumo isbn paginas…
-
2
votes1
answer595
viewsQ: Error during DELETE: You can’t specify target table '...' for update in FROM clause
I’m trying to delete data (where the stock is equal to zero and the discount value is less than the total discount value average) with this query: DELETE FROM veiculo WHERE estoquetotal = 0 AND…