DEV Community

Benjamin Delespierre profile picture

Benjamin Delespierre

I do all sorts of mischiefs with Laravel

Location Paris, France Joined Joined onย  Personal website https://dev.to/bdelespierre github website twitter website

All 118 comments

Organize your models scopes better in Laravel

why tho?

Yes, PHP is Worth Learning/Using in $CURRENT_YEAR

Arrow functions are kewl too $b = 2; $f = fn($a) => $a ...

The Visitor Pattern in PHP

The double dispatch can be confusing and make the code harde...

How to Append Arrays in PHP: + vs. array_merge

have you tried this? [1,2,3,...[4,5]] == range(1,5) ...

Repository Pattern in Laravel

Thanks for this article @davidrjenni , very informative and w...

Repository Pattern in Laravel

Can be helpful when you use different model entities across s...

15 Developer Tools to Make You Super Productive

Awesome list ๐Ÿ˜Ž

Hacking Laravel to achieve modularity

Thanks for your comment Mohamed ๐Ÿ‘

Hacking Laravel to achieve modularity

Hey Davor, thanks for your comment ๐Ÿ‘ I see you've restructur...

Hacking Laravel to achieve modularity

Hey @ltsochevdev thanks for your message ๐Ÿ‘ I'm not sure ar...

Hacking Laravel to achieve modularity

Hey @saltibarsciai thanks for you comment ๐Ÿ‘ Glad you like i...

Hacking Laravel to achieve modularity

Thanks for your comment ๐Ÿ‘ There are a lot of packages like t...

Hacking Laravel to achieve modularity

Thanks for your comment ๐Ÿ‘ Several other packages ๐Ÿ“ฆ already e...

PHP libraries and tools

And you? Do you know any interesting tool that is not in thi...

Hacking Laravel to achieve modularity

Thanks for your comment ๐Ÿ™‚

Manage Your Dotfiles Like a Superhero

I accumulated a lot of conf using this method ๐Ÿ‘ Here are my d...

Software Engineering is a Loserโ€™s Game

Development is indeed an activity we love to hate ๐Ÿ˜‚

Using Database Transactions to Write Safer Laravel Code

Awesome article! I might add transactions are an absolute m...

Software Engineering is a Loserโ€™s Game

P.S. I'm not sure if you've ever read Michael Lopp's essay o...

Software Engineering is a Loserโ€™s Game

I like your article, Tyler. And I love your metaphor, I belie...

Cleaner models with Laravel Eloquent Builders

Whatever float your boat mate. I hope you're happy with that ...

Cleaner models with Laravel Eloquent Builders

Unfortunately, these days so many people don't even know how...

Domain Driven Design Aggregates in Laravel

Thanks for your feedback ๐Ÿค— Be sure to come back to share your...

Domain Driven Design Aggregates in Laravel

It's true it's not easy to use DDD in Laravel without rebuild...

Cleaner models with Laravel Eloquent Builders

They were born out of people's fear of bla bla bla This is...

Setting Up Tailwind CSS in Laravel

Thatโ€™s an excellent article, thank you ๐Ÿ™

Why is Laravel considered the Top PHP Framework?

Laravel is great for RAD and there's a bunch of awesome plug-...

How to Install PHP 8 on Ubuntu 20.04

If (like me) you're frequently switching between PHP8 and PHP...

How to implement a simple like system with Laravel

Your $model variable shouldn't be an stdClass instance. It sh...

How to implement Clean Architecture with Laravel

Both approaches could work just fine IMHO. The second one is ...

How to implement Clean Architecture with Laravel

Can you provide examples for these?

How to implement Clean Architecture with Laravel

I believe in the case of REST API, the ViewModel would be a L...

Understanding the test pyramid

Here's a pic that may help visualize the concepts explained h...

Circular Queue using python..!

class CircularQ: def isEmpty(self, value): retur...

All flavors of PHP 8 getters

Thanks for your message. Your concerns actually make sense. I...

5 tips in PHP ๐Ÿ˜

Here's another one for you: extract variables from string usi...

PHP Errors vs. Exceptions

Nice article. I would like to quote my Java teacher here: ex...

Traits are not inherited

That actually makes sense. The static property belongs to the...

Introducing Iterator Functions package

You could also propose those methods for the amazing Laravel ...

Introducing Iterator Functions package

I understand. Donโ€™t hesitate to DM me if you need an upvote o...

Introducing Iterator Functions package

Good job. Have you considered writing an RFC to add those met...

How to implement Clean Architecture with Laravel

Thanks for your comment Bernard. As I quote in the article ...

How to implement Clean Architecture with Laravel

Behavior shared amongst use cases should go into shared servi...

How to implement Clean Architecture with Laravel

It can, but it wouldn't adhere to the specifications of this ...

Why Do People Often Use Trendy Technologies ?

That question is a door to a whole universe my friend. In a r...

Auto-generated Repository Pattern in Laravel

Is the UserInterface an entity? A Repository? Also, why would...

How to implement Clean Architecture with Laravel

Hi @emperorkonstantin , thanks for your message ๐Ÿ‘ On real pr...

How to implement Clean Architecture with Laravel

Yes, actually I plan on writing an article on how to structur...

Do Developers Still Use PHP (and why thatโ€™s the wrong question to ask)

You got a point. But I donโ€™t believe any language or platform...

How to implement Clean Architecture with Laravel

I donโ€™t believe it does. Taking care of all the steps involve...

Do Developers Still Use PHP (and why thatโ€™s the wrong question to ask)

๐Ÿคฆโ€โ™‚๏ธ Iโ€™m obviously talking about the platform, not the langua...

Do Developers Still Use PHP (and why thatโ€™s the wrong question to ask)

Because PHP is standalone and can do stuff on its own. JavaSc...

Auto-generated Repository Pattern in Laravel

Great article! Would it be at all possible to see how to use ...

How to implement Clean Architecture with Laravel

Hey @ngodinhcuong thanks for your comment ๐Ÿ‘ Sure Iโ€™ll have ...

How to implement Clean Architecture with Laravel

Hey @waynethorley thanks for your comment ๐Ÿ‘ The complexity ...

Do Developers Still Use PHP (and why thatโ€™s the wrong question to ask)

And by the way, itโ€™s still an hypertext pre-processor, compar...

Do Developers Still Use PHP (and why thatโ€™s the wrong question to ask)

PHP became popular not because it was easy, not because of it...

How to implement Clean Architecture with Laravel

The framework is left untouched. This implementation is compl...

How to cut a cake with various tech

Maybe โ€œ@cut the cake or die hungryโ€ ๐Ÿ˜‚

How to cut a cake with various tech

SQL you try to join cakes and knives on cakes.knife_id = kniv...

How to cut a cake with various tech

You want to cut the cake but the code for the knife is 10 yea...

Take a look on beercss ๐Ÿบ

Great library! As a (very) lazy developer, can I have ready-t...

Self-Hosted Password Manager (Laravel 8 + PHP 8 + MySQL 8)

Looks nice! I suggest you add a deploy to Heroku button, I th...

Decoupling Laravel Code

If this is a correct implementation of the Clean Architecture...

All flavors of PHP 8 getters

Interesting way of breaking encapsulation ๐Ÿ‘

All flavors of PHP 8 getters

Good call ๐Ÿ˜‰ I'm adding it!

All flavors of PHP 8 getters

Thanks, I'll add it as soon as PHP 8.1 comes out. There won't...

Conditional Classes Blade Directives in Laravel

Amazing!

How to setup Git commit hooks for PHP

Add PHPCS as a dev dependency with composer require --dev squ...

Using value-objects in Laravel Models

Thanks ๐Ÿ™

Why Do Companies Ask For Passion?

That's what happens when CEOs are accountants... Sometimes hi...

Why Do Companies Ask For Passion?

Most companies view tech as a cost center whose function is t...

Why Accessibility?

Absolutely. I ask my team to take initiative as much as they ...

Why Do Companies Ask For Passion?

The more important point is what can I exchange my two magic...

Why Do Companies Ask For Passion?

That's amazingly well said. I'm saving this in my quotes fold...

Why Do Companies Ask For Passion?

Interesting point of view!

Why Do Companies Ask For Passion?

So true! I'd like to note here that some of the best developp...

Why Do Companies Ask For Passion?

You may jump to this comment

Why Do Companies Ask For Passion?

Well most of the time they hit me with the old "Errrrrrr..." ...

Job Searches and Career Changes When You're Not the "Default"

You did what you though was right, there's nothing wrong with...

Job Searches and Career Changes When You're Not the "Default"

Amazing article. I'll make sure to keep it somewhere for the ...

Why Do Companies Ask For Passion?

"We're looking for someone passionate" on a job description t...

Readability with break statements

Which one would you pick? # happy path for value in list: ...

Balancing early and later project risks

Outstanding article! I'm going to share this, thank you for t...

Dealing with mixed concerns, a solutions hierarchy

Thank you for your feedback. I really believe in simplicitity...

Why Accessibility?

Awesome article. I couldn't agree more. I often see stakeho...

How to implement a simple like system with Laravel

In the code snippet you provided, there's a typo on the arrow...

How to Disable Users from Login in Laravel

Thank for the article. I find the status property very vague ...

Laravel 8.x Cursor Based Pagination Example

That's rad!

How to implement a simple like system with Laravel

Yes, that's because the gates in AuthServiceProvider are usin...

How to implement a simple like system with Laravel

I have just tried $posts = Post::latest()->with('likes'...

How to implement a simple like system with Laravel

Can you show us what you tried?

Laravel 8.x withExists Method to Eloquent Queries Example

That's amazing, I didn't know about this feature. One questio...

What is Null Safety Operator in PHP 8 and why is it next big thing in PHP

The way to "make things work" like that without this operator...

How to implement a simple like system with Laravel

most welcome my friend. You can also check this out, it's a w...

How to implement a simple like system with Laravel

Aaaaand done. check it out!

How to implement a simple like system with Laravel

Should be fixed now. What do you think?

What is Null Safety Operator in PHP 8 and why is it next big thing in PHP

Question marks. Question marks everywhere.

How to implement a simple like system with Laravel

Thanks for pointing this out. I'm fixing the article as we sp...

How to implement a simple like system with Laravel

Sure, I think I'll update the article to add the views, stay ...

Why Laravel requires `ramsey/uuid` package?

Great package for UUID management

How to implement a simple like system with Laravel

It's very unlikely a version issue (if you're running PHP7.2+...

Supercharge your Laravel 8 Collections

That's such a great idea. Also I think it's worth noting tha...

Laravel 8 Database Notifications with Models using Collection Macro

That's just fantastic

Using symbols in CSS selectors

Very interesting

The shortest way to achieve responsive font-size

Good to know. Plus calc has an amazingly good support : caniu...

Convert accentuated character to their ASCII equivalent in PHP

Nice job you did there!

Useful Laravel Blade Directives

Also very useful @can('edit', $post) <a href="{{ route...

How to implement a simple like system with Laravel

assuming you've done everything in the tutorial right you sho...

Some Terminal Commands to Make Life Easier

cd - gets you to the previous directory you were in. git chec...

How to implement a simple like system with Laravel

Yeah I removed the Builder typehint, it wasn't very helpful a...

How to implement a simple like system with Laravel

My mistake. I'll change it, thanks for pointing it out

How to cleanup your old Git branches

Salaam. Most welcome.

Different Ways to Redirect User

You can also flash session data using with like this: retur...

How to Improve Routing In Laravel

Dealing with thousands of routes, we ended up doing the follo...

How to implement a simple like system with Laravel

Well, you could tweak the design a bit by making the user_id ...

How to implement a basic, role-based, ACL in Laravel

Hello Eelco, foreignId is a method introduced in Laravel 7. ...

loading...