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

learn more… | top users | synonyms

2
votes
0answers
54 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 ...
4
votes
1answer
70 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
1answer
63 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 ...
0
votes
1answer
57 views

Show a search input bar depending on which path the user currently is viewing

Im using Laravel with the Blade template engine. Im trying to show a search input bar, depending on which path the user currently is viewing. The three paths is all,...
2
votes
0answers
72 views

PHP tagging script

I have created this PHP script in Laravel. I have database table with items and in my app I can create tags with different regexes. If regex matches text in description or epoch. I will insert ...
0
votes
1answer
56 views

Constructing objects for external libraries using a model in Laravel

I want to know if it's more appropriate to use a separate class (such as a factory?) to construct an object. While the code works, I am concerned about bloating of the model and the tight coupling. ...
-1
votes
1answer
39 views

Laravel - Grab id's from multiple relations and compare them to do some calculations afterwards

Please check out my code below. I know I might be asking a lot, but this is newbie code which I feel can be improved quite a lot. So far I haven't been able to get it "better", or "simpler". What ...
1
vote
0answers
49 views

Role-Playing Game CMS, how can I make this better?

I am pretty new to Laravel and I have been coding a CMS for a roleplay game, and I have ran in to some code which I see as messy / bad practice, I was just wondering is this really the easiest and ...
1
vote
2answers
52 views

Laravel makeHidden (how to use)

I am using Laravel 5.3, and currently working on models. I have the following code: ...
3
votes
1answer
34 views

Django BaseController

A working example of mine, trying to streamlining my Django views, with absolute inspiration from Laravel: ...
3
votes
1answer
74 views

Check if relations exists for a parent node before deleting it so that we don't have any orphan child node

Here I am trying to delete a parent node but only if it doesn't have any child node. Please review this code. PostController.php ...
1
vote
0answers
50 views

Laravel 5.3 model for mapping pages to multilingual translations

I have a Many To Many Polymorphic Relation like this: ...
0
votes
0answers
79 views

Pagination with ElasticSearch results

Technologies being used: PHP 5.6 Laravel Framework 5.3 (with Blade templating) ElasticSearch 2.4.1 Bootstrap (for CSS pagination classes) ...
3
votes
1answer
88 views

Populating a form with filtered hierarchical place names

My server performs a query to get all country data with Eloquent relationships: ...
0
votes
0answers
64 views

Handling routing with jQuery + Laravel

Basically, it's a matter of code organization, trying to delegate as most responsibility as possible to the server and keeping JavaScript use to a minimum, mostly as "glue" code between the view and ...
1
vote
0answers
108 views

Extend the Laravel Eloquent model in order to easier implement CRUD REST for my routes

By extending the Model and using this inside my routefiles, I can easily call these functions inside the corresponding HTTP ...
3
votes
3answers
78 views

Device limitation rule for user

I've created a simple application for mobile users, they can login using provided API but must have limitation on the devices, so the requirement is simple : User cannot login using more than 2 ...
1
vote
3answers
96 views

External variable in callback for chunk()

I am trying to implement search in Laravel. I want to search on models. Since there can be many records in the database, I am trying the chunk function. ...
0
votes
0answers
28 views

Maintainability with lots of lookups, checks and inserts

I have the following method in a Controller in Laravel 5.3. The method is supposed to be in two other controllers and all three Controller methods will receive the needed arguments in different ways. ...
0
votes
2answers
158 views

Laravel Wordpress REST API Controller

For a Laravel project I needed to show latest three blog posts on the homepage. The blog was made with Wordpress and after some research I found a cool plugin called REST API that allows to get a json ...
3
votes
0answers
135 views

Laravel Docker-Compose

I've created a repo for some Docker containers that work together with docker-compose to make a very easy and quick installation for Laravel including nginx, mariadb, and redis. Laravel is known for ...
8
votes
1answer
146 views

Document Merger using PhpDocX

I'm developing a document merger that utilizes an FTP site containing hundreds of documents. FTP Connection Function ...
0
votes
1answer
83 views

Repository code in Laravel

I am practicing to code in the right way and make it testable. Please review this code and tell me anything bad practices of it. Entity: ...
2
votes
1answer
122 views

Laravel generate category list from product results

I have product results with some filter, and the one is category. I'll get the category list from product results. the model category and products is one to many relationship. This is the search ...
1
vote
1answer
97 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
1answer
42 views

Phishing Project - Refactor Using Models

After receiving some good feedback on the previous question, I've refactored my database and have begun to refactor the associated code. As a result of implementing models for all tables in the ...
3
votes
1answer
53 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 ...
0
votes
0answers
28 views

Decouple resource that only lists items owned by logged user

Both methods works just fine, but I would like people's opinion on whether I'm facing this the wrong way. JWTAuth returns an ...
0
votes
0answers
35 views

Moving the HTTP and Request to controllers and Routes

I am new to Laravel framework and I made a project application which is working fine but someone said You should avoid accessing the Request object in your views. here is the full application ...
1
vote
1answer
60 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 ...
4
votes
0answers
77 views

Let users create custom blade templates

Problem: I need to let my web-app users create their own blade layouts. The content shall change based on what is in the database, hence their layouts should become dynamic in nature. With only the ...
4
votes
2answers
76 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 ...
4
votes
2answers
221 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 <...
2
votes
1answer
70 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, ...
1
vote
1answer
53 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 ...
7
votes
2answers
175 views

Simple inbox functionality using JavaScript and Ajax

I've been developing a simple CMS both for practical use and learning about Laravel, and I decided to implement a simple service that makes it possible for the administrators to send messages to one ...
3
votes
1answer
59 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 ...
7
votes
2answers
683 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 ...
0
votes
0answers
449 views

Laravel Unit Test for API

I'm currently building an API with Laravel 5 and I've written some unit (or integrated?) tests for it. I've been reading a little about unit test and how to not overdo it and I would like some input ...
0
votes
1answer
35 views

Single endpoint for ingoing mail with multiple purposes

The following code is not one of my proud moments. In its initial state, I had only a single purpose, but know I'm up to three purposes and I don't know if it would stop there. I'm using mailin.io to ...
6
votes
1answer
233 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 ...
2
votes
1answer
40 views

Database query with Eloquent

I have got two tables articles and tags in the database. My goal was to retrieve all fields from articles table and one category field from tags table with Eloquent. I couldn't do this so instead I ...
1
vote
1answer
167 views

Basic CRUD in Laravel 5.2.37

Controller class ...
0
votes
2answers
72 views

Logging in with multiple types of info

I'm trying to let users log in with multiple columns (e.g. ID, email, phone). If one fails, it checks the next column. I would like to minimise my if and ...
0
votes
1answer
120 views

Laravel dropdown list without empty values

I'm creating dropdown list from all possible cities in database, all cities are distincted. ...
0
votes
2answers
234 views

Laravel transactions with a database

I'm really concerned about my transaction with a database and my code structure. I have created more methods to insert, update, delete data to the database but sometimes some of them will break or ...
6
votes
1answer
110 views

A Search Engine Class

I've built a Search Engine class for a website that permits to search companies in base of their locations and their categories (companies pay a plan to be found in the places that they will). In the ...
1
vote
1answer
70 views

How to optimize Method Visibility and code structures for better performance?

I'm creating an application to get data cross domain all the line of code seem work as well but I'm not much understand about performance with my code process with the real server and real action ...
-1
votes
1answer
67 views

Authorizing users for POST requests

I've to authorize some users to do POST requests from their CMSs in order to create a new resource on my database. I've to send a JSON response containing the status of the response (successful or not)...
0
votes
1answer
43 views

Repeating HTML, minus a few class and array key differences

I feel like this code is pretty sloppy and can be accomplished in a foreach loop. But it's a bit complex using a multi-dimensional array. Can this be cleaner? You ...