Skip to content

Instantly share code, notes, and snippets.

View driesvints's full-sized avatar

Dries Vints driesvints

View GitHub Profile
@driesvints
driesvints / laravel-weekly-25-quick-tip.php
Last active March 28, 2019 13:52
Laravel Weekly #25 Quick Tip
<?php
// Get an array of all files in a directory.
$files = File::files('path_to_dir');
// Get all of the files from the given directory (recursive).
$files = File::allFiles('path_to_dir');
// Get all of the directories within a given directory.
$files = File::directory('path_to_dir');
@driesvints
driesvints / laravel-weekly-24-quick-tip.php
Created September 24, 2013 08:22
Laravel Weekly #24 - Quick Tip
<?php
// Redirect to a named 'home' route.
return Redirect::home();
// Refresh the current URI.
return Redirect::refresh();
@driesvints
driesvints / laravel-weekly-23-quick-tip.php
Last active October 23, 2018 07:52
Laravel Weekly #23 - Quick Tip
<?php
# Create a list with numbers ranging from 10 to 20.
Form::selectRange('number', 10, 20);
# Create a list with years ranging from 1900 to 2000.
Form::selectYear('year', 1900, 2000);
# Creates a list with month names.
Form::selectMonth('month');