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

ahmadreza1383's avatar

The EasySail repo for simplifying working with Sail.

Hey Laravel community! 👋 I’ve been working on a new package called EasySail: github.com/karbordia/easysail The goal of this package is twofold: Provide a reliable source of pre-built Laravel Sail images so you don’t have to rebuild them every time. Eliminate extra dependencies like installing Composer or PHP on your host machine. Eventually, I’m planning to add a CLI tool to

ahmadreza1383's avatar
ahmadreza1383's avatar martinbean7mos agoFeedback
8
1
Last reply by martinbean 7mos ago
PetroGromovo's avatar

Why I got error Request rate limit has been exceeded with openai-php/laravel library?

I have just created new account at openai.com, but when I try to ask a question in my Php\Laravel programm with https://github.com/openai-php/laravel library, with sample code like : $response = OpenAI::responses()->create([ // 'model' => 'gpt-5', // I tried all models // 'model' => 'gpt-4o', 'model' => 'gpt-4.1', 'input' => 'Hello!', ]); echo $

PetroGromovo's avatar
PetroGromovo's avatar ajithlal7mos agoLaravel
1
1
Last reply by ajithlal 7mos ago
ahoi's avatar

Schema::replace does not change postgres data structure?

Hi there, I would like to change the name of a table inside of a migration command I built: \Schema::rename('stored_events', 'stored_events_bak'); \Schema::rename('stored_events_migrated', 'stored_events'); Now the problem is: The stored_events_migrated table is indeed renamed to stored_events, but the Postgres data structure is still referencing the original t

ahoi's avatar
ahoi's avatar Tray27mos agoLaravel
2
1
Last reply by Tray2 7mos ago
Snapey's avatar

Not seeing any indication of solved..

This seems to have disappeared from smaller displays? (on the index)

Snapey's avatar
Snapey's avatar JeffreyWay7mos agoFeedback
1
1
Last reply by JeffreyWay 7mos ago
mix359's avatar

Order by eager loaded colum

Hi to all, I'm having some trouble finding the right/best way to do one thing: I've some case where I need to do the sorting based on a column that is loaded through eager loading. Here an example: Account (id, name, surname) <-> Teacher (account_id) Teacher::with('account')->orderBy('surname'); Usually the eager loading work great in those situation, where I need to a

mix359's avatar
mix359's avatar Snapey7mos agoEloquent
10
42
Last reply by Snapey 7mos ago
orest's avatar

remove fake notifications

In the majority of my tests in Dusk, I want to run Notification:fake() and in order to avoid writing it in every test file, I moved it to DuskTestCase abstract class DuskTestCase extends BaseTestCase { use CreatesApplication; public function setUp(): void { parent::setUp(); Notification::fake(); } } However, there are few tests that I actually

orest's avatar
orest's avatar kevinbui7mos agoLaravel
5
2
Last reply by kevinbui 7mos ago
minaremonshaker's avatar

Differentiating One-to-One and One-to-Many Morph Relationships for User Uploads in Laravel

Suppose I have a single table and model for uploading all application files related to a users or any other model (like:posts etc...), including their profile picture and other documents. The profile picture uses a morphOne (one-to-one polymorphic) relationship, while the other documents use a morphMany (one-to-many polymorphic) relationship. In Laravel, how can I distinguish b

minaremonshaker's avatar
minaremonshaker's avatar Tray27mos agoEloquent
2
1
Last reply by Tray2 7mos ago
sumeetghimire's avatar

Laravel AI Orchestrator AI with Contextual Memory and Multi-Provider Support

Laravel AI Orchestrator is a Laravel package similar to prism, It supports multiple providers like OpenAI, Anthropic, Gemini, and Ollama with automatic fallback if one fails, structured outputs for clean data handling, and optional Contextual Memory that lets your AI remember previous conversations using cache or database. You can easily test and manage everything with built-i

sumeetghimire's avatar
sumeetghimire's avatar sumeetghim...7mos agoAI
2
1
Last reply by sumeetghimire 7mos ago
Darkdawg's avatar

Every translation helper has a broad return type?

I noticed the translation helpers __() and trans() return array|string|null. This means you cannot print/cast these to string without getting errors from PHPStan. Shouldn't Laravel come with at least a string return type translation helper out of the box? Or am I missing something?

Darkdawg's avatar
Darkdawg's avatar Darkdawg7mos agoLaravel
11
1
Last reply by Darkdawg 7mos ago
me108's avatar

Job fails silently on exception, nothing is logged

I have a weird issue with my Laravel 10 project on Windows 11. When a job throws an exception, Laravel just quits silently without logging anything to /storage/logs/laravel.log. It also ignores try-catch blocks and quits the execution nontheless. It wasn't always like that. It worked in the past. But I can't remember when it stopped and what I might have changed, except from ad

me108's avatar
me108's avatar me1087mos agoLaravel
5
1
Last reply by me108 7mos ago
naykel's avatar

How to prevent Choices.js from resetting on Livewire updates?

Hi all, I’m building a reusable multi-select component using Laravel Livewire 3, AlpineJS 3, and Choices.js. Individually, everything works fine — but when I combine them, the Choices instance resets every time the Livewire property updates. Most solutions I’ve found either suffer from the same issue or don’t work at all. From what I can tell, this is due to how Livewire reacti

naykel's avatar
naykel's avatar masokky7mos agoLivewire
5
9
Last reply by masokky 7mos ago
srushti_k's avatar

Laravel ZipArchive Cleanup Bug: Empty Folder Not Deleting After Zip Upload

Hey Laracasts community! I'm running into a frustrating issue in my Laravel app where, after uploading multiple documents, creating a ZIP file, and uploading it to cloud storage (DigitalOcean Spaces), the cleanup process isn't fully working. Specifically: The individual files get deleted. The ZIP file gets deleted. But the empty directory persists, even though scandir() claims

srushti_k's avatar
srushti_k's avatar srushti_k7mos agoLaravel
1
1
Last reply by srushti_k 7mos ago
Arigo's avatar

Login redirect problem

i developed a transcript management system solution which the signing up and loging in works like this. After signing up at the userside, the newly created account becomes diabled by default and would require validation from the admin before the user can login. after the validation using a toggle switch the user will be able to login successfully and it will take the user to t

Arigo's avatar
Arigo's avatar Arigo7mos agoFeedback
2
1
Last reply by Arigo 7mos ago
uluumbch's avatar

Custom validation class

I create a custom validation using Class that implements ValidationRule. it works perfectly, the problem is I can't use custom error message just like other laravel native rule. <?php namespace App\Rules; use Closure; use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Validation\Validator; use Illuminate\Contracts\Validation\ValidatorAwareRule; use Illumina

uluumbch's avatar
uluumbch's avatar uluumbch7mos agoLaravel
4
1
Last reply by uluumbch 7mos ago
vincent15000's avatar

Cashier / Stripe / How to calculate automatically taxes ?

Hello, I have added Cashier::calculateTaxes(); in the AppServiceProvider. But sure it's not sufficient. I had a look at the documentation and it seems to be necessary to configure something. But it's quite difficult for me, because I don't know so much about taxes and it's the first time I really use Stripe and Cashier. The idea is : a french company will sell subscriptions to

vincent15000's avatar
vincent15000's avatar vincent150...7mos agoLaravel
3
1
Last reply by vincent15000 7mos ago
june23's avatar

Do E-Commerce Backend APIs need a lot more work than a clone of Twitter or Stackoverflow.com? In terms for Portfolio Projects.

I stumbled on a article not to long ago I think it was on Medium, and also have asked AI like Gemini for this answer, but I want to hear it from a professional who knows these kinds of things. My question is... Is it true that for Portfolio Projects, like E-Commerce Backend APIs (weather simple or complex) are more bulkier and a bit more harder to implement as opposed to a clon

june23's avatar
june23's avatar ian_h7mos agoGeneral
1
1
Last reply by ian_h 7mos ago
DanielRønfeldt's avatar

Force file downloads in Laravel + Inertia + Vue?

As the title says, I'm trying to figure out how to force file downloads in a Laravel 10 project running Inertia with the Vue 3 stack and the Composition API. The solution that LaryAI is suggesting involves using the Inertia.get() method, which is triggering an error saying that Inertia is not installed, which I believe is kinda silly since my whole project is Inertia-driven and

DanielRønfeldt's avatar
DanielRønfeldt's avatar gguio7mos agoInertia
6
5
Last reply by gguio 7mos ago
Samer_J's avatar

Class 'Tests/TestCase' not found when attempting to run test

Can't find a solution to this anywhere. I've simply followed along with the Laravel 5.4 docs in the "Testing: Getting Started" section. I created a new test using "make:test" and then executed "phpunit" from my terminal. This is the error message I get: PHP Fatal error: Class 'Tests\TestCase' not found in /home/vagrant/Projects/mgn/tests/Feature/T

Samer_J's avatar
Samer_J's avatar tinker7mos agoTesting
15
5
Last reply by tinker 7mos ago
Laudenz's avatar

Deploy my Laravel project to a production server

Hi everyone, I’m new to Laravel. I followed the beginner tutorial and built my first app using Herd locally. The framework feels great, but I’m struggling to deploy my project to a production server. Is there a step-by-step guide (or best practices) for publishing a Laravel app that was developed with Herd? Thanks in advance!

Laudenz's avatar
Laudenz's avatar Laudenz7mos agoLaravel
5
10
Last reply by Laudenz 7mos ago
MohammadAsadi's avatar

How to download apk file on laravel?

Hi I upload apk file on storage folder and Write this code on controller: $file = "/home/user/public_html/storage/app.apk"; return response()->file($file ,[ 'Content-Type'=>'application/vnd.android.package-archive', 'Content-Disposition'=> 'attachment; filename="app.apk"', ]) ; now download app but is zip file How to fix it?

MohammadAsadi's avatar
MohammadAsadi's avatar tenorjamal7mos agoLaravel
6
3
Last reply by tenorjamal 7mos ago
earmsby's avatar

2-way relationship in Filament?

I have a model called Contract. Contract has a many-to-many relationship with itself called relatedContracts. The pivot table for this has 2 fields: contract_id & related_contract_id. In my view for Contracts in Filament I have a relation manager called RelatedContractsRelationManager.php. This works fine if I am on the contract with the ID in the contract_id field -> it

earmsby's avatar
earmsby's avatar earmsby7mos agoFilament
3
1
Last reply by earmsby 7mos ago
CaptainJackas's avatar

npm run dev not compiling app.scss

Hi all, I just created a new Laravel project and I keep running into the following problem. Whenever I execute the npm run dev and I reload the page, it keeps loading and eventually the app.scss is returning ERR_EMPTY_RESPONSE after like 5 min, whereas the app.js is generated and loaded just fine. Funny thing is, when I reload the page and after that I hit q+enter in the comman

CaptainJackas's avatar
CaptainJackas's avatar CaptainJac...7mos agoVite
2
1
Last reply by CaptainJackas 7mos ago
phpMick's avatar

How are well all using AI?

I just thought I would start a discussion to see what other people are doing. I used to be a big fan of TDD but now I work differently: give AU (Augment currently) my requirements for one file (eg a model factory) write manual(ish) tests to confirm that the requirements have been met step through the tests with xdebug and bugfix as I go I really like this because the tests c

phpMick's avatar
phpMick's avatar phpMick7mos agoGeneral
0
1
SPresnac's avatar

HasOne relation with lowercase compare?

Hej, I do have a hasOne relation like this public function employee(): HasOne { return $this->hasOne( related: Employee::class, foreignKey: 'username', localKey: 'username', ); } Problem is: The "Employee" class is extern (like in an external DB, I do have only read access). Some Usernames are written

SPresnac's avatar
SPresnac's avatar martinbean7mos agoEloquent
4
2
Last reply by martinbean 7mos ago
LvckyAPI's avatar

Reverb is not receiving event

I am trying to build a real-time chat. So I need reverb to send the messages to everyone live without reloading the page. Problem is, that the MessageCreatedEvent was not received by reverb. Only th pusher ping is in the log. The queue is working and is dispatching the event correctly. REMIND: It's a docker compose setup, so vite has to be the real url and Reverb is internal re

LvckyAPI's avatar
LvckyAPI's avatar zfhassaan7mos agoReverb
9
4
Last reply by zfhassaan 7mos 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.