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.

24 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
68 views

Serving Laravel public/ contents when all Laravel files are in the same server directory

I have a Laravel 8 project hosted at xxx/laravel/ on an Apache server, where xxx is the domain. I want to serve the contents of <...
Ichi's user avatar
  • 93
3 votes
0 answers
2k views

My implementation of repository pattern in Laravel 5.6

...
Latheesan's user avatar
  • 283
3 votes
0 answers
633 views

PHPUnit testing my custom helper Facade classes in Laravel 5.5

I have been reading up on TDD and it's something I genuinely want to learn and be good at. This is something I haven't been doing as a developer and I thought it's about time I get into it. These are ...
Latheesan's user avatar
  • 283
3 votes
0 answers
875 views

Laravel Testing: Is this testing too much of the inner workings?

So I'm using laravel for a project and have a InvoiceRepository and a InvoiceRepositoryTest and I have written the test first ...
toonevdb's user avatar
  • 131
2 votes
0 answers
48 views

Laravel testing for compatibility between old and new password-hashing schemes

I currently have an event listener tied to Laravel's Attempting class. The listener is designed to rehash an old password to something newer. The current DB stores ...
ThePoet444's user avatar
2 votes
0 answers
54 views

A cleaner way to track model changes

The application I'm currently working on have two main user types, let's say user and reviewer. I need to create a functionality ...
Fortunaglobal Development's user avatar
2 votes
0 answers
72 views

PHP - Transforming text content according to rules then persisting to database

I have a web application where my users can upload text documents and emails into what I call Streams. A stream is like a "stack", that holds all emails / documents. My users can then add ...
oliverbj's user avatar
  • 257
2 votes
0 answers
76 views

Search query to find articles on website with certain tags

I have the following search query to find pages on my website where I'd like to make as much as possible use of existing functionalities to determine relationship names and to hardcore the least as ...
Tschallacka's user avatar
2 votes
0 answers
391 views

SQL/PHP Laravel - Looping through records to find relationships

I have two tables in my database, which contains a big list of organisations. They are called orgs_main and orgs_sub. This is ...
oliverbj's user avatar
  • 257
2 votes
0 answers
48 views

Laravel - Add different style to type of product

I'm working on a project where I have products. Each product can either be a theme, plugin or a plan. Now my idea was to add different styles to each of the types. For instance, Theme is red, Plugin ...
Rainier Laan's user avatar
2 votes
0 answers
614 views

Laravel polymorphic usage

I am fairly new to Laravel and have implemented a many to many polymorphic relationship to a model where you have two tables that act as polymorphic references one is for content (text information ...
Mark Watson's user avatar
2 votes
0 answers
26 views

Login Controller follow-up

I was wondering if this class can be refactored to be more efficient. I've taken tips from other people who have already helped me refactor it a fair amount, but I was wondering if there was any last ...
Danny Evans's user avatar
2 votes
0 answers
340 views

Steam Auth for Laravel

I'm not expert on OpenID, so i don't know if my package is correct and safe. I've realized that after login on Steam community, take about 2/3 seconds to return to my page. It's my issue or is from ...
user avatar
2 votes
0 answers
194 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 ...
user2351471's user avatar
2 votes
0 answers
780 views

Extended Laravel Eloquent models to add filters to model setters

One of the tasks I find myself doing repeatedly is to filter the incoming inputs that will be stored in models. Examples of this include trimming, removing repeated or unnecessary pre/suffixes, commas ...
Yi Jiang's user avatar
  • 520
2 votes
0 answers
633 views

Passing standard data through serviceprovider

I am using Laravel 5. To pass the users his favorites and permalink, I edited the AppServiceProvider. I was wondering if my solution is the most reasonable solution....
Szenis's user avatar
  • 121
2 votes
0 answers
269 views

Decoupling payment classes

I have several classes for payment handling, I separate these classes into directories like below. Actually I'm going to use it for Laravel project but to make it simple, maybe we can talk as if it's ...
xdim222's user avatar
  • 121
2 votes
0 answers
3k views

Laravel 5 Dependency Injecting a Repository into a controller, and depedency injecting an entity into repository

Overview:: I have a Restful API that pushes all /api/{version}/{Repository} into my ResourceV{1}Controller depending on the <...
Dustin Parham's user avatar
2 votes
0 answers
578 views

Immediately send redirect response, preserving session data

This question is for Laravel 4 only, as the relevant parts are completely refactored in the upcoming Laravel 5. I have written an helper function for validation, so I only have to put this in ...
Gras Double's user avatar
2 votes
0 answers
642 views

Social user login

This is my first Laravel package. It uses hybrid Auth package to authenticate users using their social network accounts. It can retrieve information to store in a local database. Its purpose is to ...
Carlos Arturo Alaniz's user avatar
2 votes
1 answer
111 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 ...
Adam's user avatar
  • 345
1 vote
0 answers
171 views

Handling large amount of traits and properties in classes

I've got an open-source project that I've been working on for a while, and I'm looking for advice on handling large classes. It's a Laravel 10+ package for building forms, and everything works fine, ...
Second2None's user avatar
1 vote
0 answers
92 views

Github API based backend using Laravel

I just created a Github API based backend, this api retrieves and stores information from the github users api app/Http/Controllers/GitController.php ,I am using Requests, Actions and services ...
DeveloperX's user avatar
0 votes
0 answers
30 views

injecting the laravel debugbar into a VueJS app served via vue-cli-service

My team develops an app with an API using the Laravel framework and the front-end is developed with VueJS. Locally vue-cli-service serve (a wrapper around Webpack) ...
Sᴀᴍ Onᴇᴌᴀ's user avatar