Skip to content

Instantly share code, notes, and snippets.

View diloabininyeri's full-sized avatar

Dılo abinin yeri diloabininyeri

View GitHub Profile
<?php
class Pipeline
{
private $number;
public function __construct($say)
{
$this->number = $say;
@diloabininyeri
diloabininyeri / php middleware from structure
Last active January 1, 2019 19:45
php make middleware pure php without framework
<?php
/**
* Created by PhpStorm.
* User: nkolayofis
* Date: 1.01.2019
* Time: 21:45
*/
require_once "vendor/autoload.php";
GET http://localhost:9200/deneme/insan/_search
Content-Type: application/json
{
"query": {
"match": {
"name": {
"query": "baba geldi",
"minimum_should_match": 1
}
GET http://localhost:9200/deneme/insan/_search
Content-Type: application/json
{
"query": {
"dis_max": {
"queries": [
{
"term": {
"name": "sevda"
{
"query": {
"bool": {
"should": [
{ "match": { "street": "Poland Street W1V" }},
{ "match": { "city": "Poland Street W1V" }},
{ "match": { "country": "Poland Street W1V" }},
{ "match": { "postcode": "Poland Street W1V" }}
]
}
{
"query": {
"bool": {
"should": [
{ "match": { "street": "Poland Street W1V" }},
{ "match": { "city": "Poland Street W1V" }},
{ "match": { "country": "Poland Street W1V" }},
{ "match": { "postcode": "Poland Street W1V" }}
]
}
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Validation\ValidationException;
class Handler extends ExceptionHandler
{
<VirtualHost *:80>
# Admin email, Server Name (domain name) and any aliases
ServerName local.sitename.com
#ServerAlias www.domain1.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Pagination\LengthAwarePaginator;
class Deneme extends Controller
{
<?php
namespace App\Http\Controllers;
use App\Paginator;
use Illuminate\Http\Request;
use Illuminate\Pagination\LengthAwarePaginator;
class Deneme extends Controller
{