This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app/Http/Middleware/CheckForMaintenanceMode.php | |
<?php | |
namespace App\Http\Middleware; | |
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware; | |
class CheckForMaintenanceMode extends Middleware | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Illuminate\Foundation\Console; | |
use Exception; | |
use Illuminate\Console\Command; | |
class UpCommand extends Command | |
{ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Example code for: PHP 7 Data Structures and Algorithms | |
* | |
* Author: Mizanur rahman <mizanur.rahman@gmail.com> | |
* | |
*/ | |
class ListNode { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
## | |
# Autodiscovery : Consul | |
## | |
autodiscovery: | |
build: ./autodiscovery/ | |
mem_limit: 128m | |
expose: | |
- 53 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Copyright 2018 Google Inc. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//NULLSAFE OPERATOR | |
//class User { | |
// public function profile(){ | |
// return new Profile; | |
// } | |
//} | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Person{ | |
public $name; | |
public function __construct(string $name){ | |
$this->name = $name; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Browser | |
{ | |
public static function browse($callable) | |
{ | |
$params = (new ReflectionFunction($callable))->getParameters(); | |
$args = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//a boy has two shows and can decide to wear anyone of it at any time, | |
//the below class shows the implementation without applying any design patterns | |
class ShoeWithoutFactory | |
{ | |
const CHURCH = 1; | |
const SCHOOL = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Food | |
{ | |
} | |
class AnimalFood extends Food | |
{ | |
} |