Questions tagged as 'mvc'

1
answer

Laravel Auth :: Atempt () always returns false

I tried to authenticate, but always returns false in the Auth::attempt() method of Laravel: $prontuario = Input::get('prontuario'); $senha = Input::get('senhas'); if (Auth::attempt(['prontuario' => $prontuario, 'senha' =>...
asked by 03.11.2016 / 00:50
2
answers

MVC and DAO - Data Rules

In a CRUD where in the act of registering you should check if a certain field already exists in the bank, in order not to allow duplicate registration, this verification rule must be in the DAO class (% with% if it exists in the act of registeri...
asked by 28.09.2016 / 21:04
2
answers

What's the difference between the MVC architecture and Django's MTV?

I would like to know if there is any difference in practice between these two architectures.     
asked by 17.10.2017 / 18:59
3
answers

ASP.NET - How to use multiple post methods in the same controller?

I have the following problem: On a given HTML page I have two buttons that call different POST methods on the same controller. @using (Html.BeginForm("UserInfo1", "UserInfo", FormMethod.Post)) { <input type="submit" value="Ir para Ac...
asked by 06.06.2018 / 04:39
1
answer

Default MVC and DAO

I have a layered system. I'm using MVC and inside the MODEL folder I have a DAO folder. Let's say I have a file named Professor_DAY and another called Aluno_DAO. Question: Can I include the student file in Teacher to call any method presen...
asked by 30.06.2018 / 00:05
2
answers

Extension 'Inc' and MVC in PHP

I know that it is not mandatory to use the inc and class codenames in the name of the files, but for the sake of organization it is even recommended. The doubt is due to the fact that the class codename is easy to underst...
asked by 09.03.2017 / 02:28
3
answers

Reusability of Control

I came across the following sentence using MVC:    "(...) The View and Controller objects are specifically written to each type of interface (and technology), and are generally not reusable between interfaces."       "(...) View and Control...
asked by 29.09.2016 / 19:24
2
answers

How to inject a variable into a page that was required by a function

I'm having the following problem, I'm using an MVC template for a CMS in PHP study, however I'd like it to be possible to use themes, so I've created a configuration variable that stores the theme name for test , and when I use my controller...
asked by 19.11.2015 / 11:36
2
answers

C # route redirecting to wrong action

I have an action that returns a PartialView [HttpPost] public ActionResult SelectCidadesPorCodigoUF(int idUF) { //It do something and returns a PartialView } This action is mapped as follows: routes.MapRoute( name: "SelecionarCi...
asked by 08.11.2017 / 17:50
1
answer

Is it correct to use PHP code in the view layer along with HTML?

I'm starting now in the area and I have a college job to do and it's necessary to use the MVC standard, I've even separated things well, but I came across the following code in a file from my view layer >, the filename is novoAtendimento.php...
asked by 20.08.2017 / 20:14