These are the most useful Regular Expressions that I find myself using on a regular basis
Test to see if a string is a valid website address or not.
[ | |
"a", | |
"aa", | |
"about", | |
"abuse", | |
"access", | |
"account", | |
"accounts", | |
"ad", | |
"admin", |
{{-- | |
This makes a great "partial" to add to your template layout file. It will self manage your | |
notifications so you do not need to worry about displaying them. Simply just add notifications | |
using LaraFlash (Laravel Package) in your controllers, and they will display intelligently | |
and elegantly into your views. | |
Simply use an @include statement in your main template/layout file to this partial so that | |
this partial is included with every view. The rest can be set once and forgotten. | |
Requirements: |
<?php | |
if (!function_exists('timezoneArray')) { | |
/** | |
* description | |
* | |
* @param | |
* @return | |
*/ |
<!-- This is the main Blade file that you want your components to show up in --> | |
<!DOCTYPE html> | |
<html lang="{{ config('app.locale') }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Laravel</title> |
<select> | |
<option value="AL">Alabama</option> | |
<option value="AK">Alaska</option> | |
<option value="AZ">Arizona</option> | |
<option value="AR">Arkansas</option> | |
<option value="CA">California</option> | |
<option value="CO">Colorado</option> | |
<option value="CT">Connecticut</option> | |
<option value="DE">Delaware</option> | |
<option value="DC">District Of Columbia</option> |
/* | |
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects. | |
It will generate several classes such as: | |
.m-r-10 which gives margin-right 10 pixels. | |
.m-r-15 gives MARGIN to the RIGHT 15 pixels. | |
.m-t-15 gives MARGIN to the TOP 15 pixels and so on. | |
.p-b-5 gives PADDING to the BOTTOM of 5 pixels | |
.p-l-40 gives PADDING to the LEFT of 40 pixels |
/** | |
* Create a Symfony response for the given exception. | |
* | |
* @param \Exception $e | |
* @return mixed | |
*/ | |
protected function convertExceptionToResponse(Exception $e) | |
{ | |
if (config('app.debug')) { | |
$whoops = new \Whoops\Run; |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var browserSync = require('browser-sync').create(); | |
// Compile Sass + refresh browser sync | |
gulp.task('styles', function() { | |
return gulp.src('./sass/**/*.scss') | |
.pipe(sass().on('error', sass.logError)) | |
.pipe(gulp.dest('./css')) | |
.pipe(browserSync.stream()); |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Laravel Blog</title> |