PHP Reddit – Telegram
PHP Reddit
34 subscribers
289 photos
37 videos
24.9K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
Troubles with DataFixtures references

Hi everyone !

I'm currently struggling with some problems related to DataFixtures' references.

I've got two fixtures, CategoryFixtures and ProductFixtures. So the ProductFixtures is depending on CategoryFixtures since every Product entity need a Category.

Here's the code of the fixtures below.

- CategoryFixtures
<?php

namespace App\DataFixtures;

use App\Entity\Category;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
use Symfony\Component\String\Slugger\SluggerInterface;

class CategoryFixtures extends Fixture
{
private int $count = 1;
public static array $non_parent = [];

public function __construct(private SluggerInterface $slugger){}

public function createCategoryFixtures(
string $name,
Category|null $parent = null,
ObjectManager $manager
) : Category {
$category = new Category();
$category
->setName($name)
->setSlug($this->slugger->slug($category->getName())->lower())
->setParent($parent)
->setSortOrder($this->count)
;
$manager->persist($category);
$this->addReference('cat-'.$this->count, $category);
if($parent != null){
self::$non_parent[] = $this->count;
};
$this->count++;
return $category;
}

public function load(ObjectManager $manager): void
{
# First fake category
$parent = $this->createCategoryFixtures('Boulangerie', null, $manager);
$this->createCategoryFixtures('Pâtisserie', $parent, $manager);
$this->createCategoryFixtures('Viennoiseries', $parent, $manager);

# Second fake category
$parent2 = $this->createCategoryFixtures('Informatique', null, $manager);
$this->createCategoryFixtures('Écran', $parent2, $manager);
$this->createCategoryFixtures('Ordinateur', $parent2, $manager);
$this->createCategoryFixtures('Souris', $parent2, $manager);

# Third fake category
$parent3 = $this->createCategoryFixtures('Vêtements', null, $manager);
$this->createCategoryFixtures('Maillot', $parent3, $manager);
$this->createCategoryFixtures('Pantalon', $parent3, $manager);
$this->createCategoryFixtures('Veste', $parent3, $manager);

# Flush all fake categories
$manager->flush();
}
}


- ProductFixtures :
<?php

namespace App\DataFixtures;

use App\Entity\Product;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Persistence\ObjectManager;
use Symfony\Component\String\Slugger\SluggerInterface;
use Faker;

class ProductFixtures extends Fixture implements DependentFixtureInterface
{
public const int PRODUCT_COUNT = 20;

public function __construct(private SluggerInterface $slugger){}

public function getDependencies() : array {return [CategoryFixtures::class];}

public function load(ObjectManager $manager): void
{
$faker = Faker\Factory::create('fr_FR');
for($i = 0; $i < self::PRODUCT_COUNT; $i++){
$product = new Product;
$product
->setName($faker->text(15))
->setDenoscription($faker->text())
->setSlug($this->slugger->slug($product->getName())->lower())
->setPrice($faker->numberBetween(500, 70000)) //Price displayed in cents.
->setStock($faker->numberBetween(0, 2000))
;
$category = $this->getReference(
'cat-'.CategoryFixtures::$non_parent[
rand(0, count(CategoryFixtures::$non_parent) - 1)
],
CategoryFixtures::class
);
$product->setCategory($category);
$this->setReference('prod-'.$i, $product);
$manager->persist($product);
};
$manager->flush();
}
}


So the problem I've got is that this error always happen when I try to load
Troubles with DataFixtures references

Hi everyone !

I'm currently struggling with some problems related to DataFixtures' references.

I've got two fixtures, CategoryFixtures and ProductFixtures. So the ProductFixtures is depending on CategoryFixtures since every Product entity need a Category.

Here's the code of the fixtures below.

- CategoryFixtures
```php
<?php

namespace App\DataFixtures;

use App\Entity\Category;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
use Symfony\Component\String\Slugger\SluggerInterface;

class CategoryFixtures extends Fixture
{
private int $count = 1;
public static array $non_parent = [];

public function __construct(private SluggerInterface $slugger){}

public function createCategoryFixtures(
string $name,
Category|null $parent = null,
ObjectManager $manager
) : Category {
$category = new Category();
$category
->setName($name)
->setSlug($this->slugger->slug($category->getName())->lower())
->setParent($parent)
->setSortOrder($this->count)
;
$manager->persist($category);
$this->addReference('cat-'.$this->count, $category);
if($parent != null){
self::$non_parent[] = $this->count;
};
$this->count++;
return $category;
}

public function load(ObjectManager $manager): void
{
# First fake category
$parent = $this->createCategoryFixtures('Boulangerie', null, $manager);
$this->createCategoryFixtures('Pâtisserie', $parent, $manager);
$this->createCategoryFixtures('Viennoiseries', $parent, $manager);

# Second fake category
$parent2 = $this->createCategoryFixtures('Informatique', null, $manager);
$this->createCategoryFixtures('Écran', $parent2, $manager);
$this->createCategoryFixtures('Ordinateur', $parent2, $manager);
$this->createCategoryFixtures('Souris', $parent2, $manager);

# Third fake category
$parent3 = $this->createCategoryFixtures('Vêtements', null, $manager);
$this->createCategoryFixtures('Maillot', $parent3, $manager);
$this->createCategoryFixtures('Pantalon', $parent3, $manager);
$this->createCategoryFixtures('Veste', $parent3, $manager);

# Flush all fake categories
$manager->flush();
}
}
```

- ProductFixtures :
```php
<?php

namespace App\DataFixtures;

use App\Entity\Product;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Persistence\ObjectManager;
use Symfony\Component\String\Slugger\SluggerInterface;
use Faker;

class ProductFixtures extends Fixture implements DependentFixtureInterface
{
public const int PRODUCT_COUNT = 20;

public function __construct(private SluggerInterface $slugger){}

public function getDependencies() : array {return [CategoryFixtures::class];}

public function load(ObjectManager $manager): void
{
$faker = Faker\Factory::create('fr_FR');
for($i = 0; $i < self::PRODUCT_COUNT; $i++){
$product = new Product;
$product
->setName($faker->text(15))
->setDenoscription($faker->text())
->setSlug($this->slugger->slug($product->getName())->lower())
->setPrice($faker->numberBetween(500, 70000)) //Price displayed in cents.
->setStock($faker->numberBetween(0, 2000))
;
$category = $this->getReference(
'cat-'.CategoryFixtures::$non_parent[
rand(0, count(CategoryFixtures::$non_parent) - 1)
],
CategoryFixtures::class
);
$product->setCategory($category);
$this->setReference('prod-'.$i, $product);
$manager->persist($product);
};
$manager->flush();
}
}
```

So the problem I've got is that this error always happen when I try to load
the fixtures using the command `symfony console doctrine:fixture:load`. :
> Reference to "cat-10" for class "App\DataFixtures\CategoryFixtures" does not exist
> Reference to "cat-11" for class "App\DataFixtures\CategoryFixtures" does not exist
> Reference to "cat-6" for class "App\DataFixtures\CategoryFixtures" does not exist

I tried to add a `dd($this)` at the end of the CategoryFixtures, and here's what I've got. :
```fix
^ App\DataFixtures\CategoryFixtures^ {#6546
#referenceRepository: Doctrine\Common\DataFixtures\ReferenceRepository^ {#5853
-referencesByClass: array:1 [
"App\Entity\Category" => array:11 [
"cat-1" => App\Entity\Category^ {#7128
-id: 122
-name: "Boulangerie"
-sort_order: 1
-parent: null
-categories: Doctrine\ORM\PersistentCollection^ {#5790
#collection: Doctrine\Common\Collections\ArrayCollection^ {#2166
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#7128}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#6521 …}
-backRefFieldName: "parent"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#6762 …}
}
-products: Doctrine\ORM\PersistentCollection^ {#386
#collection: Doctrine\Common\Collections\ArrayCollection^ {#6652
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#7128}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#3106 …}
-backRefFieldName: "category"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#7051 …}
}
-slug: "boulangerie"
}
"cat-2" => App\Entity\Category^ {#7702
-id: 123
-name: "Pâtisserie"
-sort_order: 2
-parent: App\Entity\Category^ {#7128}
-categories: Doctrine\ORM\PersistentCollection^ {#6399
#collection: Doctrine\Common\Collections\ArrayCollection^ {#7685
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#7702}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#6521 …}
-backRefFieldName: "parent"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#6762 …}
}
-products: Doctrine\ORM\PersistentCollection^ {#1396
#collection: Doctrine\Common\Collections\ArrayCollection^ {#6876
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#7702}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#3106 …}
-backRefFieldName: "category"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#7051 …}
}
-slug: "patisserie"
}
"cat-3" => App\Entity\Category^ {#6669
-id: 124
-name: "Viennoiseries"
-sort_order: 3
-parent: App\Entity\Category^ {#7128}
-categories: Doctrine\ORM\PersistentCollection^ {#5205
#collection: Doctrine\Common\Collections\ArrayCollection^ {#6643
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#6669}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#6521 …}
-backRefFieldName: "parent"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#6762 …}
}
-products: Doctrine\ORM\PersistentCollection^ {#1653
#collection: Doctrine\Common\Collections\ArrayCollection^ {#7725
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#6669}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#3106 …}
-backRefFieldName: "category"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#7051 …}
}
-slug: "viennoiseries"
}
"cat-4" => App\Entity\Category^ {#1013
-id: 125
-name: "Informatique"
-sort_order: 4
-parent: null
-categories: Doctrine\ORM\PersistentCollection^ {#3755
#collection: Doctrine\Common\Collections\ArrayCollection^ {#1983
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#1013}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#6521 …}
-backRefFieldName: "parent"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#6762 …}
}
-products: Doctrine\ORM\PersistentCollection^ {#7709
#collection: Doctrine\Common\Collections\ArrayCollection^ {#3777
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#1013}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#3106 …}
-backRefFieldName: "category"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#7051 …}
}
-slug: "informatique"
}
"cat-5" => App\Entity\Category^ {#6823
-id: 126
-name: "Écran"
-sort_order: 5
-parent: App\Entity\Category^ {#1013}
-categories: Doctrine\ORM\PersistentCollection^ {#7677
#collection: Doctrine\Common\Collections\ArrayCollection^ {#2904
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#6823}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#6521 …}
-backRefFieldName: "parent"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#6762 …}
}
-products: Doctrine\ORM\PersistentCollection^ {#7683
#collection: Doctrine\Common\Collections\ArrayCollection^ {#6435
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#6823}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#3106 …}
-backRefFieldName: "category"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#7051 …}
}
-slug: "ecran"
}
"cat-6" => App\Entity\Category^ {#2131
-id: 127
-name: "Ordinateur"
-sort_order: 6
-parent: App\Entity\Category^ {#1013}
-categories: Doctrine\ORM\PersistentCollection^ {#7681
#collection: Doctrine\Common\Collections\ArrayCollection^ {#6814
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#2131}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#6521 …}
-backRefFieldName: "parent"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#6762 …}
}
-products: Doctrine\ORM\PersistentCollection^ {#7684
#collection: Doctrine\Common\Collections\ArrayCollection^ {#5216
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#2131}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#3106 …}
-backRefFieldName: "category"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#7051 …}
}
-slug: "ordinateur"
}
"cat-7" => App\Entity\Category^ {#6523
-id: 128
-name: "Souris"
-sort_order: 7
-parent: App\Entity\Category^ {#1013}
-categories: Doctrine\ORM\PersistentCollection^ {#7660
#collection: Doctrine\Common\Collections\ArrayCollection^ {#6629
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#6523}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#6521 …}
-backRefFieldName: "parent"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#6762 …}
}
-products: Doctrine\ORM\PersistentCollection^ {#7378
#collection: Doctrine\Common\Collections\ArrayCollection^ {#6547
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#6523}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#3106 …}
-backRefFieldName: "category"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#7051 …}
}
-slug: "souris"
}
"cat-8" => App\Entity\Category^ {#2501
-id: 129
-name: "Vêtements"
-sort_order: 8
-parent: null
-categories: Doctrine\ORM\PersistentCollection^ {#7661
#collection: Doctrine\Common\Collections\ArrayCollection^ {#1016
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#2501}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#6521 …}
-backRefFieldName: "parent"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#6762 …}
}
-products: Doctrine\ORM\PersistentCollection^ {#7636
#collection: Doctrine\Common\Collections\ArrayCollection^ {#6712
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#2501}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#3106 …}
-backRefFieldName: "category"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#7051 …}
}
-slug: "vetements"
}
"cat-9" => App\Entity\Category^ {#2669
-id: 130
-name: "Maillot"
-sort_order: 9
-parent: App\Entity\Category^ {#2501}
-categories: Doctrine\ORM\PersistentCollection^ {#7589
#collection: Doctrine\Common\Collections\ArrayCollection^ {#6392
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#2669}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#6521 …}
-backRefFieldName: "parent"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#6762 …}
}
-products:
Doctrine\ORM\PersistentCollection^ {#7691
#collection: Doctrine\Common\Collections\ArrayCollection^ {#4078
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#2669}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#3106 …}
-backRefFieldName: "category"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#7051 …}
}
-slug: "maillot"
}
"cat-10" => App\Entity\Category^ {#6499
-id: 131
-name: "Pantalon"
-sort_order: 10
-parent: App\Entity\Category^ {#2501}
-categories: Doctrine\ORM\PersistentCollection^ {#7694
#collection: Doctrine\Common\Collections\ArrayCollection^ {#1962
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#6499}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#6521 …}
-backRefFieldName: "parent"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#6762 …}
}
-products: Doctrine\ORM\PersistentCollection^ {#7697
#collection: Doctrine\Common\Collections\ArrayCollection^ {#1998
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#6499}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#3106 …}
-backRefFieldName: "category"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#7051 …}
}
-slug: "pantalon"
}
"cat-11" => App\Entity\Category^ {#6217
-id: 132
-name: "Veste"
-sort_order: 11
-parent: App\Entity\Category^ {#2501}
-categories: Doctrine\ORM\PersistentCollection^ {#7706
#collection: Doctrine\Common\Collections\ArrayCollection^ {#786
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#6217}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#6521 …}
-backRefFieldName: "parent"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#6762 …}
}
-products: Doctrine\ORM\PersistentCollection^ {#7614
#collection: Doctrine\Common\Collections\ArrayCollection^ {#1987
-elements: []
}
#initialized: true
-snapshot: []
-owner: App\Entity\Category^ {#6217}
-association: Doctrine\ORM\Mapping\OneToManyAssociationMapping {#3106 …}
-backRefFieldName: "category"
-isDirty: false
-em: Doctrine\ORM\EntityManager^ {#3210 …11}
-typeClass: Doctrine\ORM\Mapping\ClassMetadata {#7051 …}
}
-slug: "veste"
}
]
]
-identitiesByClass: array:1 [
"App\Entity\Category" => array:11 [
"cat-1" => array:1 [
"id" => 122
]
"cat-2" => array:1 [
"id" => 123
]
"cat-3" => array:1 [
"id" => 124
]
"cat-4" => array:1 [
"id" => 125
]
"cat-5" => array:1 [
"id" => 126
]
"cat-6" => array:1 [
"id" => 127
]
"cat-7" => array:1 [
"id" => 128
]
"cat-8" => array:1 [
"id" => 129
]
"cat-9" => array:1 [
"id" => 130
]
"cat-10" => array:1 [
"id" => 131
]
"cat-11" => array:1 [
"id" => 132
]
]
]
-manager: Doctrine\ORM\EntityManager^ {#3210 …11}
}
-count: 12
-slugger: Symfony\Component\String\Slugger\AsciiSlugger^ {#1487
-symbolsMap: array:1 [
"en" => array:2 [
"@" => "at"
"&" => "and"
]
]
-emoji: false
-transliterators: array:1 [
"en" => null
]
-defaultLocale: "en"
}
}
```

So the references seems to be OK. But I get that error again when I try a `dd($this->getReference('cat-10', self::class));` instead. :
> Reference to "cat-10" for class "App\DataFixtures\CategoryFixtures" does not exist

So I can't figure out what the \*\*\*\* is going on, and it's been two whole weeks I keep getting stuck with this problem because I cannot find any help anywhere else on the internet.

If someone has any information or solution, thanks in advance !

https://redd.it/1mbtoj3
@r_php
New to php

Hey there mates,
I will be diving into the world of php so please help me with sources to start learning from (course will be better)
Thanks

https://redd.it/1mc6g2v
@r_php
Will Laracon be streamed on YouTube?

As always, I’m excited to see the talks even though I couldn’t make it to the event.

Anyone know if it will be streamed? I tried checking here and Bluesky but didn’t see anything clear on this.

https://redd.it/1mc95zp
@r_php
Laracon US Denver 2025 Live Thread

Use this thread to discuss the happenings of Laracon US 2025:

https://laracon.us/

What is Laracon US?

The flagship Laravel event of the year and the largest PHP conference in the United States is happening July 29–30 in Denver, CO at The Mission Ballroom. Two days of talks, networking, and announcements from the Laravel ecosystem.

Is there a live stream available?

A free livestream is planned via the official Laravel YouTube channel. While every effort will be made to ensure a smooth broadcast, availability is subject to technical considerations.

# 📅 Schedule

# Tuesday, July 29

(All times MDT)

9:30AM – Aaron Francis — You Can Just Do Things
9:55AM – Nuno Maduro — Pest 4
10:25AM – TJ Miller — Prism & AI
10:50AM – Break (Larabelles Meetup)
11:20AM – Mary Perry — Design Patterns in Laravel
11:50AM – Thiery Laverdure — You Should Reinvent the Wheel
12:15PM – Lunch
1:40PM – Chris Morrell — Advanced Eloquent Relations
2:10PM – John Drexler — Building the High Trust Environment
2:35PM – Break
3:00PM – Taylor Otwell & Team — Keynote
5:00PM – Reception
6:00PM – After Party at Number 38

# Wednesday, July 30

(All times MDT)

9:30AM – Evan You — Creator of Vue
10:00AM – Alex Six — Turbocharging Your Laravel Development with the Terminal
10:25AM – Wade Wegner — Laravel Meets AI with DigitalOcean
10:35AM – Break (Meetup Organizer Huddle)
11:05AM – Dave Hicking — AI Will Not Replace You
11:20AM – Zuzana Kunckova — Writing Resilient Code
11:25AM – Dave Kiss — Turning a Next.js Video App into a Laravel Starter Kit
11:50AM – Leah Thompson — Making it Feel Right: Implementing UI Details that Connect
12:15PM – Lunch
1:40PM – Colin DeCarlo — AI and You: Understanding, Watching, and Embracing
2:10PM – Tom Crary — Cloud, Code, and Coke Zero
2:30PM – Caleb Porzio — Livewire 4
2:55PM – Break
3:20PM – Rissa Jackson — Is There Any Problem Git Interactive Rebase Can't Solve?
3:40PM – Will King — A Framework for Ambitious Projects
4:05PM – Hank Taylor & Sam Sappenfield — Laravel Community Update
4:15PM – OSS Panel — Taylor Otwell, Adam Wathan, Jeffrey Way, Evan You

# Reminder — Remain Civil (Rule 2)

Toxicity doesn't ship in r/laravel. No exceptions.

Name-calling, insults, unnecessary profanity, or personal attacks will not be tolerated.

https://redd.it/1mc9j55
@r_php
Laravel Filament Table Performance Issues with Millions of Records – Any Optimization Tips?

I'm working with Laravel Filament (v3) and recently deployed my app to production. Everything worked fine initially, but after a couple of months, the Filament Resource table page has become noticeably slower.

The issue seems to be due to the underlying database table growing to millions of records (2millions right now)(specifically for one of the resources). Pagination is enabled, but even loading the first page takes a few seconds or more (default is 25 records per page), which is not ideal for the end-user experience.

Here’s some additional context:

The table is using Eloquent queries (no custom query builder yet).
I’m using the default Filament Table component inside a Resource.
The table has searchable and sortable columns.
Some columns display related model data (via relationships).
The database is MySQL running on a managed VPS (decent specs).
No caching, indexes, or chunking optimizations applied yet.

Has anyone faced similar performance issues with large datasets in Filament?
What are your tips for improving table performance — such as query optimizations, indexes, or custom table builders?
Would it be better to use raw queries or offload the heavy logic?



https://redd.it/1mcxtsa
@r_php
Laravel Idea routes feature >>>>>>

Noticed today a pretty nice new feature form Laravel Idea. It also has some cool stuff in `routes/` files. Very useful!

https://preview.redd.it/a7yxxoyzqzff1.png?width=507&format=png&auto=webp&s=3c281aa30f53e3aab3d1f83d6fccef01ab651b96



https://redd.it/1md3bjo
@r_php
Learning Platform Suggestion

Is geekforgeeks good source for learning PHP?
Which platform should i choose for becoming a job-ready php dev?

https://redd.it/1md8w32
@r_php
Anyone using Wayfinder?

Someone shared an image of a list of things Taylor was talking about in his Keynote and one was Wayfinder.

It seems very interesting but would require a decent amount of refactoring, which I am willing to do if its worth it.

Is anyone using it? How has it been for you?

https://redd.it/1md4zcu
@r_php