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

vincent15000's avatar

Use a policy with only the model id and avoiding N+1

Hello, Hmmm ... I wonder how I could use a policy with only a model id. Gate::authorize('update', $model_id); Sure this way it can't work because the Gate doesn't know the model. What could be a solution to do that ? Thanks for your help. V

vincent15000's avatar
vincent15000's avatar kimberlymc...1mo agoLaravel
4
1
Last reply by kimberlymcnamee 1mo ago
vincent15000's avatar

Plan subscription and Stripe

Hello, Hmmm ... what's the best approach ? For the same SaaS, I have different plans : plan A, plan B and plan C. Are these plans differents products or the same product with different prices ? Thanks for your answer ;). V

vincent15000's avatar
vincent15000's avatar vincent150...1mo agoGeneral
5
8
Last reply by vincent15000 1mo ago
vincent15000's avatar

Larapex-Charts

Hello, I already use ChartJS, it's just wonderful. I just discovered Larapex-Charts and I'm trying to use it, it seems interesting. http://larapex-charts.netlify.app/ I have followed exactly what is in the documentation and it works fine. But ... I'd like to use it without any CDN, but it's not so easy for me : I have installed the apexcharts library with npm and then I have ad

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

Code obfuscation for Laravel / VueJS / Docker

Hello, Last year I worked on a real-time application with Laravel / VueJS / Docker and some additionnal packages like MariaDB, RabbitMQ, websockets, supervisor, ... The application is distributed via a Docker package. My client wants to obfuscate the code. Has anybody already obfuscated a real-time Laravel / VueJS application's code ? Here are my first researches : it's possi

vincent15000's avatar
vincent15000's avatar vincent150...1mo agoLaravel
4
1
Last reply by vincent15000 1mo ago
vincent15000's avatar

About the new Livewire (v4) version

Hello, I just discover the new version of Livewire (v4). Hmmm ... I'm disappointed that there isn't any store management system to share data between all views. I also see that Volt is now totally integrated inside Livewire, it's not an option anymore. Livewire evolves towards a VueJS-like framework. I use both technologies and I wonder what is the real benefits provided by Liv

vincent15000's avatar
vincent15000's avatar Snapey1mo agoLivewire
1
1
Last reply by Snapey 1mo ago
vincent15000's avatar

Passing only an ID vs passing the entire object

Hello, I have this database : tables articles : table_id groups : table_id variables : group_id article_group : article_id, group_id, pivot datas I have to display on the same page the articles, the groups, the variables for each group and the articles with the pivot datas for each group. In the TablePage Livewire component, I load the table and its relationships as a compute

vincent15000's avatar
vincent15000's avatar martinbean1mo agoLivewire
3
6
Last reply by martinbean 1mo ago
vincent15000's avatar

How to retrieve only some pivot values (not all)

Hello, I have this relationship. public function articles(): BelongsToMany { return $this->belongsToMany(Article::class, 'group_article')->using(GroupArticle::class)->withPivot('formula', 'rounding_rule', 'precision'); } public function publicArticles(): BelongsToMany { return $this->belongsToMany(Article::class, 'group_article')->as('articles')->usi

vincent15000's avatar
vincent15000's avatar vincent150...1mo agoEloquent
3
2
Last reply by vincent15000 1mo ago
vincent15000's avatar

How to send a response without any redirection ?

Hello, form.post( route('player.quest.step.challenge.validate', { quest: props.quest_id, step: props.step_id, challenge: props.challenge }), { preserveScroll: true, onSuccess: (page) => { validated.value = page.flash.validated; }, }, ); public function validate(PlayerChallengeValidationRequest $request, Quest $quest, Step $ste

vincent15000's avatar
vincent15000's avatar vincent150...1mo agoInertia
2
2
Last reply by vincent15000 1mo ago
vincent15000's avatar

How does the optimistic updates work ?

Hello, I'm trying to use the optimistic updates with InertiaJS v3. https://inertiajs.com/docs/v3/the-basics/optimistic-updates#form-helper const save = async () => { form.optimistic((props) => ({ category: props.category, name: form.name })).put(route('admin.categories.update', { category: props.category })); editMode.value = false; updated.value = true; };

vincent15000's avatar
vincent15000's avatar vincent150...1mo agoInertia
3
2
Last reply by vincent15000 1mo ago
jalaf11201's avatar

How do we handle this repetition?

Hi, I'm having a hard time to handle little pages. And I have to take user data in all the pages. I will take different data in other pages just like in communities. And also should I put everything community related to community service and use it in community controllers and profile community pages or etc? or Can I just do it like this. Where can I see some examples for this

jalaf11201's avatar
jalaf11201's avatar vincent150...1mo agoLaravel
5
1
Last reply by vincent15000 1mo ago
imrandevbd's avatar

Migrating from Laragon to Flyenv for local dev anyone using it?

Hey everyone, After relying on Laragon for years, I’m looking at moving my local workflow over to Flyenv. As my stack has gotten more complex over the last decade, I want a cleaner containerized setup, but ideally with less friction than managing raw Docker compose files or Sail for every single project. For those of you actively using Flyenv how is it holding up as your daily

imrandevbd's avatar
imrandevbd's avatar Robstar1mo agoDevOps
4
1
Last reply by Robstar 1mo ago
vincej's avatar

Upgrading to L13 using AI Confusion

I have two machines to upgrade. The docs say using Laravel-boost 2.0+ it has instructions in it which will help and AI. It also says to share this with your agent. "use the /upgrade-laravel-v13 slash command". Well, when upgrading my Linux server, I used Claude code agent, and Claude told me that Boost has nothing in it, and it had no idea what the slash command was

vincej's avatar
vincej's avatar imrandevbd1mo agoLaravel
4
11
Last reply by imrandevbd 1mo ago
RogerManich's avatar

Toast question

Hi, After I watched the last Laravel course I wanted to try to build something with Laravel + LiveWire. My first goal was expanding the user preferences to accept language and color scheme. It works but in my first design I wanted to use a route + controller to update the user preferences instead of doing it insde the component settings. It worked but I realized that flux::toas

RogerManich's avatar
RogerManich's avatar ghabriel251mo agoLivewire
5
9
Last reply by ghabriel25 1mo ago
vincent15000's avatar

Hidden field not sent to the server ?

Hello, I have this field. <input type="hidden" name="{{ $fieldName }}" wire:model.live="item_key"> If I keep the type hidden, the value isn't sent to the server. But if I replace by the type text, the value is sent to the server. I don't understand why ... it worked fine in Livewire v2, but not any more in Livewire v3. Or is there any other

vincent15000's avatar
vincent15000's avatar vincent150...1mo agoLivewire
3
1
Last reply by vincent15000 1mo ago
vincent15000's avatar

This post seems to be broken

Hello, I posted this post some time ago. https://laracasts.com/discuss/channels/laravel/nativephp-jump When I try to open it, I am redirected to Error 500 page. Something seems to be broken. V

vincent15000's avatar
vincent15000's avatar jlrdw1mo agoFeedback
1
1
Last reply by jlrdw 1mo ago
skeith22's avatar

I wanted to query nested data until level 2 on a single model

Guys I have this model and I wanted to get the level 2 data, BUT this says relationship doesn't exist. phpnamespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasManyThrough; class Agent extends Model { protected $table = 'agents'; /** * The attributes that are mass assignable. * * @var list<string> */ protected $fil

skeith22's avatar
skeith22's avatar skeith221mo agoEloquent
7
2
Last reply by skeith22 1mo ago
vincent15000's avatar

How is it possible to prevent TailwindCSS from loading Figtree font from google ?

Hello, How is it possible to prevent TailwindCSS from loading Figtree font from google ? Any idea ? UPDATE => I think that it's not TailwindCSS which loads the font, it's the browser. So how is it possible to prevent the browser from injecting a font ? Thanks for your help. V

vincent15000's avatar
vincent15000's avatar vincent150...1mo agoGeneral
6
1
Last reply by vincent15000 1mo ago
vincent15000's avatar

VPS / Manual installation / Laravel, InertiaJS, VueJS

Hello, I have installed Ubuntu 24.04 on a virtual machine on VirtualBox to test an installation / deployment scenario. All works fine. So I have used the same scenario on a VPS prepared with Ubuntu 24.04. I have installed all what is needed, exactly like on the virtual machnine. All works fine except actions on the database. I explain : I can run a console command to seed the

vincent15000's avatar
vincent15000's avatar vincent150...1mo agoDevOps
2
1
Last reply by vincent15000 1mo ago
LailaIH's avatar

Best approach for handling large file uploads and ZIP generation in Laravel?

I’m building a Laravel 12 folder organizer where users may upload large folders (many files / large sizes), and I categorize files by extension and generate a ZIP for download. Current approach: Process everything in one request Loop through uploaded files once Add files directly from PHP temp upload paths into a ZIP using ZipArchive::addFile() For large folder uploads, what’s

LailaIH's avatar
LailaIH's avatar MuhammadAl...1mo agoGuides
5
5
Last reply by MuhammadAli2003 1mo ago
Max100's avatar

Starter kit - High CPU Fan - Fixed

While working on a new vue-starter-kit app, I noticed the cpu fan started running most of the time, and the task manager showed npm was constantly using around 15% of the cpu activity. The problem only occurred when using npm run dev. Using npm run build was fine. I never had this issue before using Breeze, so it seems connected to the starter kit. It may have to do with way

Max100's avatar
Max100's avatar Max1001mo agoGeneral
3
9
Last reply by Max100 1mo ago
Caio-Tera's avatar

Deep Dive: Why I chose Offloaded SSE (Mercure) over PHP-Native Streams or WebSockets

I recently made a decision to use FrankenPHP + Mercure for a real-time dashboard project (Laravel 12 + Octane), and I wanted to share the architectural reasoning behind it. I see a lot of people suggesting PHP-native SSE (like Laravel Wave) or defaulting to WebSockets (Reverb), but there is a critical distinction often missed regarding Connection Holding and Protocol Integratio

Caio-Tera's avatar
Caio-Tera's avatar NikSpyrato...1mo agoLaravel
1
4
Last reply by NikSpyratos 1mo ago
aarontharker's avatar

401 error on livewire uploads

When I try to upload a file on the production server the upload goes to 100% and then says error uploading. If I check the browser console it shows the upload failed because of a 401 error. I thought this may have been a signed url issue as the requests are going through Cloudflare, so I turned off Cloudflare proxying - no change. I set the following in bootstrap/app.php - n

aarontharker's avatar
aarontharker's avatar AzafoCossa1mo agoLivewire
8
1
Last reply by AzafoCossa 1mo ago
Respect's avatar

why wire wire-elements/livewire-strict package not working in livewire v4

hello friends thanks for helping why wire wire-elements/livewire-strict package not working in livewire v4 and is there alternative it's not throwing any exeption if try to update any property from client side (nothing happen like in v3) https://github.com/wire-elements/livewire-strict AppServiceProvider.php <?php namespace App\Providers; use WireElements\LivewireStr

Respect's avatar
Respect's avatar ghabriel251mo agoLivewire
3
7
Last reply by ghabriel25 1mo ago
vincent15000's avatar

InertiaJS and Security Headers ?

Hello, How is it possible to add CPS headers with InertiaJS ? I have tried this via a middleware. public function handle(Request $request, Closure $next): Response { $response = $next($request); $csp = implode('; ', [ "default-src 'self'", "img-src 'self' data:", "script-src 'self' 'unsafe-inline'", "st

vincent15000's avatar
vincent15000's avatar Jsanwo641mo agoInertia
12
6
Last reply by Jsanwo64 1mo ago
troelsjohnsen's avatar

How to sync data from (sports) API with local database

Hi Everybody I am currently working on integrating with a football API to provide data about matches, venues, competitions etc. The API will provide data for my own database, which can also be populated by manually entered data. I am struggling a bit with how to match data coming from the API with data in my own database? I need to be able to check whether the entity coming fro

troelsjohnsen's avatar
troelsjohnsen's avatar rogerwick1mo agoCode Review
7
1
Last reply by rogerwick 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.