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

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
20
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
1
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
1
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
1
Last reply by zfhassaan 7mos ago
ismail_bourbie's avatar

Boolean cast not converting string values on save.

I’ve hit a confusing behavior with Laravel’s native boolean cast. Here’s a minimal example: $user = User::first(); $user->test = 'on'; $user->save(); Model: protected function casts(): array { return [ 'test' => 'boolean', ]; } When saving, I get: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'on' for column 'test' Is this expected be

ismail_bourbie's avatar
ismail_bourbie's avatar havanaelon7mos agoEloquent
8
1,055
Last reply by havanaelon 7mos ago
anjanesh's avatar

Filament as a SaaS ?

So I was thinking of using Nova, which is a paid subscription as a backend for laravel - I knew about Filament but last time I checked, it was a simple backend. But now when I checked the filamentphp website it seems to be an ecosystem of its own ? What's this with "Multi-tenancy built for SaaS." ? We can have a full-blown SaaS suite using filamentphp with payment bat

anjanesh's avatar
anjanesh's avatar ayoolatj7mos agoFilament
2
13
Last reply by ayoolatj 7mos ago
minaremonshaker's avatar

why feature test are always slower that unit tests?

I’ve always wondered why feature tests, especially those that interact with databases, tend to be slower than unit tests. Is it because connecting to and retrieving data from the database adds extra overhead, or are there other factors involved?

minaremonshaker's avatar
minaremonshaker's avatar minaremons...7mos agoGeneral
3
1
Last reply by minaremonshaker 7mos ago
thesimons's avatar

Is it normal to get lost in your own Laravel project?

Hey everyone, This isn’t really a help request — more of a curiosity. I’m currently working on my first big project with Laravel, and sometimes I feel like I get a bit lost inside my own app — jumping between controllers, structures, and so on. Is that something everyone goes through at some point, or does it mean I’m doing something wrong in how I’m structuring things? Thanks,

thesimons's avatar
thesimons's avatar Glukinho7mos agoLaravel
11
1
Last reply by Glukinho 7mos ago
mikailfaruqali's avatar

Which is the best VPS hosting plan?

Hello sorry for this question . I want to buy a good host, I tried several places nothing good I would be grateful if you can recommend me a reliable place and have experience with it Some of the places I bought hosting from : 1.https://www.godaddy.com 2.https://www.hostinger.com 3.https://www.bluehost.com 4.https://www.mochahost.com

mikailfaruqali's avatar
mikailfaruqali's avatar monovm7mos agoLaravel
6
1
Last reply by monovm 7mos ago
Gbever's avatar

Forge - Deleting one site only

I have multiple sites on one of my Laravel forge servers. They are not isolated, so they both use the same database ( this was my mistake when setting these up ). They also both use the same github codebase. The idea was to have a "dev site". Instead, i decided to create a new and separate server for that. What i want to do is delete the unused site, leaving the oth

Gbever's avatar
Gbever's avatar Polar_Bear7mos agoForge
3
3
Last reply by Polar_Bear 7mos ago
thesimons's avatar

Problem with a middleware

Hello, I have problems with the following middleware. The aim is whatever HTTP call outside https://my.site.com/profile/settings/spoken-languages/wizard (+ sub sections) would make sessions spoken_language_id and spoken_language_proficiency_id to be forgotten. <?php namespace App\Http\Middleware; use Closure; use Illuminate\Http\Request; class ClearSpokenLanguageWizardSe

thesimons's avatar
thesimons's avatar thesimons7mos agoLaravel
1
1
Last reply by thesimons 7mos ago
foxdevuz's avatar

React and inertia gives 502

Hello everyone I am using Laravel with React (Inertia). I have deployed the application using nginx and it works fine, I can use it, login do some other actions and so on. But on any page other than / is giving me error. Example /admin/users if I come this page from other page (using navbar or something) It's working but once I refresh the page it's showing me 502 composer.json

foxdevuz's avatar
foxdevuz's avatar foxdevuz7mos agoInertia
2
2
Last reply by foxdevuz 7mos ago
akaydin's avatar

FluxUI - flux:button not submitting the form.

I installed flux UI pro on a Jetstream project. Livewire does not throw errors when the form is completely empty, and the submit button does not seem to be working. I tried replacing the flux:button with a standard button, and it is still not working. I extracted the form livewire class to a livewire\forms form. No matter what I tried, I could not solve the issue. One reason mi

akaydin's avatar
akaydin's avatar Snapey7mos agoLivewire
3
1
Last reply by Snapey 7mos ago
Mandrizzy's avatar

NPM install doesn't work think the reason is dependency in package-lock json file

I get the following error when I try to run npm install I know it has something to do with vite or the vite plugin but not sure how to fix it can anyone offer some advice. npm error code ERESOLVE npm error ERESOLVE could not resolve npm error npm error While resolving: @vitejs/[email protected] npm error Found: [email protected] npm error node_modules/vite npm error peer vite@"^

Mandrizzy's avatar
Mandrizzy's avatar LaryAI7mos agoVite
1
9,964
Last reply by LaryAI 7mos ago
regattanetwork's avatar

Change a github branch for a site already setup with Forge

The only way I've been able to change the branch used for deployment in Forge is to remove the repository and add it again. Would be helpful if there was an easier way to do it.

regattanetwork's avatar
regattanetwork's avatar AlCo27mos agoForge
14
21
Last reply by AlCo2 7mos ago
MoeSaid's avatar

Video Call Api

Hi guys am searching for video & voice calling api looking for something free to play with Webrtc seems the best solution so far but need time to get into it , any recommendation ?

MoeSaid's avatar
MoeSaid's avatar kennyroy7mos agoTips
4
1
Last reply by kennyroy 7mos ago
stevepurcell's avatar

Filament: display the id of each repeater

I have a set of repeaters and would like to display the ID of each one to help the user know which one they were working with. I would like to place this in the ->itemLabel('1st place') I apologize, I am struggling with adding an image showing what the page looks like. return [ Forms\Components\Repeater::make('players') ->schema([

stevepurcell's avatar
stevepurcell's avatar AbdullahAy...7mos agoFilament
4
9
Last reply by AbdullahAyana 7mos ago
felixele217's avatar

Set Response Headers for statically served JS build assets

Hey guys, I have the following problem: I have two different subdomains: partner.foo.test and office.foo.test I want to write a Dusk Browser test, where I make a get request to partner.foo.test/login. The partner subdomain receives its JS build assets from office.too.test. Because I do not have configured Access-Control-Allow-Origin: * // or anything that would work I get the

felixele217's avatar
felixele217's avatar felixele21...7mos agoServers
2
2
Last reply by felixele217 7mos ago
trailcat's avatar

Logging form updates made by employees

I am building a system which will save data related to work projects created by employees. All information will be entered via forms and stored in DB tables. One requirement is that there needs to be a mechanism which is triggered nightly that sends an automated email to our supervisor of any changes that have been made to existing projects. Is there a preferred way to do this

trailcat's avatar
trailcat's avatar Tray27mos agoGeneral
5
1
Last reply by Tray2 7mos ago
laracoft's avatar

Strange behavior with spatie/laravel-permissions

My package requires spatie/laravel-permissions, so I added setPermissionsTeamId(1) in its service provider's boot(), this service provider is auto-discovered by Laravel However, it has no effect, e.g. if in one of my artisan command, I echo getPermissionsTeamId(), I get null However, if I add setPermissionsTeamId(1) to my AppServiceProvider's boot(), the echo getPermissionsTea

laracoft's avatar
laracoft's avatar simotion7mos agoLaravel
1
2
Last reply by simotion 7mos ago
drissboumlik's avatar

How to combine Laravel API (with Passport + Spatie permissions) and a web-based admin panel in the same app?

I’m currently building a Laravel application where the backend is a REST API. All my routes are defined in api.php, and I’m using Laravel Passport for API authentication along with Spatie Laravel Permissions for roles and permissions management. Now, I’ve been asked to add an admin dashboard using Blade views — basically, a traditional web interface for internal users. I plan t

drissboumlik's avatar
drissboumlik's avatar drissbouml...7mos agoLaravel
3
6
Last reply by drissboumlik 7mos ago
deebow's avatar

Two-way Many-To-Many Polymorphism: Table structure suggestion.

Hi guys, I need your suggestion or insights. I have the following entities. Game Tournament Club Player Clubs and Players may participate in many Games and Tournaments. My two options: Two-way Polymorphic Many-to-Many: eventables where both columns are polymorphic: eventable: game, tournament contenderable: club, player Separate pivot for each: game_club, game_athlete

deebow's avatar
deebow's avatar deebow7mos agoLaravel
8
1
Last reply by deebow 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.