212,662 questions
0
votes
0
answers
22
views
Add Nullable Data When Update in Dynamic Form Laravel 11
I've made the store data part in this question, and it works well using the first answer from user N69S. But now I tried to implement the same code in the update data part (to add new data when ...
1
vote
1
answer
64
views
Add Nullable Data In Dynamic Form Laravel 11
I have a dynamic form inside another form with two nullable fields and one required field. I've created one submit button to submit all of the form together. I've tried to code the store data part, ...
-1
votes
0
answers
64
views
Laravel command works locally but not on cPanel: “No commands defined in the 'leaves' namespace” [closed]
I deployed my Laravel application to cPanel. On my local environment, running:
php artisan leaves:credit-monthly
works perfectly.
I then set up a cron job in cPanel to run this command, but I get the ...
2
votes
1
answer
124
views
Laravel validation for file not empty but less then 1 kb?
How to validate that uploaded file is not empty in case it is less then 1kb?
$request->validate([
'file' => [
'required',
'file',
'extensions:zip',
'max:1024',
'min:1'
]
]...
1
vote
0
answers
20
views
Laravel 12 Handling Multiple Session Guards [duplicate]
I am creating a Laravel application that will need two different authentication guards both leveraging database sessions.
Before someone suggests using roles and permission to solve the problem, there ...
-2
votes
0
answers
49
views
Filament4.x Data Export Issues [closed]
enter image description here
enter image description here
enter image description here
Why is there only a prompt indicating the start of the export after clicking export, but no completion ...
Advice
0
votes
2
replies
51
views
Integrating and Merging Third-Party API Data with Local Database
Hello I'm currently stuck doing API integration on my project. For background the user can connect a third party invoicing API to their account then they can see and manage those data with the data in ...
1
vote
2
answers
92
views
Laravel Vue Inertia delete confirm returning modal with "1" value
I am having trouble with the delete function for my table items. It keeps returning a modal with a value of 1. I have tried many possible solutions I found online, but I still have no luck. Could you ...
0
votes
1
answer
94
views
Laravel Handle multiple columns that have a relationship with a model
So I have two models, a CharacterAppearance model (what a user is wearing) and a Item model (things user can wear). The items table's schema is this:
Schema::create('items', function (Blueprint $table)...
-2
votes
0
answers
57
views
Get latest entries/posts from categories on many to many relationship Laravel [duplicate]
I have a small laravel project with posts and categories and a many to many relationship
public function post_categories(): BelongsToMany
{
return $this->belongsToMany(PostCategory::...
0
votes
1
answer
63
views
Livewire starter kit - where do I change where users are redirected to if they're authenticated and trying to access guest routes?
Right now, when a logged in user is trying to go to guest only routes such as /register while he's already logged it, it redirects to the /dashboard route.
I couldn't find where to change that.
On ...
Tooling
0
votes
1
replies
80
views
VS Code syntax highlighting error when using Blade variables inside Alpine.js @click directive
I am using Laravel Blade with Alpine.js. I am trying to pass Blade variables (an ID and a string) into a JavaScript function using the @click attribute.
However, VS Code is flagging syntax errors (red ...
Best practices
0
votes
5
replies
157
views
How to condense multiple boolean columns into one column in laravel?
How do I design a scalable user badges system without creating many boolean columns?
I'm building a badge system where users earn specific badges by completing certain tasks.
Schema::create('...
0
votes
3
answers
103
views
Example .gitlab-ci.yml for Laravel 12 with MariaDB that seeds database before running php artisan test
I'm setting up a GitLab Runner for a Laravel 12 project and I want my CI pipeline to do the following:
Spin up a MariaDB service for the tests
Run php artisan migrate:fresh --seed to seed the ...
-1
votes
0
answers
68
views
Casting as an int results in unexpected value (rounding?) [duplicate]
I had unexpected rounding issues when storing values in database columns that are defined as decimal. Bad practice and not ideal. So i changed to a bigint column in the DB and multiple every amount * ...