Most voted "controller" questions
A Controller is responsible for controlling the entire flow of information passing through the site/system. It is part of the MVC standard.
Learn more…192 questions
Sort by count of
-
0
votes1
answer27
viewsReceive integer value in field view
Guys, I need some help from you. In my system I created a modal with data viewing pulling from the database. I need one of these data to display only the integer numbers, as an example in the photo.…
-
0
votes1
answer78
viewsGetting nested Sources in the Rails controller
Good evening, this is my first post here, I’m learning to use the tool, sorry if I did something wrong. But here’s the problem... I’m trying to make a clone of "Trello" in Rails for a college…
-
0
votes1
answer150
viewsReduce function in controller
I wonder if you have how to rewrite the function below in a cleaner way without so many if / elseif. public function pesquisa(Request $request) { if (! Gate::allows('celular')) { return abort(401);…
-
0
votes1
answer426
viewsHow to create a controller with data from another table in ASP.NET?
I don’t know how to properly create an Employee Controller. The Employee class is linked to three others, being CBO, Company and Department. So in the database schema, they get these three primary…
-
0
votes1
answer99
viewsCan I call a class that only does a controller’s record?
I have a class of an android application that does only user registration and I called it Usuariocontroller. According to my controller, it communicates between view and model, but since the class…
-
0
votes1
answer314
viewsPHP MVC - How to run Model methods?
Good afternoon! How do I execute a method of the Model class, in specifying an insertion method to the BD, in case I need to send the Form data. This is the form in View (sector.php): <form…
-
0
votes1
answer158
viewsHow to call my view Asp.Net MVC with ajax
I am starting my studies with Asp.Net MVC and I am able to call a view from the main menu. I have an initial view "_Layout" with the following menu item: <li> <input type="radio"…
-
0
votes1
answer25
viewsPage loads before firebase data returns.
I am with a controller, where I search data firebase, but when doing this search the code suffers a delay and the page is loaded before with empty data before the query actually ends. My controller…
-
0
votes2
answers54
viewsProblem in the JSP Controller class
Hello, I need help, I have the problem in my system when I send an edit command. When I click on the edit button of the table row that I want, the screen turns white and does not show the options to…
-
0
votes1
answer1597
viewsHTTP Status 400 - Bad Request - Spring MVC
When trying to call a Controller method this returns the error below: HTTP Status 400 - Bad Request Type Status Report Description The server cannot or will not process the request due to Something…
-
0
votes0
answers82
viewsI cannot pass view parameters to controller in MVC using URL
I’m doing an MVC project and I’m not getting through to Controller the parameter window that is coming up to View. I’ll pass the two classes, if you need more information see edit here: List…
-
0
votes2
answers2517
viewsPass Data Via Ajax to the ASP.NET CORE C#MVC Controller
Hello, I’m beginner in programming, and I’m trying to pass data via Ajax to my Controller, to be honest I’m just studying so I don’t even know for sure understand the advantages of Jquery for…
-
0
votes1
answer332
viewsProblem accessing a controller in CODEIGNITER php
I have a View with a nav-link: href= echo base_url("application/controllers/Login_controller.php") By clicking I am redirected to the correct path.…
-
0
votes0
answers58
viewsHTML tags not recognized
Hello, I’m making a code with java and html and I need to make a list with Objects from Controller. I’m trying to use the tag <li> but instead of forming a list he prints out the <li>,…
-
0
votes2
answers145
viewsProblem with table data insertion via Aravel
I have a project in Laravel at the same time I learn to use the framework, I need to insert a certain value in a table field, for this there is a condition I put in the controller: public function…
-
0
votes1
answer54
viewsReturn data in a DIV (Codeigniter)
I have a view where her code is as follows:: <section> <h1 class="text-center">Marcação de Fotos</h1> <?php echo form_open('admin/exibe_fotos/index'); ?> <label…
-
0
votes1
answer56
viewsProblems with PHP Array
I’m trying to work with arrays but I’m having difficulty accessing the items or they see grouped or they generate several arrays, which I can’t access. CONTROLLER $listaDescontos =…
-
0
votes1
answer65
views@Restcontroller returns to same page but with different URL
I’m using @Restcontroller to manage different Forms/actions on the same page (with Thymeleaf), and it’s working properly, but when calling method (triggered via button on page) when returning to the…
-
0
votes1
answer259
viewsHow to test Controller with Junit?
I’m testing the URL like this package br.com.aluguel.de.carros.unidade.usuario; import br.com.aluguel.de.carros.endereco.Endereco; import br.com.aluguel.de.carros.usuario.Usuario; import…
-
0
votes5
answers195
viewsSending view string to controller via Ajax. Codeigniter, javascript and php
I’m trying to send information that is in the javascript code block to my controller, but I’m not sure how to capture the information in my controller. Follow view Javascript code: <script…
-
0
votes1
answer481
viewsExpress Validator in controller
Hello. I use the Validator express in the nodejs and I’m having a validation problem. When I was validating directly through the routes, the validation was working, however, when I implemented…
-
0
votes2
answers172
viewsForeach in Laravel only returns the first line
I got Following code down on Laravel 7 My controller is taking the many relationship to one as per the model below: public function listarPermissoes() { return $this->hasMany(Acoes::class,…
-
0
votes2
answers37
viewsHow to pass method objects that are in different controllers in Laravel?
Good night. What I need is to display the name of the book where your id is (in the Form Book column). And so that I don’t do it in a way outside the convention, I’d like to know the right way to do…
-
0
votes1
answer123
viewsPass Data to other Javafx screens
People who work with Javafx, I need a lot of help, I’m trying to pass data from one screen to another but I can’t. In my project I log in with a user searching in the database. Each user has one id.…
-
0
votes1
answer76
viewsHow to organize Services and Repositories in a MVC application?
I have a REST API application in Nodejs already organized in MVC, but I still don’t understand how to use the services and repositories in practice. Please help me to separate the layers? //MODEL…
-
0
votes0
answers20
viewsASP.NET Index (Controller) method that only runs when I want
good night. First I apologize for the ignorance, I am beginner as a developer. From what I understand of ASP.NET, it will automatically run all void methods of my index when this index is called.…
-
0
votes1
answer32
viewsBringing a Controller Query to the View
I’m starting to venture out and learn about MVC and C#. I created a movie catalog application with a tutorial, where I have a table in the database called Movie and in the application I do a CRUD in…
-
0
votes0
answers19
viewsHelp Test Controller Angularjs and Jasmine
Good morning guys, I need a help to do the unit test of a controller with Jasmine, my problem is that I need to cover the methods of this controller and I am not able to do the right way to get…
-
-1
votes1
answer552
viewsAccess controller function by directive
hello the question and simple I have a button in my directive which of course already has an ng-click("alterardata();") the rule is that the controller calling this directive has this function by…
-
-1
votes1
answer154
viewsRails link to dynamic
I have the following question, in my controller has a variable that takes which model the guy is coming and sends to the view. I would like to create a link from this variable type: link_to…
-
-1
votes1
answer98
viewsLoad data from the related table (Laravel) - What is the best way?
Good night. In the view loaded from: Route::get('livro/detail/{id}',['uses'=>'LivroController@detail', 'as' => 'livro.detail']); i can freely load data from table columns Books, for in the…
-
-1
votes1
answer120
viewsError 405 - "Request not supported method"
The method you are sending by clicking the button is a GET but in my Javascript step as method POST and in the Controller he expects to receive a method POST also. My JS: function criaCategoria() {…
-
-1
votes1
answer133
viewsImage (BITMAP) for String
I have never worked with anything like this and would like to insert an image into a database and for what I saw the best way is to transform an image into a string, I have searched and found some…
-
-1
votes1
answer20
viewserror while passing variables in a controller
Good morning programmers , I have a problem passing two variables from one function to another, I think. Below follows the Code class pdfController extends Controller { public function index($id) {…
-
-1
votes2
answers71
viewsPOST does not receive the data
I’m having a problem retrieving the form data. I have this excerpt on my page, it gets the array contact and I print the data in the respective fields, I click on the link at the end to send the new…
-
-1
votes1
answer106
views@Autowired service does not work on Constraintvalidator in Kotlin
I’ve been using Spring Boot for some time in Java and never had a problem with injections using @Autowired. But recently I decided to transform a Rest API project that was in Java to Kotlin, all the…
-
-1
votes2
answers20
viewsView values submit to controller with post
I am quite beginner in MVC and was here as a question: In view I have: <form id="form1" action="/Jogo/ExecutarAcao" method="post"> <input type="radio" id="banana" name="opcao"…
-
-1
votes1
answer27
viewsGet a list of objects with custom message (Spring Boot)
At the moment I can return the list of objects (products). I would like to show the information of each object with a formatted text, for example: O produto (nome_produto) tem o preço…
-
-2
votes3
answers61
viewsWhen creating a new user, the user being used is logged in and the new user is logged in automatically
I’m having a problem with the method of creating a new user in Windows, because I changed the method of registering users on my system so only administrators users can create new users, but every…
-
-2
votes1
answer428
viewsHow to call a controller method via JS or Ajax in Windows
I’m new with PHP and Laravel, besides I don’t know much about JS. I have the following question, I have a view that displays the information of the service provider of my project, before this guy is…
-
-3
votes5
answers1659
viewsWhat is the best way to pass data between php files
What is the best way to pass data between back-end and front-end, for example, send a form to the back-end, it executes an SQL script and returns an array of data that must be shown, what is the…
-
-3
votes1
answer51
viewsJava class with float and int
I am developing an MVC project with Java for web using eclipse. In the table database product is like this create table Produto ( Idproduto int identity primary key, Nome varchar(40), Preco…