For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
Schema::create('posts', function(Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('body');
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="8000"> | |
<!--====/ Slider Pagination /=====--> | |
<ol class="carousel-indicators"> | |
<li data-target="#myCarousel" data-slide-to="0" class="active"></li> | |
<li data-target="#myCarousel" data-slide-to="1"></li> | |
<li data-target="#myCarousel" data-slide-to="2"></li> | |
</ol> | |
<div class="carousel-inner"> | |
<!--====/ Single Slider /=====--> |
-- test by do | |
-- select extract_json_value('{"a":["a","2"]}','(/a)') | |
-- common schema | |
delimiter // | |
drop function if exists json_to_xml// | |
create function json_to_xml( | |
json_text text charset utf8 |
#!/bin/sh | |
# | |
# An example hook script to prepare the commit log message. | |
# Called by "git commit" with the name of the file that has the | |
# commit message, followed by the description of the commit | |
# message's source. The hook's purpose is to edit the commit | |
# message file. If the hook fails with a non-zero status, | |
# the commit is aborted. | |
# | |
# To enable this hook, rename this file to "prepare-commit-msg". |
# Type(<scope>): <subject> | |
# <body> | |
# <footer> | |
# Type should be one of the following: | |
# * feat (new feature) | |
# * fix (bug fix) | |
# * docs (changes to documentation) |
<?php | |
function mime_type($file) { | |
// there's a bug that doesn't properly detect | |
// the mime type of css files | |
// https://bugs.php.net/bug.php?id=53035 | |
// so the following is used, instead | |
// src: http://www.freeformatter.com/mime-types-list.html#mime-types-list | |
<?php | |
class TestCase extends Illuminate\Foundation\Testing\TestCase { | |
/** | |
* Creates the appliation. | |
* | |
* @return \Symfony\Component\HttpKernel\HttpKernelInterface | |
*/ | |
public function createApplication() |
<rewrite> | |
<!-- Have a bunch of redirects? Put them in a separate file --> | |
<rules configSource="Rewrites.config" /> | |
<rules> | |
<!-- Simple rewrite --> | |
<rule name="Simple rewrite" stopProcessing="true"> | |
<match url="^path/sub path/page\.aspx$" /> | |
<action type="Rewrite" url="/newpath.aspx" /> |
For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
Schema::create('posts', function(Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('body');
<?php | |
class ExampleTest extends TestCase { | |
public function setUp() | |
{ | |
parent::setUp(); | |
DB::beginTransaction(); | |
} |
Press minus + shift + s
and return
to chop/fold long lines!