my_name_is_dimitris my_name_is_dimitris
1
So i have this method: public function print() { $members = Member::where(['is_a_candidate' => true]) ->orWhere(['is_a_scrutineer_candidate' => true])->get(); return view('print', compact('members'));...
laracastsluvr laracastsluvr
1
Hello, I'm having issues running Horizon on a live domain lets say: subdmn.example.com/horizon/dashboard I'm just getting a blank grey-colored background page. I followed the instructions found in the documentation about non-local environments and s...
I'm overthinking a three-layered database model, which means as much as: There is a product That product can have features These features have specifications And I'd like to be able to provide thumb up/ thumb down to all three levels (or just the o...
moses moses
109
I want to write code that cleanly. So nice views. How can I do that?...
chack1172 chack1172
5
Hello, in both laravel and lumen some api gives error "No application encryption key has been specified.". In my .env APP_KEY has a value and the error happens only with 10% of requests, not all. What could be the cause? I run them in windo...
InspiredPrynce InspiredPrynce
1
Hello guys, I have an application that needs to create a content of A4 size and not more than that and it will be in a landscape mode so that when a user gets to the end of the page, it would restrict input. Please how do i implement this with either...
bradley-r-martin bradley-r-martin
3
Hey, Has anyone came across this issue, Not sure if its a bug. I have a resource route named "resources" Route::resource('resources', 'App\Http\Controllers\ResourcesController'); Works fine for GET, by trying to POST to this resource cause...
andyandy andyandy
1
I've created a gate accessBank. I like that I can use it in web.php to restrict access to some route and at the same time I can use it in blade (@can) to eg. show menu link. But when UNauthorized user tries to access ROUTE->middleware('can:accessB...
kirchaj kirchaj
3
I have a customer and order relationship with all of the crud functions working properly. When you edit an existing record, the customer select box automatically pulls up the customer. What I want to have happen is when the user goes to create a ne...
neonodyssey neonodyssey
1
When fresh installing Laravel via Docker I receive the following error messages. I am not sure if this is a docker error as I have tried this on 3 windows machines and I receive the same error. Unable to find image 'laravelsail/php80-composer:latest'...
my_name_is_dimitris my_name_is_dimitris
3
Im trying to build a small (offline,without the use of Stripe etc) membership app. What i want to achieve is having years as thead in a table and as table data/cell a true or false statement (if member has paid subscription). Im stuck for a few days...
Hi all, I'm tyring to create faker posts using tinker I get the following error message: InvalidArgumentException with message 'Source and target directories must differ.' Factory public function definition() { return [ 'user_...
Hello how can i make in eloquent this: select json_object( 'name', l1.Name, 'children', JSON_ARRAYAGG(json_object('name', l2.Name, 'children', l2.children)) ) as json from infrastructures l1 left join ( select l2.name , l2.id_infrastructure , JSON_AR...
neeonline neeonline
2
Hey y'all, I have a PostgreSQL database that should have two users, one will be used locally by Laravel and the other by another app. My problem is, I've created the database, the two users, and granted all permissions to both. Once I ran the migrati...
I am going to be upfront and mention I never learned regular expression. I am using the alpha_dash verfication for my users. I have a comment thread where I would like to get the usernames in the comment such as @loachman. I know alpha_dash can have...
Loach replied
Solved
I figured that I'm done making forms for every model in my applications so I started planning a formbuilder class but, in my first steps, I stumbled on this: Is it possible to get the attributes of a model class, not instance? What I want to do is to...
kirchaj kirchaj
1
I have a system with customer, orders, payments, addresses, etc. I have a customer summary page that shows existing data and the ability to create new orders etc. How do I pass the customer ID from a view to the create form so the user doesn't have...
karresachi karresachi
5
Hello, I have a userthat has a business and a business has employees My app has many businesses. When I log in as business 1 I can create a employee but dont know how to get the business_id on the users table (employees table has a foreignId business...
tykus replied
Solved
roman_paprotsky roman_paprotsky
3
I have a Shifts model that can have multiple invoices attached to it, and thus has an "invoices" relationship that returns an array of Invoice objects. Each of these Invoice objects has a employee_id field in it that tells me what employee...
Ajvanho Ajvanho
1
I installed new package with sam facade, as previous. I remove previous package, and delete service provider, but have an error for previous package. How to remove that facade?...
Hej I'm a beginner and I'm watching a crash course on youtube. I guess the version has updated and some things don't work as they used to. Anyways here's my issue This is the code I'm using and I'm trying to do a remember me checkbox. I have set up t...
FutureWeb FutureWeb
7
Hi Lara peeps I know this isn't really laravel related but I have a legacy app I am working on which has been hacked I am seeing query strings like this: ?exp_slug=".gethostbyname(lc("hitox"."axwtshsj065b3.bxss.me."))."A...
asdfghjkl;' asdfghjkl;'
7
I have created a new laravel project in a fresh public_html dir on my work's server using composer create-project laravel/laravel public_html I have created the vue component and the controller to display the homepage upon visiting the site but inst...
rachids rachids
2
Hello artisans, I have a controller that saves a model and then sends an email. The model has a global scope that checks all permissions a user can have over the model. (we have to do this because we are in the middle of a refactor and the old permis...
Tithira Tithira
1
I am a beginner with NoSQL and trying to connect Dynamodb database to my Laravel App ( v7). I am using https://github.com/renoki-co/dynamodb this package and successfully setup a local environment for the dynamodb. I created a table according to the...
Hello people, I'm making an eshop and I need to have a reference to a Cart class. That class, if the user is logged in would be an instance of model class and if the user is not logged on, it will be a class that does not inherit from anywhere. Now,...
cosminc cosminc
2
Hello! When using updateOrInsert() is it possible to set the timestamps according to the action that's taking place? For example, if insert is performed, then set the timestamp in the created_at column and if update is performed then populate the upd...
I'm currently developing on the TALL stack and I was wondering how I could go about making an accordion component, specifically for my navigation bar? Many, if not all of the public guides I've seen on Accordion's for Vue require features that Alpine...
InspiredPrynce InspiredPrynce
8
Hello guys, i need to check if a datetime is either yesterday or today in laravel5....
neilstee neilstee
2
I'm not sure if it's a bug or the filters really work this way but when I select the "Unsolved" filter, it shows me the unsolved issue which is expected. But when I try to choose a category (Laravel for example), my "Unsolved" fil...
jandante jandante
2
I have inconsistent behaviour when performing a request to a route. Sometimes it returns me an array and sometimes it returns an object. I can simulate it by using another user to perform the request ... I've narrowed it down to a specific part of th...
gizmojo gizmojo
0
I'm trying to set the presenter class in the constructor but I'm getting error: Unresolvable dependency resolving [Parameter #0 [ $entity ]] in class Laracasts\Presenter\Presenter I have lots of simple models (id, name & timestamps) and I don't...
andyandy andyandy
3
I need to code this. https://i.imgur.com/i91AZIJ.jpg It has to keep proportions/ratios of images/blocks when being resized. And has to be responsive. I'm thinking maybe Grids? Or Flexbox? Maybe Bootstrap? But it seems more like a table? I don't know....
asdfghjkl;' asdfghjkl;'
2
The site won't let me post my question because of this error: "You may not include links the first day you sign up" though my question contains no links...
piljac1 piljac1
2
Hey guys! I was just wondering if there's any PSR standard regarding PHP arrow functions. In the PHP doc, the RFC and some articles they use the functionality as follows: fn() => 'value', but I haven't found anything PSR related that states a &quo...
Create a New Discussion Button