All Questions
Tagged with controller laravel
19 questions
3
votes
2
answers
254
views
Laravel Event Filtering Controller
So I am currently writing a function in laravel that handles URL parameter filters.
How the code works: So we have the following two URL parameters:
timeframe and <...
2
votes
2
answers
251
views
'Lean controller'/'Business logic on service' and filtering, sorting, pagination methods on controllers
I'm currently reading about "Lean controllers"/"Business logic on services" and trying to refactor some legacy code. However I am struggling to apply what is taught in the ...
2
votes
1
answer
128
views
Controller in Laravel with parsing, creation and relationships
The following code represents the store method of a resource controller.
A user can create an training offer on my website and can pass various information like ...
2
votes
1
answer
57
views
Laravel controller methods for registering businesses and stylists
I use the Laravel API and want make messy code cleaner.
I have a form for registering business and businessOwner.
And stylist who is working under this business registering from same function.
And ...
4
votes
1
answer
2k
views
Laravel voting system
I have written a voting class in Laravel. It uses the voting sites API to check if the user has voted today. A user is only allowed to vote once every day.
All votes reset at midnight (i.e. 12:00 AM ...
1
vote
3
answers
1k
views
Laravel controller to manage sent and received messages
I write small inboxing app in Laravel 5.5 for my wesite. In inbox app users can compose new message, read messages and delete messages. I have only one table in my database for inboxes.
Structure of ...
4
votes
1
answer
1k
views
Laravel LoginController
I have a LoginController in Laravel, but I think it could use some improving, can anyone tell me where I am going wrong? It just seems overall a bit messy, but I can't think of a logical way to ...
2
votes
2
answers
284
views
Laravel lumen : Post API method
Question is quite simple, I am using dingo package, Currently below is my code for an API call.
...
3
votes
1
answer
108
views
Performing CRUD between 4 tables
This code works perfectly fine but I have repeated many lines of code in this controller. I need some suggestions on how to optimize this code and remove repetition, with focus on the ...
4
votes
1
answer
1k
views
Laravel - Revised Authentication Controller
I'm developing a Social Engineering Awareness Training Application. This is the focus of my thesis for my undergraduate degree. This will be a multi-part review request, however, if you want to see ...
5
votes
1
answer
215
views
Email Controller
I'm developing a Social Engineering Awareness Training Application. This is the focus of my thesis for my undergraduate degree. This will be a multi-part review request, however, if you want to see ...
5
votes
1
answer
729
views
Laravel - Authentication Controller
I'm developing a Social Engineering Awareness Training Application. This is the focus of my thesis for my undergraduate degree. This will be a multi-part review request, however, if you want to see ...
1
vote
1
answer
333
views
Laravel controller to update appointment requests
My question/refactor is similar to what is found here:
Laravel controller for form validation skinny
However, I feel that the answer is for 5.0 and not 5.2. This question does not pertain only to one ...
1
vote
1
answer
594
views
Laravel 5 controller to list appointments by date range and by label
I am starting to get into OOP using PHP and MVC. I just want to know if this code is good practice. Is this how I should be using my controller and model, in its simplest form?
AppointmentsController:...
1
vote
1
answer
74
views
Selecting orders submitted by a user, segregated by status
I have recently started using Laravel as my chosen framework. It is my first time using a framework. As I have made progress through my project, my controller methods have started to increase in size. ...