Skip to main content

Questions tagged [laravel]

Laravel is a free, open-source web MVC framework for PHP.

Filter by
Sorted by
Tagged with
3 votes
3 answers
257 views

I'm trying to implement a heartbeat feature for offline tracking that just sends an offline message to the server once the web browser app (Laravel-based) is offline. Ideally it will ping the app's ...
meowyn0316's user avatar
5 votes
4 answers
779 views

A little background before I ask my questions. I've designed a system as an architect based on the requirements given to me by the client. The client has a team or two to three developers which are ...
Simple Fellow's user avatar
1 vote
2 answers
237 views

I am having a bit of problem trying to find the correct place for business logic. The project I am working on isn't huge, but is not small either and has a very considerable importance in my company. ...
Bernardo Benini Fantin's user avatar
3 votes
2 answers
2k views

I'm building a web application using Laravel. I use the repository pattern as my data layer. Imagine there's some entity like Product and a product can be assigned to a ProductCategory. The Product ...
user2190492's user avatar
0 votes
0 answers
116 views

I find myself in a situation where I have two roles, "Admin" and a "Organizer". The "Admin" accesses the AdminUserController to update users, while the "Organizer&...
Aridez's user avatar
  • 129
-2 votes
2 answers
80 views

In my PHP Laravel application, I want to display special offers to users, depending on the quality of their house(s). There are 4 Models: User, House, Offer, OfferTargeting. Each User can have many ...
Tim Kohlen's user avatar
0 votes
1 answer
763 views

I use the Laravel framework. I've got controllers, like CustomerActivityController, and I've got a service layer with services like CustomerActivityService. Say I want to create a new customer ...
user2190492's user avatar
1 vote
1 answer
402 views

There must be a good reason for this. Laravel's default pattern makes no use of Service Classes... but the Laravel community's best practices is for business logic to be stored in them. Laravel's ...
Django Reinhardt's user avatar
7 votes
1 answer
503 views

I'm working with services and I found out there are at least 3 ways to use them inside controllers... Statically: Like helper, Text::uppercase('foo') Instancing it: $text = new Text(); $text->...
JuliSmz's user avatar
  • 181
2 votes
0 answers
68 views

TLDR: project scope has crept beyond my capabilities and I need an early exit strategy (in both parties' best interest) Early last year I took on a gig to develop a web application for a financial ...
eric_tet's user avatar
-1 votes
1 answer
114 views

I'm developing a package for Laravel & Lumen in the same code base, but I encountered some problems. Well, in the beginning, I thought it could have the same code and work for both frameworks, ...
Ariana's user avatar
  • 17
-3 votes
2 answers
201 views

I have a Kubernetes instance from DigitalOcean that has 2 worker nodes and 1 load balancer. Now I want to create a MySQL managed database cluster for the app that will run on that Kubernetes. Question ...
emma's user avatar
  • 133
2 votes
1 answer
780 views

I have inherited a project via laravel that uses its database migration mechanism coming from the framework. The application has the following table named actions: action_log_id SERIAL PK user_id INT ...
Dimitrios Desyllas's user avatar
0 votes
1 answer
240 views

Let's say I am developing an ecommerce application. And I have modules organized in certain way. Products Coupon Tag (can be used as brands and linked data) Offer Now what I want to achieve is user ...
Rajesh Paudel's user avatar
1 vote
0 answers
48 views

I created a forum where I want to display notifications and messages as soon the user gets them. I don't want them to need to refresh to page to see if any notification/message been sent, but I also ...
Giuseppe The Dreamer's user avatar
3 votes
1 answer
720 views

My Laravel project starts to grow up and I'm starting to dealing with fat Controllers and Models. Probably I'm for away from the SOLID principles path and my code is not DRY. I decided to refactor my ...
Steve's user avatar
  • 131
2 votes
0 answers
674 views

I am new to using PHP Frameworks. I decided to try out Laravel. In my project, I needed to write a search function which will search through a few entities based on some keywords, then do a UNION and ...
learningtech's user avatar
-3 votes
1 answer
127 views

My employer recently learned of Laravel, and has asked us to migrate much of our development to it. None of us have issues with this, as we’ve all played around with it. We have two main in-house ...
Lino Altamirano's user avatar
3 votes
1 answer
925 views

It's my first post here as I understand that SO is a platform to find fixes and this is where to ask questions about more general questions. Correct me if I'm wrong I'm working on project in Laravel ...
NoOorZ24's user avatar
0 votes
1 answer
307 views

I have a complex PostgreSQL database structure that is consisted with views, materialized views and foreign wrappers. The database schema is manually updated without any sort of migration script, ...
Dimitrios Desyllas's user avatar
1 vote
1 answer
326 views

I have a Laravel project where the controllers (all derived from one of two base controllers) use repository and persistor classes to interface with Eloquent models. Authorization logic is implemented ...
kaan_atakan's user avatar
2 votes
1 answer
735 views

Problem: I'm writing a service in Laravel 6.2 that will send out a push notification to different users at specified times down to the minute. Users select how many times a month, week, or day and at ...
SaundersB's user avatar
  • 147
1 vote
1 answer
3k views

I'm currently in the planning phase / feasability study of a rather big web application which is meant to be implemented using Laravel. My own experience on the matter is rather limited but I'd like ...
Broco's user avatar
  • 91
1 vote
0 answers
166 views

It is known that Laravel Framework consist of library collection named Illuminate. In which some libraries are mirrored into separate repositories, right under https://github.com/illuminate/ namespace....
Abdillah's user avatar
  • 127
1 vote
1 answer
40 views

I'm building an application which monitors uptime of hosts/ip addresses. I'm using Laravel + VueJS. So the app should check lots of urls every minute and get & store in db http responses. I've ...
Victor's user avatar
  • 121
0 votes
1 answer
278 views

I have two models Permission and Role, now in roles/create, I need to show all the available permissions to allow admin to select the permission and create a role, now should I import both ...
Prafulla Kumar Sahu's user avatar
1 vote
2 answers
115 views

This is the first time I tried TDD. At the first time, my controller tests looks like this use RefreshDatabase; class ControllerCustomerIndustryTest extends TestCase { use RefreshDatabase; ...
Christhofer Natalius's user avatar
2 votes
1 answer
259 views

I would like to make a SaaS which would be a multitenant system. Development is done in Laravel, which is less important. What I would like to know is how would you handle having a master admin ...
Norgul's user avatar
  • 149
3 votes
2 answers
2k views

In my case I inherited a poorly engineered code, on that piece of code I have been tasked to increase the code coverage in integration tests. But instead of the usual pattern: Create/Populate a test ...
Dimitrios Desyllas's user avatar
0 votes
0 answers
35 views

I am in the process of building an API in Laravel and my server is currently stored in the UK. Now I have read some of the posts relating to this topic on Stack but I am still a little unsure as to ...
IconicDigital's user avatar
0 votes
2 answers
2k views

I have two panels, one for the admins and the other for partners. And there are two OrderController with Admin\OrderController and Partner\OrderController namespaces. They both look very similar. ...
Pouneh's user avatar
  • 11
1 vote
1 answer
89 views

I am building few sites for my company's client. The sites are mostly the same but could have some customisations. so we decided to create duplicate sites instead of multi-tennant and we decided to ...
shez1983's user avatar
1 vote
1 answer
361 views

As I understand with laravel passport, in order for a third party application to consume my api they need to register their application with mine by creating a client. The passport:client artisan ...
adam78's user avatar
  • 321
2 votes
2 answers
822 views

I'm using OAuth 2.0 with Laravel (Passport) in order to grant access to my frontend app to the API. Access tokens generated this expires after a while. Now, I have a second app that has to consume ...
Badro Niaimi's user avatar
2 votes
1 answer
469 views

OK, so I have been at this problem for the last few days, and I must admit - I am stuck. I am trying to make a web application, where users can upload documents or send inbound e-mails. Each ...
oliverbj's user avatar
1 vote
1 answer
666 views

Dynamically apply methods/"rules" to documents I hope someone here can help me/guide me in the right direction. I am currently creating a web application, where users can import a text file, ...
oliverbj's user avatar
1 vote
1 answer
189 views

For me, the data I want to retrieve may be in database for which I can use properties of model and also relationships, but if the record is not a property and no relationship exists for that ...
Prafulla Kumar Sahu's user avatar
3 votes
0 answers
304 views

I am currently trying to create a web application, that saves inbound emails. I have figured out how to save the incoming emails into my database, and I have all the email information available (...
oliverbj's user avatar
-2 votes
1 answer
65 views

I have an api end point which receives some parameters and process them returns a csv file. But the processing time may take more than 15 seconds. My server has build in timeout and some client ...
Ebin Manuval's user avatar
2 votes
1 answer
2k views

Lets say I am building some large application ( multi-page app ) using Laravel. And laravel will allow me to make an API and a website on the same application. Since the website and the API ...
rook's user avatar
  • 131
2 votes
2 answers
2k views

I am somewhat new to writing tests and I want to build that habit into my workflow. So for example I might write a test that a user can create a blog post however I'm not sure on how to do that ...
St0mX's user avatar
  • 221
-1 votes
1 answer
235 views

I'm currently developing an SaaS application in PHP, with Laravel, using its own DB class. Let's pretend we've got 2 classes under 2 namespaces, plus Laravel's own DB - so Illuminate\Support\Facades\...
XLR's user avatar
  • 111
1 vote
1 answer
600 views

In Laravel (for the record I'm using v5.6) there is an option to queue emails for background processing. I have a scheduled job to send out daily email alerts to users. Currently the job drops the ...
adam78's user avatar
  • 321
0 votes
1 answer
694 views

I am making a project using the Laravel framework. I plan to create unit tests for my project. But I feel I don't really have an idea what to test because I mostly use library or framework functions. ...
lightning_missile's user avatar
0 votes
1 answer
785 views

In Laravel 5.6 an Illuminate\Database\Eloquent\Relations\BelongsTo relation was given the ability to support default models. This allows a model that will be returned if the relationship is empty. ...
flyingL123's user avatar
0 votes
1 answer
211 views

I hope the question title already answers the subject here. Lets say I have a number of ids that needs to be validated in a request. Example: request uri: [POST] /album/{album_id}/song Request ...
TheManish's user avatar
  • 147
1 vote
1 answer
1k views

I'm working on API design for a mobile app where the user can send one or more photos that will be stored in the database. Currently I have three routes, post photo/create which will send one photo ...
Rizki Hadiaturrasyid's user avatar
1 vote
0 answers
888 views

I am developing a project using Laravel. My workflow is: route directs to controller Controller calls eloquent models Eloquent models perform queries (tipically CRUD and find) Controller returns ...
lightning_missile's user avatar
0 votes
1 answer
156 views

Or in actuality, how to tell if a certain technique has became a standard in certain language / framework? As I understood from my readings so far, PHP supports DI in PSR-11 while Laravel uses it out ...
krubix's user avatar
  • 19
2 votes
2 answers
880 views

The PHP framework Laravel allows to make an API and a website on the same application. As both of them will communicate with the same database, I was asking myself what is better between consuming my ...
JacopoStanchi's user avatar