- fireup internal php webserver php -S localhost:8888
Download composer [get composer]
[get composer]: http://getcomposer.org
curl -sS https://getcomposer.org/installer | php
var accounts = [{name:"leo", age:21},{name:"su", age:28},{name:"anne", age:31},{name:"doe", age:19},{name:"louis", age:34}]; | |
var byAge = accounts.slice(0); | |
byAge.sort(function(a,b) { return a.age - b.age; }); | |
ls /etc/*release | |
cat /etc/*-release | |
lsb_release -a | |
uname -a | |
uname -mrs | |
cat /proc/version |
**List Foreign Keys** | |
`` | |
SHOW CREATE TABLE table_name; | |
`` | |
**List referenced foreign keys** | |
`` | |
select | |
TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME |
Download composer [get composer]
[get composer]: http://getcomposer.org
curl -sS https://getcomposer.org/installer | php
<?php | |
Schema::create('users' , function($table) | |
{ | |
$table->increments('id'); Incrementing ID to the table (primary key). | |
$table->string('email'); VARCHAR equivalent column | |
$table->string('name', 100); VARCHAR equivalent with a length | |
$table->integer('votes'); INTEGER equivalent to the table |
$(document).ready(function () { | |
$("form").submit(function() { | |
$(this).find(":input").filter(function(){ return !this.value; }).attr("disabled", "disabled"); | |
return true; | |
}); | |
$('.add-answer').click(function () { | |
$('<div/>', { | |
'class' : 'single-field', html: GetAnswer() |
// Build your query as usual, but don't use the paginate() method at the chain | |
// end. | |
$query = User::select([ 'users.*', DB::raw('count(roles.id) as roles_count') ]) | |
->join('user_roles', 'users.id', '=', 'roles.user_id') | |
->groupBy('users.id') | |
->having('roles_count', '>', 0); | |
// Due a bug in Eloquent, we need to build the paginator manually. | |
// | |
// For more details refer to: |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Foundation\Application; | |
use Illuminate\Http\Request; | |
use Illuminate\Routing\Redirector; | |
use Illuminate\Support\Facades\App; | |
use Illuminate\Support\Facades\Config; | |
use Illuminate\Support\Facades\Session; |
show.bs.modal
: fired just before the modal is open.
shown.bs.modal
: fired after the modal is shown.
hide.bs.modal
: fired just before the modal is hidden.
hidden.bs.modal
: fired after the modal is closed.
loaded.bs.modal
: fired when remote content is successfully loaded in the modal’s content area using the remote option mentioned above.
// npm i -g gulp | |
// npm i gulp gulp-uglify gulp-rename gulp-concat gulp-header gulp-minify-css gulp-watch | |
var gulp = require('gulp'), | |
uglify = require('gulp-uglify'), | |
rename = require('gulp-rename'), | |
concat = require('gulp-concat'), | |
header = require('gulp-header'), | |
pkg = require('./package.json'), | |
minifyCSS = require('gulp-minify-css'), | |
watch = require('gulp-watch'); |