Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente |
informatique:php:laravel [06/07/2024 10:20] – [Tools] cyrille | informatique:php:laravel [12/03/2025 09:27] (Version actuelle) – [Documentation] cyrille |
---|
* [[https://laravel.io/|laravel.io]] | * [[https://laravel.io/|laravel.io]] |
* [[https://madewithlaravel.com|madewithlaravel.com]] | * [[https://madewithlaravel.com|madewithlaravel.com]] |
| |
| ==== Installation ==== |
| |
| Laravel 12 le 2025-03-12 |
| |
| <code> |
| curl -s "https://laravel.build/tools-comptoir-net?with=mariadb,redis,mailpit" | bash |
| cd tools-comptoir-net |
| ln -s vendor/bin/sail ./sail |
| |
| # pour modifier le Dockerfile : |
| ./artisan sail:publish |
| </code> |
| |
| ensuite voir [[/informatique/ide/codium#laravel|codium with laravel-sail]] |
| |
==== Handbooks & Cheats sheets==== | ==== Handbooks & Cheats sheets==== |
* [[https://laravel-bap.com/10-plus-laravel-packages-for-building-laravel-apps/|10+ Laravel Packages for Building Laravel Apps]] | * [[https://laravel-bap.com/10-plus-laravel-packages-for-building-laravel-apps/|10+ Laravel Packages for Building Laravel Apps]] |
| |
| |
| === Outillage === |
| |
| [[https://github.com/spatie/laravel-package-tools|spatie/laravel-package-tools]] contains a ''PackageServiceProvider'' that you can use in your packages to easily register config files, migrations, and more. |
| |
| [[https://github.com/spatie/package-skeleton-laravel|spatie/package-skeleton-laravel]] can be used to scaffold a Laravel package. |
| |
=== Mes indispensables === | === Mes indispensables === |
| |
Préférés: | Préférés: |
* [[https://filamentphp.com/|Filament]] | * [[/informatique/php/laravel/filamentphp|Filament]] |
* [[https://filamentphp.com/docs|docs]], [[https://github.com/filamentphp/filament|code]] | * [[https://filamentphp.com/docs|docs]], [[https://github.com/filamentphp/filament|code]] |
* [[https://orchid.software/|Laravel Orchid]] Develop web applications not admin panels - Laravel Orchid n'est pas une "solution clé en main". Vous devez posséder des compétences en codage pour l'utiliser. Il a été conçu pour faciliter la vie des développeurs lors de la construction de systèmes complexes, et non pour vous en fournir un tout prêt à l'emploi. | * [[https://orchid.software/|Laravel Orchid]] Develop web applications not admin panels - Laravel Orchid n'est pas une "solution clé en main". Vous devez posséder des compétences en codage pour l'utiliser. Il a été conçu pour faciliter la vie des développeurs lors de la construction de systèmes complexes, et non pour vous en fournir un tout prêt à l'emploi. |
| |
* [[http://programmingarehard.com/2013/11/10/eloquent_and_views.html/|Eloquent and SQL Views]] | * [[http://programmingarehard.com/2013/11/10/eloquent_and_views.html/|Eloquent and SQL Views]] |
| |
| === Generated column === |
| |
| * [[https://ashleyshenton.com/articles/how-to-make-eloquent-play-nice-with-generated-columns|How to make Eloquent play nice with generated columns]] |
| |
| |
| === GraphQL === |
| |
| * [[https://api-platform.com/docs/laravel/|API Platform]] |
| * Laravel ou Symfony |
| * expose your Eloquent models in minutes with Anotation as: |
| * REST API JSON-LD/RDF, JSON:API, HAL, and many RFCs… |
| * GraphQL API |
| * automatically expose an OpenAPI specification (formerly Swagger), dynamically generated from your Eloquent models and always up to date |
| * benefits from the API Platform JavaScript tools: admin and create client (supports Next/React, Nuxt/Vue.js, Quasar, Vuetify and more!) |
| * [[https://graphqlite.thecodingmachine.io/|GraphQLite]] A PHP library that allows you to write your GraphQL queries in simple-to-write controllers |
| * Create a complete GraphQL API by simply annotating your PHP classes |
| * Framework agnostic, but Symfony, Laravel and PSR-15 bindings available! |
| * Comes with batteries included: queries, mutations, subscriptions, mapping of arrays / iterators, file uploads, security, validation, extendable types and more! |
| * [[https://lighthouse-php.com/|Lighthouse]] A framework for serving GraphQL from Laravel |
| * il faut maintenir un fichier contenant le schema |
| |
| ===== Permission & roles ===== |
| |
| ==== spatie/laravel-permission ==== |
| |
| [[https://github.com/spatie/laravel-permission|spatie/laravel-permission]] |
| * to manage user permissions and roles in a database. |
| * https://spatie.be/docs/laravel-permission/v6/introduction |
| |
===== Authentification ===== | ===== Authentification ===== |
| |
} | } |
</code> | </code> |
| |
| Qlqs articles : |
| * [[https://laravel.io/articles/preventing-duplicate-form-submissions-using-atomic-locks|Preventing Duplicate Form Submissions Using Atomic Locks]] |
| * [[https://wpwebinfotech.com/blog/atomic-locks-in-laravel/|Atomic Locks in Laravel: Mastering Concurrency and Data Integrity]] |
| * [[https://dev.to/afiqiqmal/preventing-duplicate-requests-in-laravel-the-atomiclockmiddleware-j46|Preventing Duplicate Requests in Laravel: The AtomicLockMiddleware]] |
| |
| |
==== Security ==== | ==== Security ==== |
| |
When the queued job is being pulled out from the queue, the CallQueuedListener will check if it’s using the [[https://laravel.com/docs/10.x/events#manually-interacting-with-the-queue|InteractsWithQueue]] trait, and if it is, the framework will inject the underlying “job” instance inside. | When the queued job is being pulled out from the queue, the CallQueuedListener will check if it’s using the [[https://laravel.com/docs/10.x/events#manually-interacting-with-the-queue|InteractsWithQueue]] trait, and if it is, the framework will inject the underlying “job” instance inside. |
| |
| [[https://www.amitmerchant.com/prevent-overlapping-of-jobs-in-laravel/|How to prevent overlapping of jobs in Laravel]] |
| |
More about [[.laravel:horizon|horizon]]. | More about [[.laravel:horizon|horizon]]. |
| |
| [[https://www.amitmerchant.com/prevent-overlapping-of-jobs-in-laravel/|How to prevent overlapping of jobs in Laravel]] with the Laravel Job Middleware [[https://laravel.com/docs/8.x/queues#preventing-job-overlaps|WithoutOverlappingMiddleware]]. |
| |
=== RabbitMQ === | === RabbitMQ === |
* Some concepts were used from [[https://github.com/mookofe/tail|mookofe/tail]] | * Some concepts were used from [[https://github.com/mookofe/tail|mookofe/tail]] |
| |
| ==== Workflow ==== |
| |
| The Laravel Workflow library is heavily inspired by Temporal but powered by Laravel Queues. |
| * La doc https://laravel-workflow.com |
| * Un exemple super simple [[https://laravel-workflow.com/blog/email-verifications|Email Verifications Using Laravel Workflow]] |
| * Exemple de transaction multi-services selon le ''Saga pattern'': [[https://laravel-workflow.com/blog/saga-pattern-and-laravel-workflow|Saga Pattern and Laravel Workflow]] |
| * Exemple de couplage avec une StateMachine: [[https://laravel-workflow.com/blog/combining-laravel-workflow-and-state-machines|Combining Laravel Workflow and State Machines]] |
| |
| 42-Workflows is an free open source package to help you to automate your Laravel application. |
| * https://workflows.42coders.com/ |
| |
| |