Laravel is an free, open-source web MVC framework for PHP.
0
votes
2answers
59 views
When dealing with user-generated content, is it always better to just use a CMS like WordPress?
I am a web developer who is planning to build a web application which requires user-generated input, with that input presented somewhat like a blog in the sense that there is an article with pictures, ...
0
votes
0answers
56 views
How to use two dependent APIs in one application
I spent the last hour reading meta if my question fits better to SoftwareEngineering or StackOverflow. I ended up that this is the place.
I am on start of developing a website (and then a mobile app) ...
0
votes
2answers
42 views
Queue how to preserve requests?
I'm working with Laravel queues lately.
I've all set up and running fine.
What I see is that I perform a http request to my system, the controllers manage the request issuing a Model having request ...
0
votes
0answers
34 views
In browser form validation in laravel
In laravel 5 I describe models without specifying fields in model class. Some magic identifies which fields exist in database for this model.
use Illuminate\Database\Eloquent\Model;
class MyModel ...
0
votes
1answer
38 views
REST API crossresource operations structure
I'm wondering what's best practice in next use case:
I'have a view that displays data for 3 resources User, Company, and CompanyType (chosen in select, can be added dinamicaly so it's not enum).
What ...
0
votes
1answer
59 views
How to handle method chaining and null return for Laravel models
If I am loading a model with Model::find($id) and the id is not found it returns null.
This is fine except if I try to chain things.
Model::find($id)->loadAttributes();
Load attributes is going ...
1
vote
1answer
49 views
Should I give users the ability to 'unreport' on a forum
(I really hope this is the appropriate place for a question like this. Nevertheless, I hope some of you can give me your opinions, regardless).
I am building a forum with Laravel. Progress has been ...
0
votes
0answers
170 views
DDD directory structure for MVC app
As a means of learning and gaining some experience with domain-driven design, I'm restructuring/refactoring an old application written in PHP which utilizes the Laravel 5.1 framework. Below is a mock-...
2
votes
2answers
99 views
How to improve version control on database structure when migrations take long?
I am working with a team of web developers. We are already using Git for version control of our code and it works well. However, while we are changing our code, it is also common to change the ...
2
votes
1answer
107 views
Advantages and disadvantages of building web app purely with microservices and hybrid with web framework
Definition:
Purely microservice: Not using any web framework such as Spring, Laravel, Zend, Django. Web app is a single page app loading data via Ajax calls to web services
Hybrid: The web framework ...
1
vote
1answer
92 views
Storing in MySQL relationships between different type of objects
I have an app that needs to attach objects of different types between them. For example: I have to add Lead type object to a Contact type object , a Contact to an Event and so on.
Such relationship ...
2
votes
0answers
152 views
Is Nested Structure with Spread Responsibilities Not Logical?
Given the following code snippet in a Laravel Controller:
$this->userRepository->saveByProject(
$this->fileRepository->saveByProject(
$this->metricRepository->...
0
votes
2answers
740 views
Laravel Eloquent - Filtering results and eager loaded results
So here is the use case:
You have users and they have many addresses. Say you want to filter and eager load on addresses (say...only US addresses). In order to do so you have to filter the eager load ...
1
vote
1answer
547 views
Laravel 5.2 - Better to create a Service Provider or Helper class or otherwise?
So I have created an API endpoint (obviously not restful) that generates xml and returns the file path of the files. Its obviously more complicated but that is the gist.
My issues is this. Inside my ...
-1
votes
1answer
2k views
How to use Try/catch and database transaction in PHP and laravel [closed]
I'm planing to use Try/Catch and Database Transaction in Laravel5 and my own PHP project to validate any errors occurs then rollback avoiding lost my transaction or information during user do their ...
1
vote
0answers
77 views
How to Make Reusable Classes/Package in Laravel for Billing which uses PaymentExpress?
I am working on a Laravel Project where we are Payment Express. What currently we are doing is that we have Payment Express Class with static function (Not a single property) like given below:
Class ...
0
votes
0answers
54 views
Fork a repository that is half usable or create new repository from scratch?
I am new in open source development. I am trying to develop a Laravel package. I went through some of already present packages. And I found a package that can be usable but problem is that only half ...
0
votes
0answers
143 views
Clearing Laravel cache on REST web service and front-end
Our REST web service and front-end are both on the Laravel Framework.
The REST service and the front-end share a memcached server. The endpoint response and the data received on the front-end are ...
0
votes
1answer
260 views
Should Laravel's App::make() be considered a dependency?
I think the question in general is best summed up as, should Laravel's App::make() be considered a dependency? On the one hand it can instantiate any number of different implementations, so maybe it ...
3
votes
1answer
121 views
Managing a development database in a group project
I'm working for a small webdevelopment company and we want to set up development environments. We'll be using the Laravel framework in combination with Homestead. Now, Homestead has its own database ...
1
vote
2answers
593 views
HTTP Query String vs URL Parameter for referral codes
I'm working with a Laravel app and am development a "referral" feature. A user clicks "refer friend" and a URL pops up that can be shared on Facebook etc, when another user clicks on the link they ...
2
votes
3answers
186 views
Using multiple languages
I currently have a website running PHP laravel. We came to a point where we want to add a user-backend -- where users sign-up and can access functions when logging in.
My question is; Is it possible ...
2
votes
1answer
236 views
Fine-grained data level permissions on a laravel RESTful API
The problem:
We want to restrict access to properties returned from our services.
Details:
We have route level permissions working with no issue.
For a user that can view /product/{id} for example,...
0
votes
0answers
45 views
Change API response with minimum code changes
My Application is built on Laravel and currently has the following components :
Models
Dictionary
Word
Controllers
DictionaryController
WordController
It's a JSON API, so views are nothing but ...
1
vote
2answers
323 views
Repositories, Gateways, Models and Architecture Questions
I am working with a Laravel project and I am looking for a way to solve the issue of bloated models and cross referencing between them.
I had started extracting higher level methods to a repository ...
2
votes
1answer
642 views
Consuming REST services: client or server
I am working on a new project in which we are currently deciding which technologies and frameworks we will be using. The application will eventually be cross platform. Therefore, for the server side, ...
0
votes
1answer
71 views
static method, helper function or in the controller, where does this go?
I'm working on a piece of functionality that simply allows a guest user to perform an action a certain number of times before requiring them to login\create account. In this instance, they can vote on ...
0
votes
0answers
163 views
Laravel: roles vs middleware
I am making a multi-tenant application and I am using Eloquent Global Scopes to make sure users can only see the posts the have written. This is working fine.
Now I want to create a "super admin", ...
5
votes
2answers
1k views
Multi tenancy or multi instance?
I'm trying to build a web-based SaaS solution, and I hit a road where I'm not sure to use multi tenancy or multi instance. I will try to describe what I'm trying to achieve, and each approach ...
0
votes
2answers
195 views
Integration Tests - How much is too much? [duplicate]
First of I'm not sure if I chose the right name for my question, I'm not sure if
they are functional tests or integration ( or other ). I'm talking about tests which test (or it should) the app from ...
-1
votes
1answer
234 views
PHP: where to call helper class in MVC?
I've a helper class in Laravel 5.1 with static methods for calculating week numbers, dates in weeks, etc. (Why static? I need max. 1 instance of this helper class)
I need this logic in my views. I'm ...
0
votes
1answer
74 views
Compute geographic areas Laravel
I am developing a backend for a taxi app in Laravel 5.
Up to now, served areas are defined by the admins but I would like to change the way it works.
I would like each taxi driver to define their ...
0
votes
1answer
112 views
Laravel 5.1 creating model overrides per client
Okay, so I have a Laravel 5.1 project with close to 200 models. This is fine for the core operation of the app, however, in many cases a client may want us to grab something from the database in a ...
0
votes
1answer
359 views
Laravel Algorithm for taxi app
I am trying to write a backend for a taxi service (university assignment) and I am stuck on the algorithm.
whenever a new client posts a request, all the taxi drivers nearby get an email notification ...
-1
votes
1answer
367 views
Understaing the “fillable” in Laravel migration [closed]
Using models is one the best facts in Laravel, but when using a model, it is not like my "native" environment (J2EE, models declare all DB table colums), it has three variable, and which of them is "...
1
vote
1answer
673 views
Array vs Object for View in Laravel
First, yes This question is very similar to Arrays vs Objects in view template but my question sort of expands on this...
When deciding on whether to use an object or array to pass data to your view. ...
6
votes
2answers
399 views
Designing a ticketing system where the User and Administrator have similar but different functionality
I am designing a simple ticketing system in Laravel 4. The system will simply allow a User to create a ticket, and an Administrator to answer it.
The User will be able to:
View a list of his tickets....
-1
votes
1answer
167 views
How do front-end developers test pages when the files they are handed are PHP views? [closed]
Someone who has a PHP project invited me to do the front-end work on his site. I don't know PHP, I've only ever worked with HTML/CSS/JS files. I cloned the project files from GitHub, and all of the ...
5
votes
2answers
641 views
How to prevent multiple form submissions when user reloads the page
I'm currently working on a project which requires that we integration a 3rd party SOAP API to handle a number of basic CRUD type operations.
Our current implementation allows us to leveraging the ...
-1
votes
1answer
182 views
What might be a good way to get hands on experience with Object Oriented PHP [closed]
I am a Computer Science student. I took a course on OOP, and I understand the concepts (classes, extending, encapsulation, etc). I'm also a web developer, have been doing it for about three years; I'...
0
votes
1answer
264 views
Laravel using models
I started working with Laravel about a month ago and I started by reading the documentation etc. Now I'm working on a project in Laravel 4.2 and I skipped some parts of the full documentation. In my ...
2
votes
1answer
2k views
Laravel 5 Multi-App
So my work has a dashboard built in codeigniter where every app on the dashboard has its own subfolder in controllers / models / views and nothing is shared. I have been tasked with upgrading this to ...
-1
votes
1answer
751 views
Laravel - BLOB File Management System - Possible obstacles?
I'm working on this weird project where I need to upload huge files (500mb+) and store them in a postgresql table as a blob.
Before you start telling me that storing files in the database is bad and ...
1
vote
1answer
297 views
Validate polymorphic votes - Controller or Model?
I have a question because I don't want to do something wrong.
I have a polymorphic relation called votes. Well, I want to save votes but I need to validate if a user already has voted. But even if, ...
5
votes
1answer
642 views
Unit testing Eloquent outside of Laravel
How can I unit test my Eloquent models when I'm using the ORM outside of Laravel? What I'm hoping to do it run tests on each model but somehow mock the database connection/query/builder(?) object.
...
0
votes
2answers
199 views
What pattern do I use and how do I implement it for one method that will be handled multiple ways
My scenario: I am creating an application that will allow me to create a mapping of redirect url's that will point from the request url (the url in the old ecommerce solution) to the target url. There ...
1
vote
1answer
80 views
Database integration of Rails and Laravel apps
I have some very small apps on a VPS running ruby on rails and a co-worker also have some of his own apps running on laravel at another VPS.
So far we dont needed to share any data among the apps, but ...
2
votes
1answer
117 views
What should be the structure of a person to person store database?
I am going to create a person to person store with Laravel, a website where its users can share and sell their product or their mobile, TV, Computer, Shoes, Shirts, Books, Cars, Bags, Animal, etc.
I ...
1
vote
1answer
440 views
Laravel relationships and database schema
I am playing around with Laravel and came across something in the documentation for defining 1 to 1 relationships between tables that I would like to get feedback on.
The example in the docs is ...
3
votes
3answers
1k views
Should I use foreign keys in my database if I use laravel?
I'm creating a website with Laravel for the first time. I checked relationships documentation today and it seems that Laravel just uses simple SQL queries.
class User extends Eloquent {
public ...