<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/sources/laraveldaily/best-of/2024/10" -->

---
title: Best Laravel Daily posts — October 2024 | daily.dev
description: The most upvoted Laravel Daily posts from October 2024, curated by the daily.dev community.
canonical: https://daily.dev/sources/laraveldaily/best-of/2024/10
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:url: https://daily.dev/sources/laraveldaily/best-of/2024/10
og:type: website
og:site_name: daily.dev
og:title: Best Laravel Daily posts — October 2024 | daily.dev
og:description: The most upvoted Laravel Daily posts from October 2024, curated by the daily.dev community.
og:image: https://media.daily.dev/image/upload/s--VAY5ToZt--/f_auto/v1724209435/public/daily.dev%20-%20open%20graph
---

# Best of Laravel Daily — October 2024

1. 1  
[](https://daily.dev/posts/laravel-roles-permissions-complex-multi-clinic-project-zqbzdqedd "Laravel Roles/Permissions: Complex Multi-Clinic Project")  
Video  
![Avatar of laraveldaily](https://media.daily.dev/image/upload/s--vzdgNGfl--/f_auto/v1725044498/logos/laraveldaily)Laravel Daily · 2y  
Laravel Roles/Permissions: Complex Multi-Clinic Project  
Managing roles and permissions in a complex multi-clinic project using Laravel involves using Spatie's Laravel Permission package, global scopes, and enums to manage roles within different teams. The project uses a structured, policy-driven approach to permissions, showcasing features like CRUD operations managed by different roles such as master admin, clinic owner, and staff/doctor. Automated testing is emphasized to ensure security, given the high cost of bugs related to unauthorized access.  
30
2. 2  
[](https://daily.dev/posts/4-tips-to-improve-leah-s-laravel-code-25ldshfgl "4 Tips to Improve Leah's Laravel Code")  
Video  
![Avatar of laraveldaily](https://media.daily.dev/image/upload/s--vzdgNGfl--/f_auto/v1725044498/logos/laraveldaily)Laravel Daily · 2y  
4 Tips to Improve Leah's Laravel Code  
The post offers four tips for improving Leah's Laravel code. Key advice includes placing methods within models or service classes rather than controllers, using Laravel's collections over arrays for more elegant code, optimizing database queries to prevent performance problems, and understanding the difference between 'migrate:refresh' and 'migrate:fresh' commands to manage database migrations efficiently. The overall message encourages beginners to share their code publicly and learn from provided feedback.  
14
3. 3  
[](https://daily.dev/posts/laravel-login-with-different-roles-no-password-ehuw4hm3k "Laravel Login with Different Roles: No Password")  
Video  
![Avatar of laraveldaily](https://media.daily.dev/image/upload/s--vzdgNGfl--/f_auto/v1725044498/logos/laraveldaily)Laravel Daily · 2y  
Laravel Login with Different Roles: No Password  
A tutorial on using the spyy/laravel-login-link package to create login links for different user roles in a Laravel application without requiring a password. Best used in a local environment for testing different permissions and roles effortlessly.  
12
4. 4  
[](https://daily.dev/posts/writing-pest-tests-for-laravel-crud-live-coding-s2ayonc2k "Writing Pest Tests for Laravel CRUD: Live-Coding")  
Video  
![Avatar of laraveldaily](https://media.daily.dev/image/upload/s--vzdgNGfl--/f_auto/v1725044498/logos/laraveldaily)Laravel Daily · 2y  
Writing Pest Tests for Laravel CRUD: Live-Coding  
This post provides a detailed, step-by-step guide on writing automated tests for a Laravel CRUD project using Pest. The author demonstrates live coding to create tests for user CRUD operations, explains the importance of testing strategies like arranging, acting, and asserting, and discusses handling database configurations. It also covers creating custom tests, handling permissions, and the significance of both happy and unhappy paths in testing. The post concludes with advice on automating tests using GitHub Actions and further learning resources.  
12

[See all Laravel Daily archives](/sources/laraveldaily/best-of)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@graph":[{"@type":"CollectionPage","@id":"https://daily.dev/sources/laraveldaily/best-of/2024/10#page","url":"https://daily.dev/sources/laraveldaily/best-of/2024/10","name":"Best Laravel Daily Posts — October 2024","description":"The most upvoted Laravel Daily posts from October 2024, curated by the daily.dev community.","isPartOf":{"@type":"WebSite","url":"https://daily.dev"}},{"@type":"ItemList","@id":"https://daily.dev/sources/laraveldaily/best-of/2024/10#items","numberOfItems":4,"itemListElement":[{"@type":"ListItem","position":1,"url":"https://daily.dev/posts/laravel-roles-permissions-complex-multi-clinic-project-zqbzdqedd","name":"Laravel Roles/Permissions: Complex Multi-Clinic Project"},{"@type":"ListItem","position":2,"url":"https://daily.dev/posts/4-tips-to-improve-leah-s-laravel-code-25ldshfgl","name":"4 Tips to Improve Leah's Laravel Code"},{"@type":"ListItem","position":3,"url":"https://daily.dev/posts/laravel-login-with-different-roles-no-password-ehuw4hm3k","name":"Laravel Login with Different Roles: No Password"},{"@type":"ListItem","position":4,"url":"https://daily.dev/posts/writing-pest-tests-for-laravel-crud-live-coding-s2ayonc2k","name":"Writing Pest Tests for Laravel CRUD: Live-Coding"}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sources","item":"https://daily.dev/sources"},{"@type":"ListItem","position":3,"name":"Laravel Daily","item":"https://daily.dev/sources/laraveldaily"},{"@type":"ListItem","position":4,"name":"Best of","item":"https://daily.dev/sources/laraveldaily/best-of"},{"@type":"ListItem","position":5,"name":"October 2024"}]}]}
```

