Skip to main content

Questions tagged [laravel]

Laravel is an open-source PHP web development framework created by Taylor Otwell. Laravel helps you create applications using simple, expressive syntax.

Filter by
Sorted by
Tagged with
5 votes
2 answers
477 views

Optimization of a Laravel controller that passes data and views

I am trying to build a website that shows events. And I use the following controller. Please note that the urls ($view and ...
user avatar
5 votes
1 answer
191 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 ...
Trojan404's user avatar
  • 818
3 votes
1 answer
91 views

Phishing Project Error Logging

Moving on to the next steps! Previous review was here. The idea here was to implement suggestions made by @hd/@Pimgd and then implement an effective way of tracking and logging results when an ...
Trojan404's user avatar
  • 818
7 votes
2 answers
708 views

Phishing Project Assessment

Coming back for another look at my project after I've reworked a few of the key points made in my previous post here. So far, I've rewritten most of my code to address SQL Injection. I've created a ...
Trojan404's user avatar
  • 818
6 votes
1 answer
320 views

Phishing application God class

This project is ultimately my senior thesis to graduate from college. It will end up being very long with several code reviews and redesigns. The next rubberduck perhaps? I've been working on a ...
Trojan404's user avatar
  • 818
5 votes
1 answer
709 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 ...
Trojan404's user avatar
  • 818
5 votes
1 answer
2k views

Setting default of <options> in Laravel with PHP Match

I have a filter component that lets a user filter for events on a website. The user needs to see which category is currently selected in the filter. For this there is a URL with parameters. e.g. ...
user avatar
5 votes
1 answer
2k views

Laravel Scope get request data/param

I want to pass the param from the request on the scope method in the model and serve it as json to be rendered by select2. Which is better? 1. Pass request from the controller like this controller: <...
Muhammad Dyas Yaskur's user avatar
4 votes
2 answers
460 views

Phishing Project Sending Email Reworked

@Pimgd gave some good feedback on the previous post. I've made the changes that I think best suit my application and am looking to see what people think of this implementation. PhishingController <...
Trojan404's user avatar
  • 818
4 votes
2 answers
98 views

Phishing Project Sending Email with Configuration Classes

As suggested by @MikeBrant in the previous question, I've added in two configuration classes to simplify and more broadly organize the objects required to send my mail messages. This also removes the ...
Trojan404's user avatar
  • 818
4 votes
2 answers
5k views

Laravel 8 registration and login with user profiles

I am working on a Laravel application (Github repo) that requires user registration and login. After registration, the users can change their registration details (except password, for which there is ...
Razvan Zamfir's user avatar
3 votes
2 answers
225 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 <...
Nifty Matrix's user avatar
3 votes
1 answer
67 views

Phishing Project Refactoring to Use a User Object

Continuing on my quest to make sure that my application is developed strong, securely, and efficiently, I've updated my code as suggested in the previous question. To start, I've implemented a ...
Trojan404's user avatar
  • 818
2 votes
2 answers
488 views

Route protection with custom middleware in Laravel 8

I am working on a blogging application in Laravel 8. The application assigns users roles and permissions. There is a many-to-many relationship between roles and permissions. I have created a custom ...
Razvan Zamfir's user avatar
2 votes
1 answer
263 views

Laravel CRUD Controller - code request

Here is my starting point for a laravel CRUD controller. I would appreciate it if someone could do a review and show me how an experienced developer would approach this. I do not want to progress with ...
Jake Feeley's user avatar
2 votes
1 answer
87 views

Phishing Project Sending Email Assessment

I've gotten a lot of feedback about my tracking system already. So now I'm changing gears and looking at my email generation system. I have a class called Email which manages the sending of emails, ...
Trojan404's user avatar
  • 818
2 votes
2 answers
1k views

Laravel controller for form validation skinny

I'm trying to make controllers skinny as possible. I use repositories for accessing the database and I use Services to do other stuff. In this case, I use it to insert a new post to the database. For ...
Akar's user avatar
  • 339
2 votes
1 answer
278 views

Using method trait to return something in laravel model

I have question about scope yesterday, and someone gives an answer to don't return anything in scope. Is return something in scope really bad practice? Should I not return anything in the model ...
Muhammad Dyas Yaskur's user avatar
1 vote
1 answer
115 views

Laravel Eager Loading tickets from DB

So I have the following relationship in my Model: Events Model: ...
Nifty Matrix's user avatar
1 vote
1 answer
73 views

Phishing Project UserIterator Implementation

As I stated in an answer comment on my previous question, the UserIterator has a much larger footprint than I think most people realize. This question is here to further explain the project, the ...
Trojan404's user avatar
  • 818
1 vote
1 answer
510 views

Laravel query to select photo orders related to some competition

I'm using Laravel and I have one monster query that returns exactly what I need, and runs perfectly on my dev machine, but on production runs extremely slow and I get timeout errors. Here's the query:...
Citizen's user avatar
  • 61
1 vote
1 answer
65 views

Phishing Project Webbug Implementation

Here comes the next round. I've implemented some of the suggestions from the previous review. That being said, though, there are a few things that I have on the horizons but haven't yet put in that ...
Trojan404's user avatar
  • 818
0 votes
1 answer
26 views

Send an inbound Enquiry to a Users registered Twitter Account to notify them of its arrival

This follows on from an earlier CR Question. - The reasoning behind which suggestions were taken on / which were not taken on board are no longer relevant as this is supposed to be, from my ...
Luke's user avatar
  • 329
0 votes
1 answer
73 views

Automated Tweet of new inbound Enquiries in PHP7 (Laravel 5.2)

Background. A User can submit an enquiry via a form hosted on a clients website, these are pushed onto a queue, and then taken off the queue for processing, to process several different parts of the ...
Luke's user avatar
  • 329
0 votes
1 answer
253 views

Default to array when value is null or false

I'm working with ACF in WP which provides a get_field() function. The function can return an array of values, null or false. ...
mrmadhat's user avatar
  • 148