Skip to content

Instantly share code, notes, and snippets.

View matiit's full-sized avatar
:octocat:

Mateusz Tracz matiit

:octocat:
View GitHub Profile
public function index()
{
$query = Input::get('q');
if(!$query) {
return View::make('search.index');
}
list($listings, $searchedCoords) = $this->searchRepository->findByQuery($query, true);
<?php namespace App\Http\Middleware;
use App;
use Closure;
use Illuminate\Contracts\Routing\Middleware;
class MyMiddleware implements Middleware {
/**
* Handle an incoming request.
5th Novembver 2014 in Thunock (name of the City, I might mispelled the word),
near the London, during changing the drive lane I hit another car.
BMW brand, registration number ND10PFX.
This accident took place on M24 road.
I drove in Renault Premium, registration number P0704vj.
Accident was my fault because I did not see the BMW vehicle in my mirrors.
authentify: (user) ->
deferred = $.Deferred()
$.ajax(
type: 'POST'
url: '/auth/register'
data: view.model.toJSON()
success: (data) =>
console.log "I am in succes??"
deferred.resolve()
eventsActions.before('removeOne', function(nextCallback, actionBody) {
console.log("Removing event");
var jsonEvent = JSON.stringify(actionBody);
jQ.ajax({
type: 'POST',
dataType: 'json',
contentType: 'application/json',
<?php
public function getDates()
{
// In case it returns array of arrays:
return [
// You can specify second "element" which would be the name of the column with timezone values
['start_date', 'timezone'],
// Use default if second "argument" not provided
['some_other_date_field']
];
<?php
public function getDates()
{
// In case it returns array of arrays:
return [
// You can specify second "element" which would be the name of the column with timezone values
['start_date', 'timezone'],
// Use default if second "argument" not provided
['some_other_date_field']
];
<?php
namespace JustPark\Tests\Unit\Auth;
use JustPark\Auth\ShareableLinkAuth;
class ShareableLinkAuthTest extends \PHPUnit_Framework_TestCase
{
public function test_it_generates_working_link()
{
<?php
return [
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
<?php
$addedRows = 0;
(...)
// Keep the order
// Reset it here, not in the if, so it always! gets resetted.
$addedRowsToCurrent = 0;
if ($grouped == AdminList::GROUPED_FOR_TAX_RELIEF && $row['tax_allocation_exists'] == 1) {
/**