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

Chron's avatar

Track user's last activity

I want to track user's last activity. I'm using Vue, Inertia, and Laravel. I think having a session table or adding a last_activity column in users table is fine. Then update that every request. Wouldn't it be expensive performance-wise, since it creates transaction to the database every single request? What about recording that data to JS sessionStorage instead?

Chron's avatar
Chron's avatar Chron8h agoFeedback
14
300
Last reply by Chron 8h ago
vincent15000's avatar

Eloquent inside a migration ?

Hello, I have this code. public function up(): void { Schema::table('packages', function (Blueprint $table) { $table->foreignUlid('client_id')->after('site_id')->nullable()->constrained()->cascadeOnDelete(); }); $packages = Package::with('site')->get(); foreach ($packages as $package) { $package->client_id = $package->si

vincent15000's avatar
vincent15000's avatar vincent150...23h agoLaravel
17
500
Last reply by vincent15000 23h ago
trojansc's avatar

'laravel_session' cookie is not set

As the title, the 'laravel_session' cookie is not set on the production server, and the form is failed to process. I'm running Laravel version 5.6, PHP 7.2.4-1 and ubuntu16.04.1 on the production server. However, I run the same code and setting locally in MAMP. it's working fine. The 'laravel_session' cookie is created automatically, and I can view it inside the browser.

trojansc's avatar
trojansc's avatar Obaidullah...1d agoLaravel
26
86
Last reply by ObaidullahBuniadi 1d ago
Kesavan_Kani's avatar

How to stop auto refresh?

Hi, My website automatic refresh with second. How to stop auto refresh? Anyone pls help me.

Kesavan_Kani's avatar
Kesavan_Kani's avatar aliyyanWij...1d agoLaravel
17
99
Last reply by aliyyanWijaya 1d ago
lara28580's avatar

How to solve "ERR_TIMED_OUT" error?

I am trying to access my page , but I am getting the following error "ERR_TIMED_OUT". Someone can tell me how to resolve the error?

lara28580's avatar
lara28580's avatar georgekeys1d agoLaravel
10
10,944
Last reply by georgekeys 1d ago
Sadman's avatar

What is the best SMTP server for ensuring bulk marketing emails reach the Gmail inbox instead of the spam folder?

I've tried ServerSMTP and AWS SES, with all configurations correctly set up, but the emails still ended up in spam.

Sadman's avatar
Sadman's avatar davidsnnw1d agoFeedback
18
315
Last reply by davidsnnw 1d ago
terrylinooo's avatar

Laravel Octane benchmark comparing Swoole, OpenSwoole, RoadRunner, FrankenPHP

I made a Laravel Octane benchmark comparing Swoole, OpenSwoole, RoadRunner, FrankenPHP, and PHP-FPM. Report: terrylinooo.github.io/laravel-octane-benchmark The benchmark compares p99 latency, memory, CPU overhead, DB workload, I/O workload, and different concurrency levels. My main takeaway: Octane is not a simple “turn it on and everything is faster” solution. It depends a lot

terrylinooo's avatar
terrylinooo's avatar MariaJBurk2d agoLaravel
1
726
Last reply by MariaJBurk 2d ago
Shivamyadav's avatar

How are you handling Laravel config/constants/translations in Vue with Inertia at scale

I’m working with Laravel + Inertia + Vue 3 and I’m struggling with how to properly expose backend data like config values, constants, and translations to the frontend in a scalable way. Using HandleInertiaRequests::share() for everything feels wrong once the app grows. The payload gets bigger, everything is sent on every request, and it turns into a dumping ground for global da

Shivamyadav's avatar
Shivamyadav's avatar JussiManni...2d agoFeedback
3
16
Last reply by JussiMannisto 2d ago
diazwatson's avatar

Multiplayer Game Using Livewire?

Hi, I am working on a multiplayer card game project and I would like to use Livewire for it. The idea Registered users can start a new game or join an existing one. To join an existing game user needs to input a unique code (game identifier code?). Players play in turns. On every turn, a new card is presented to all players but only the player playing can interact with it (cho

diazwatson's avatar
diazwatson's avatar Joahi932d agoLivewire
11
512
Last reply by Joahi93 2d ago
SigalZ's avatar

Yajra datatables questions

Hello, I installed yajra datatables version 12 on my laravel 12 project. I have a few questions and I just don't understand the documentation. On the Quick Starter instructions, it says: "Next, we will install Laravel DataTables Vite to simplify our frontend setup. npm i laravel-datatables-vite --save-dev This will install the following packages: Bootstrap Icons DataTab

SigalZ's avatar
SigalZ's avatar vincent150...2d agoLaravel
15
596
Last reply by vincent15000 2d ago
gravity_global's avatar

Laravel concurrently and the shell-quote exploit

Looks like all installs of 11x, 12x and 13x are all going to face an issue with concurrently currently. All three latest versions of Laravel use the 9x branch "concurrently": "^9.0.1", So will be pulling in EOL v9.2.1 from Aug 2025 https://github.com/open-cli-tools/concurrently/tags The issue with that is its dependency is fixed to "shell-quote": &

gravity_global's avatar
gravity_global's avatar gravity_gl...2d agoLaravel
3
810
Last reply by gravity_global 2d ago
ErikRobles's avatar

SEO and Laravel - Links appear Broken but work just fine

Hello Everyone. I have a quick question. I got my Laravel app up and running and when I do a broken link check with various online broken link checkers, all my links show up as broken. As this does have an impact on SEO, I was wondering how one goes about dealing with this. for example, in my wep.php, I have a route to my contact page which is {{ route('contact') }} . Now this

ErikRobles's avatar
ErikRobles's avatar CapPerez2d agoLaravel
3
1
Last reply by CapPerez 2d ago
Naman178's avatar

Laravel SEO

I have a Laravel-based e-commerce site focused on wallet products, and I'm seeking tips or tutorials to enhance its SEO and increase its visibility in search results. Any assistance or guidance would be greatly appreciated.

Naman178's avatar
Naman178's avatar eltonwilli...2d agoTips
6
173
Last reply by eltonwilliams 2d ago
Halim's avatar

Migration fails with "Specified key was too long; max key length is 1000 bytes" on MySQL 8.4.7

Hi, I am getting the following error when running php artisan migrate on a fresh Laravel 13 installation: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes — table failed_jobs add index failed_jobs_connection_queue_failed_at_index(connection, queue, failed_at) Environment: Laravel 13.16.1 PHP 8.3 MySQL 8.4.7 WAMP on

Halim's avatar
Halim's avatar JussiManni...2d agoDesign
7
622
Last reply by JussiMannisto 2d ago
Shivamyadav's avatar

Tracking actual data transfer (images, videos, assets)

I'm trying to track the actual amount of data transferred when a user loads a page, including: Images Videos CSS JavaScript Fonts Assets served from S3/CloudFront I tried measuring the Laravel response size, but that only includes the HTML/JSON returned by Laravel and not the assets loaded by the browser. I also tried using the browser Performance API (performance.getEntriesB

Shivamyadav's avatar
Shivamyadav's avatar Shivamyada...3d agoGuides
2
7
Last reply by Shivamyadav 3d ago
jakubjv's avatar

How connect to MySQL database container with table plus?

Hi everyone, I’m trying to connect to a MySQL database through TablePlus. The database is running inside a container, and this is my first time containerizing a Laravel application. The build process goes smoothly and all services are running as they should, including the MySQL container. The issue is that I’m not sure what the problem is with the connection in TablePlus. When

jakubjv's avatar
jakubjv's avatar anjanesh3d agoLaravel
2
93
Last reply by anjanesh 3d ago
randomcast's avatar

Unable to disable deprecations logging

I cannot seem to disable deprecations loggings/attempts of loggings, running Laravel 9.11. My logging.php config file is not altered, containing: 'deprecations' => [ 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), 'trace' => false, ], and my env file has LOG_DEPRECATIONS_CHANNEL=null However, i still keep getting deprecations logging att

randomcast's avatar
randomcast's avatar MariaJBurk3d agoLaravel
3
246
Last reply by MariaJBurk 3d ago
ResamkitheDeveloper's avatar

Issue: command fails when i run php artisan schedule:run

I am getting the following error when i run php artisan schedule:run There are no commands defined in the "xxxxx" namespace. {"exception":"[object] (Symfony\Component\Console\Exception\NamespaceNotFoundException(code: 0): Both my command and app.php files look okay. I am using withschedule like ->withSchedule(function (Schedule $schedule) { $schedule

ResamkitheDeveloper's avatar
ResamkitheDeveloper's avatar Glukinho3d agoLaravel
18
931
Last reply by Glukinho 3d ago
LewisHead's avatar

What agent skills do you use for Laravel inertia react typescript?

Look for some new skills to try to make my development cleaner and not have to do as much cleaning up for claude

LewisHead's avatar
LewisHead's avatar jasperfern...3d agoGeneral
3
99
Last reply by jasperfernandez 3d ago
dogakorkmaz35's avatar

How can I gather all shared view data?

Hi there, in one of my projects I am trying to differentiate current laravel application's view shared data vs data that passed down as props to view file via view("file")->with($data);, I tried to create a ViewFactory class that extends and overrides Laravel's default Illuminate\View\Factory class, and returns (via its viewInstance method) my own View class that e

dogakorkmaz35's avatar
dogakorkmaz35's avatar ghabriel253d agoLaravel
1
19
Last reply by ghabriel25 3d ago
rseletsk's avatar

Executing app resulting from app:build results in a runtime error

Executing app resulting from app:build results in a runtime error: PHP Fatal error: Uncaught Dotenv\Exception\InvalidPathException: Unable to read any of the environment file(s) at ... bootstrap/../.env].

rseletsk's avatar
rseletsk's avatar rseletsk3d agoDesign
19
161
Last reply by rseletsk 3d ago
vincent15000's avatar

Return back to a page with Infinite Scroll

Hello, With Laravel / InertiaJS / VueJS. Step1 : I have a page with an Infinite Scroll to display a list of games. I can click on a game to display the game details on another page. Step 2 : On this page with the game details, I have a back button. When I click on the back button, I go back to the page with the list of the games. Step 3 : I'm back on the page with the list of t

vincent15000's avatar
vincent15000's avatar martinbean3d agoInertia
7
319
Last reply by martinbean 3d ago
Amirhossein256's avatar

Laravel 13 artisan commands close when interactive prompts are required on Windows (PHP 8.4/8.5)

Hello everyone, I am having a strange issue with Laravel 13 on Windows. Whenever an Artisan command requires user interaction (a prompt/question), the terminal process exits immediately after showing the question. For example: php artisan migrate Output: WARN The database 'faraertebat-db' does not exist on the 'mysql' connection. Would you like to create it? (yes/no) [yes] ❯ A

Amirhossein256's avatar
Amirhossein256's avatar Amirhossei...4d agoLaravel
0
14
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 Snapey4d agoEloquent
10
192
Last reply by Snapey 4d ago
earmsby's avatar

Importer for relationship with pivot value

I'm working on a project that has a model for Work: namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsToMany; class Work extends Model { protected $fillable = [ 'work_number', 'title', 'year_composed', 'commit_status', ]; public function authors(): BelongsToMany

earmsby's avatar
earmsby's avatar earmsby4d agoFilament
5
547
Last reply by earmsby 4d 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.