Category: Snippets

Blade Eloquent Snippets Laravel Series: Laravel Snippets

10 Random Laravel Snippets & Methods, Part 4

I write code blocks down that I know I won't use often and will forget about. Every so often I go through them to refresh my memory.

Anthony Rappa Anthony Rappa

Anthony Rappa

2 min read
4,258 views

Alpine Snippets Tailwind

Snippet 5: Creating a simple, but cool delete button with Alpine.js and TailwindCSS

Sometimes ideas pop into my head that I don't immediately need, but I think are a good exercise. So I carve out 15 minutes of my day to code an example to learn and save to my library of components for future use.

Anthony Rappa Anthony Rappa

Anthony Rappa

2 min read
88,854 views

Laravel Snippets Series: Laravel Snippets

15 Random Laravel Snippets & Methods, Part 2

I write code blocks down that I know I won't use often and will forget about. Every so often I go through them to refresh my memory.

Anthony Rappa Anthony Rappa

Anthony Rappa

2 min read
5,727 views

Laravel Snippets

Snippet 4: How I autoload my helper functions

I used to just load a helpers.php file in composer.json like everyone else, however the last couple years I have taken a more organizational approach.

Anthony Rappa Anthony Rappa

Anthony Rappa

2 min read
5,374 views

Laravel Snippets Series: Laravel Snippets

15 Random Laravel Snippets & Methods

I write code blocks down that I know I won't use often and will forget about. Every so often I go through them to refresh my memory.

Anthony Rappa Anthony Rappa

Anthony Rappa

2 min read
15,475 views

Laravel Snippets

Snippet 3: Making the logged in user available to all views using view composers

Learn how to use view composers to share small pieces of data across multiple views instead of passing them through many controllers.

Anthony Rappa Anthony Rappa

Anthony Rappa

1 min read
1,775 views

Snippets Laravel

Snippet 2: Adding a UUID Trait to auto-populate uuid columns on model create

If you ever have the need for a UUID column on your models, you may as well use a trait to populate them in case you need the same functionality on other models in the future.

Anthony Rappa Anthony Rappa

Anthony Rappa

1 min read
2,927 views

Snippets Laravel

Snippet 1: Using Laravel's ConfirmableTrait in commands

Did you know you can easily add the production consoles messages you get with Laravel's migrate and seed to your own commands?

Anthony Rappa Anthony Rappa

Anthony Rappa

1 min read
1,952 views