Browse AI Field GuideForum Podcast
All ThreadsLeaderboard
  1. Discussions

    1. Popular This Week
    2. Popular All Time
    3. Solved
    4. Unsolved
    5. No Replies Yet

ahmadbadpey's avatar

automatically currency rate conversion in laravel models

I have a Product model included sale_price , purchase_price.this fields holds values as IRR (Iranian rial) currency, means that when an operator user is saving a product ,specifies Sale and Purchase prices in IRR currency in default. Now in many situations I want to show a list of all products along with their prices that default is same currency that I stored in DB. Then I wa

ahmadbadpey's avatar
ahmadbadpey's avatar benjamin34...4w agoGuides
4
1
Last reply by benjamin345 4w ago
nodenacci's avatar

Laravel currency conversion

I am trying to create and eCommerce website where the price of items displayed is equivalent to user location. Am currently in kenya so i expect all IP's accessing the website from kenya to view price in KES. However, all other locations that aren't Kenya to view in USD. It should be able to convert using the current existing rates. Is their a package? How do i go about it?

nodenacci's avatar
nodenacci's avatar benjamin34...4w agoLaravel
2
1
Last reply by benjamin345 4w ago
mybyvyduyoe's avatar

Microsoft Clarity fragments sessions on every `wire:navigate` - has anyone solved this?

Issue I'm running Microsoft Clarity on a Laravel + Livewire v4 + Flux app. Every internal navigation via wire:navigate seems to end the current Clarity session and start a new one, so a single user visit ends up as a long list of tiny 4โ€“30 second recordings, one per page. What I see in Clarity's recordings list for one user, all within ~40 minutes: Time Entry / Exit URL Page

mybyvyduyoe's avatar
mybyvyduyoe's avatar ghabriel254w agoLivewire
1
1
Last reply by ghabriel25 4w ago
Randy_Johnson's avatar

Event-Driven Architecture, do I need it?

So am progressing with the website with the help of AI, and its telling me I should implement event driven architecture for my stock/ items page. Reading through it, it looks pretty complicated. Here is a snippet of code. <?php namespace Modules\Inventory\Actions; use Illuminate\Support\Facades\DB; use Modules\Inventory\Models\InventoryItem; use Modules\Inventory\Models\In

Randy_Johnson's avatar
Randy_Johnson's avatar vincent150...4w agoAI
8
4
Last reply by vincent15000 4w ago
jalaf11201's avatar

I'm having problems on deciding an architecture for sub navs, and I'm having trouble on deciding how to manage the page without refresh without messy code.

I'm creating a community based SN, I created manage section for community owners, and there is nav on top like general, privacy, sections (flairs), users (follow, requests), posts (requests, pinned, etc.) inside. I created blade pages for them, but inside them there are sections again. Like Followed, Requests, Pinned, Removed etc. Making separate pages for them would be bad. I

jalaf11201's avatar
jalaf11201's avatar vincent150...4w agoGeneral
1
1
Last reply by vincent15000 4w ago
kylef-fotf's avatar

Observer and scheduled publish dates

In models that utilize a published_at attribute, what is a clean way to get an Observer to know that a record has passed it's published_at date and is now published? The main use case for this is I want to trigger a service function that should only apply to published records and not scheduled ones. I know this is a logical issue. The published_at timestamp is updated in advanc

kylef-fotf's avatar
kylef-fotf's avatar imrandevbd4w agoLaravel
5
1
Last reply by imrandevbd 4w ago
charlesmun's avatar

403 Forbidden issues in Laravel EC2 and Lightsail for Laravel, Filament, Nginx on login

I am deploying a Laravel 12 and Filament 4 application to an Nginx server. My issue is that after the full setup of the ubuntu instance and pulling code from GitHub, the application login page, Password Rest and Signup are all accessible, however, the moment I login, I get a 403 Forbidden error. I am asking for anyone to point me in the right direction on how to fix such an iss

charlesmun's avatar
charlesmun's avatar imrandevbd4w agoLaravel
2
1
Last reply by imrandevbd 4w ago
kai-init's avatar

I built a automatic normalized caching layer for Eloquent โ€” massive Redis memory savings

Hey everyone ๐Ÿ‘‹ Over the past few months, Iโ€™ve been working on a small open-source package called laravel-normcache. It actually started from a problem I kept running into across a few different projects. I found myself repeatedly building the same kind of caching layer to avoid redundant Eloquent data sitting everywhere in Redis, so eventually I thought: why not turn it into a

kai-init's avatar
kai-init's avatar kai-init4w agoEloquent
4
1
Last reply by kai-init 4w ago
Michael88's avatar

Connect to postgres cluster

Hello Could anyone please help me with pgsql cluster issue I used this config 'pgsql' => [ 'driver' => 'pgsql', 'host' => [ env('DB_HOST_1', '10.0.0.1'), env('DB_HOST_2', '10.0.0.2'), ], 'port' => env('DB_PORT', '5432'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USER

Michael88's avatar
Michael88's avatar JussiManni...1mo agoLaravel
8
1
Last reply by JussiMannisto 1mo ago
Respect's avatar

how to listen globally to livewire updating hook from AppServiceProvider.php in livewire 4

how to listen globally to livewire updating hook from AppServiceProvider.php in boot method Does not work \Livewire\Livewire::listen('component.updating', function ($component) { // This will now catch the internal "Livewire\Generated\Component..." classes throw new \Exception('Global Boot Caught SFC: ' ); });

Respect's avatar
Respect's avatar Respect1mo agoLivewire
16
2
Last reply by Respect 1mo ago
laracoft's avatar

Backup and restore Laravel projects

Can anyone share how they are doing backups and restore of multiple Laravel projects? In particular, I'm concerned with DB, .env and storage as these are not version controlled. Preferably it is all done via SSH. I'm hoping it is easy to setup, verify that it is working correctly and of course, easy to restore too.

laracoft's avatar
laracoft's avatar Cordario1mo agoLaravel
6
1
Last reply by Cordario 1mo ago
ShuftiPro's avatar

shopify development

We need liquid language lessons, to develop, and design Shopify stores for clients, would you please let me know when will you start working on it? its most popular and famous domain , but here is nothing about shopify , we need your help. please work on liquid code basic and advance.

ShuftiPro's avatar
ShuftiPro's avatar Lisalrby1mo agoDesign
2
1
Last reply by Lisalrby 1mo ago
avishkaMe's avatar

Implement ticket watch feature like jira,clickup using laravel

Hello there, I'm working on a support ticket system project, which have features like add tickets, assign to member groups, commenting for ticket, attaching files. Now the client wants a feature like watching the ticket. So if a user decide to watch the specific ticket, each activity related to that particular ticket should notify to the user.(Ex: through email) I searched the

avishkaMe's avatar
avishkaMe's avatar vincent150...1mo agoLaravel
3
2
Last reply by vincent15000 1mo ago
eskiesirius's avatar

Increment/Decrement on High Traffic

I created a fintech app, right now i am using ->increment/decrement for the balance.. my current problem is that when a certain merchant has lots of traffic, it causes a problem it needs to wait before it updates because of the atomic lock.. I also have a ledger of the wallet transaction but using sum to get the real balance will be very expensive when it has a lot of record

eskiesirius's avatar
eskiesirius's avatar Jsanwo641mo agoEloquent
8
1
Last reply by Jsanwo64 1mo ago
Rankus's avatar

Illuminate\Http\Client\PendingRequest : set headers in beforeSending callback

Hello, I'm trying to add headers to outgoing PendingRequests from within beforeSending callback. I guess it's the right moment to be sure everything I need is set to populate my headers' data. Here is my callback: public function buildRequestToHeaders(\Illuminate\Http\Client\Request $currentRequest, array $options, PendingRequest $requestTo): PendingRequest { $headers['x-fo

Rankus's avatar
Rankus's avatar Rankus1mo agoLaravel
2
1
Last reply by Rankus 1mo ago
AxelG's avatar

Add meta to JSON:API resource relationships

Hi, I am using the native JSON:API implementation added in Laravel 13 to gererate resources from my models. One of my models have a many-to-many relationship with pivot values. I want them to be included in the relationship on the resource object. With the help of laraveljsonapi package documentation and AI, I found that I am supposed to put the pivot values in the meta object

AxelG's avatar
AxelG's avatar AxelG1mo agoLaravel
5
2
Last reply by AxelG 1mo ago
eskiesirius's avatar

Database Backup Rule

Hello! i am currently using dedicated database of Digital Ocean and it has a standby node. My question now is that, what is the best practice for creating backups? Do i still need to dump the file? How about the binlogs? What are the best config for the database? EDIT: My app is a Payment gateway, we are now handling large amount of money daily

eskiesirius's avatar
eskiesirius's avatar imrandevbd1mo agoDevOps
3
1
Last reply by imrandevbd 1mo ago
Bento's avatar

VSCode/Cursor setup for PHP 8.5 & Laravel 13?

Hiya, Been using VSCode and now Cursor for years and have accumulated some extensions to work with Laravel and PHP. However I have started to become a little puzzled which ones I really need and trying to declutter / optimize my setup. Currently I run: Intelephense (paid) Laravel (Official extension) Laravel Pint to format on save etc. PHPStan by SanderRonde PHP Namespace Reso

Bento's avatar
Bento's avatar imrandevbd1mo agoPHP
3
31
Last reply by imrandevbd 1mo ago
alexteie's avatar

is there already an good implentation of passkey's in laravel?

I want to implement passkey to laravel framework? is there an good howto/tutorial? or can laravel do this out off the box with Auth method?

alexteie's avatar
alexteie's avatar martinbean1mo agoLaravel
3
1
Last reply by martinbean 1mo ago
eskiesirius's avatar

Database Replication

Hello! i created a fintech app, and right now we have a high traffic(16 reqs/second.. not sure if this is a high traffic already) and now, i am thinking of using a database replication.. by setting the read/write config and 'strict' => true, ... should i not be worried of the integrity of the data? like the delays of the newly added/updated record?

eskiesirius's avatar
eskiesirius's avatar martinbean1mo agoDevOps
9
3
Last reply by martinbean 1mo ago
seongbae's avatar

Migrating to Laravel Cloud

Hello, I am in the process of migrating a site from Forge/Digital Ocean to Laravel Cloud. Laravel Cloud seems pretty easy to set up and use, however, I am not sure how to migrate existing files in the storage/app folder to a new bucket created on Laravel Cloud . I am not using S3 on the current server set up. All the files are stored on the web server under storage/app folde

seongbae's avatar
seongbae's avatar seongbae1mo agoServers
2
2
Last reply by seongbae 1mo ago
ghabriel25's avatar

Fat service class

Please give your honest review about my service class. This class only called from model observer, wrapped within database transaction and handle creating and deleting user activities deleting notifications related to activities Model Type Softdelete UserActivity Polymorphic โœ”๏ธ Notification Polymorphic โŒ Trying to consolidate it with dedicated class but dont know

ghabriel25's avatar
ghabriel25's avatar ghabriel251mo agoCode Review
6
1
Last reply by ghabriel25 1mo ago
gravity_global's avatar

JSON:API Resource collections is there an issue with docs?

So the docs have these as being equal ways to return a collection of JSON:API resources. return PostResource::collection(Post::all()); return Post::all()->toResourceCollection(); However thats misleading. The first would go Illuminate\Http\Resources\JsonApi\AnonymousResourceCollection which has the with method providing the 'included' in the output. The section would attem

gravity_global's avatar
gravity_global's avatar gravity_gl...1mo agoEloquent
13
833
Last reply by gravity_global 1mo ago
jswoolf01's avatar

Best way to truncate very large data table?

Long story short: I maintain a large Laravel database app that runs mainly on PHP, with MariaDB as the database engine. One table in this database is a log of changes to another table. I recently discovered that due to a problem of some kind (not yet sure what), the log table had bloated to a frightening size: more than 167 million records, with the vast majority of them bein

jswoolf01's avatar
jswoolf01's avatar jswoolf011mo agoEloquent
5
4
Last reply by jswoolf01 1mo ago
Shivamyadav's avatar

what folder structure patterns have you found most effective ?

In Laravel projects, what folder structure patterns have you found most effective for keeping interfaces (contracts) and their implementations maintainable as the codebase grows? Specifically, how do you balance: feature-based organization vs layer-based organization discoverability vs separation of concerns Any examples from production applications would be helpful.

Shivamyadav's avatar
Shivamyadav's avatar martinbean1mo agoTips
4
16
Last reply by martinbean 1mo ago

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

ยฉ Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

ยฉ Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.