Skip to content

Instantly share code, notes, and snippets.

@GesJeremie
GesJeremie / PurchaseMasterBoxTest.php
Created January 21, 2016 09:25
Put that under tests/functionnal/PurchaseMasterBoxTest.php
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Faker\Factory as Faker;
class PurchaseMasterBoxTest extends TestCase
{
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserOrderBuildingsTable extends Migration {
/**
* Run the migrations.
*
@GesJeremie
GesJeremie / EmailExampleTest.php
Created November 23, 2015 02:58
Email test case for testing emails with Mailtrap.io in Phpunit
<?php
/*
|--------------------------------------------------------------------------
| EmailExampleTest
|--------------------------------------------------------------------------
|
| Email test case for testing emails with Mailtrap.io in Phpunit
|
| Requirements:
| - Laravel 5.1
@GesJeremie
GesJeremie / deploy.php
Last active April 11, 2017 13:56
Laravel 5 example deployer
<?php
/**
* Require dependency
*/
require_once 'recipe/common.php';
/**
* How many releases we want to keep
*/
<% for hero in @heroes %>
<p><%= hero.name %> is here to help you !</p>
<% end %>
<form action="/admin/safety_training_courses" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓"><input type="hidden" name="_method" value="update"><input type="hidden" name="authenticity_token" value="lk9Fm7n7wZ4dYQ4wyFsgujIwbI5iJrfCgmFT2xYR0IN2zAlYZVJ8HMkUJOvRucX3bEvBku6mXF17DfNUDXljDQ==">
<div class="gray-box">
Industry
<select name="industry" id="industry"><option value="1">Testing</option>
<option value="2">Construction</option>
<option selected="selected" value="3">Development</option></select>
</div>
<div id="subindustries"></div>
<div class="gray-box" data-entry="">
Sub-Industry
- @industries.each_with_index do |industry, index|
- if index == 0
.gray-box
Industry
= select_tag :industry, options_from_collection_for_select(@select_industries, "id", "title", industry[:id])
#subindustries
- else
$(document).ready ->
effect_hide.init()
tabs.init()
if $('#video-slider').length > 0
s = 0
lastMove = 0
router.match '/users/edit/:id', (params) ->
# Do something awesome here.
route.match '/welcome/:user', (params) ->
console.log 'Welcome ' + params.user