skip to Main Content

Does @DeleteMapping work with Spring Boot?

why is the DELETE query not working for me. @DeleteMapping("/delete") public String deleteUser(@RequestParam("userId") long id) { userService.deleteUser(id); return "redirect:/"; } There is a form for this mapping, but it returns me the Request method 'GET' is not supported. <form th:object="${users}">…

VIEW QUESTION

Where should application logic go in Laravel?

Currently, whenever a user opens a URL '/users/new', I use the following route that leads to the controller called 'UsersController': Route::post('/users/new', [AppHttpControllersApiUserController::class, 'newUser']); Inside the Controller, the 'newUser' method is responsible for sending the request data (name_user, email_user, password_user) to…

VIEW QUESTION

Laravel Eloquent with MVC principles – PHP

I am quite new to laravel. Using Laravel 8. When saving data I have seen below method in many examples. In the controller $emp = new Employee(); $emp->emp_name = $request->emp_name; $emp->emp_no = $request->emp_no; $emp->email = $request->email; $emp->save(); My doubt is…

VIEW QUESTION

Display data from DB – Laravel

I need help in Laravel. I need to list all VIEWS from db. I have written this query in my Controller: $reports = DB::select("Select TABLE SCHEMA", TRIM('r_all_' FROM TABLE_NAME) as viewname FROM information_schema.tables WHERE TABLE_TYPE LIKE 'VIEW' AND table_schema LIKE…

VIEW QUESTION
Back To Top
Search