Welcome to laravelsnippets.com

A repository of useful code snippets for Laravel PHP framework. Submit, grab and share!

Source code of the site - Github link . We accept pull requests! =)

Most Recent Snippets

Snippet Posted
Validator, Validation rule Or 3 weeks ago 150 0 0
Mulltiple Nested views w/o Blade Template 3 weeks ago 139 1 0
Get model columns 3 weeks ago 139 0 0
Split routes into different files. 3 weeks ago 571 1 1
Log DB queries 3 weeks ago 415 0 1
Facebook Open Graph Macro 1 month ago 382 1 0
Ways to perform a query 1 month ago 903 0 2
Replace Eloquent Model and implement findCached method 1 month ago 915 0 0
Get all columns names from a Eloquent Model (3) 2 months ago 1141 0 0
Detecting Environments in start.php 2 months ago 861 2 1

Most Popular Snippets

Snippet Posted
Multilingual i18n routes. 7 months ago 429816 0 7
Flexible master layout 8 months ago 8970 5 16
AngularJS with Laravel 5 months ago 5749 3 3
Sentry Route Filters 9 months ago 5297 4 8
Managing Timestamps 9 months ago 4320 13 0
Default layout [master.blade.php] 8 months ago 4301 6 5
Using Namespace in Route Group 8 months ago 4049 4 2
Get all columns names from a Eloquent Model 9 months ago 3870 7 1
Bootstrap 3 Form Macros 9 months ago 3827 7 8
Using Laravel Blade with AngularJS Templates -- Redux (Alternate Method) 9 months ago 3375 4 2

Want to help with the site? We accept pull requests! Find us on Github