Laravel

VS

Symfony

Why this talk ?

Index

1. ORM

1/7 ORM

app/Models/Article.php
src/Entity/User.php

1/7 ORM

database/migrations/2023_11_19_134523_create_articles_table.php

1/7 ORM

migration/Version20231119142818.php

1/7 ORM

app/Controller/ArticleController.php

1/7 ORM

*anywhere*

1/7 ORM

src/Controller/ArticleController.php

1/7 ORM

*anywhere you can inject a Repository*

1/7 ORM

src/Repository/UserRepository.php

1/7 ORM

app/Providers/EventServiceProvider.php

1/7 ORM

app/Observers/ArticleObserver.php

1/7 ORM

src/EntityListener/ArticleListener.php

1/7 ORM

2. Dependency injection

2/7 Injection de dépendances

app/Providers/AppServiceProvider.php

2/7 Injection de dépendances

app/Providers/AppServiceProvider.php

2/7 Injection de dépendances

app/Providers/AppServiceProvider.php

2/7 Injection de dépendances

app/Providers/AppServiceProvider.php

2/7 Injection de dépendances

config/services.yaml

 

2/7 Injection de dépendances

src/Controller/CommentController.php

2/7 Injection de dépendances

config/services.yaml

2/7 Injection de dépendances

src/Event/EventSubscriberInterface.php
src/Event/Dispatcher.php

2/7 Injection de dépendances

src/Services/SomeService.php

2/7 Injection de dépendances

config/services.yaml

 

2/7 Injection de dépendances

src/Service/SomeService.php
src/Mailer/MyMailer.php

2/7 Injection de dépendances

src/Mailer/MyMailer.php

2/7 Injection de dépendances

src/Mailer/MyMailer.php

2/7 Injection de dépendances

3. Serialization

3/7 Serialization

app/Http/Resource/UserResource.php
app/Http/Controller/UserController.php

3/7 Serialization

src/Entity/User.php

3/7 Serialization

src/Controller/UserController.php

3/7 Serialization

4. security

4/7 Security

app/Policies/ArticlePolicy.php
app/Controller/ArticleController.php

4/7 Security

src/Controller/ArticleController.php

4/7 Security

src/Controller/ArticleController.php

4/7 Security

src/Security/Voter/ArticleEditVoter.php

4/7 Security

5. Routing

routes/web.php

5/7 Routing

config/routes.php

5/7 Routing

config/routes.yaml
config/routes.yaml
src/Controller/UserController.php

5/7 Routing

routes/api.php

5/7 Routing

routes/api.php

5/7 Routing

 
 $ composer require api-platform/core

 

5/7 Routing

routes/web.php

5/7 Routing

src/Controller/ArticleController.php

5/7 Routing

6. Commands

app/Console/Commands/DisableUser.php

6/7 Commands

src/Commands/DisableUser.php

6/7 Commands

7. More

7/7 Structure

7/7 Structure

resources/views/

7/7 Structure

templates/

7/7 Structure

THank you!

Laravel VS Symfony

By keversc

Laravel VS Symfony

  • 169