View articles.apib
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
FORMAT: 1A | |
# Articles | |
Simple API for managing news articles. | |
## Authorization | |
To create, update or destroy an article, you have to authorize. To authorize you have to send your personal `api_token` key with the request in one of these three possible ways: |
View bookstore-advanced.apib
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
FORMAT: 1A | |
# Bookstore Advanced | |
Bookstore is a simple API which allows consumers to view all books and create new ones. | |
## Data Structures | |
### Book |
View bookstore.apib
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
FORMAT: 1A | |
# Bookstore | |
Bookstore is a simple API which allows consumers to view all books and create new ones. | |
## Group Book | |
Resources related to books in the API. |
View User.php
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 App; | |
use Illuminate\Auth\Authenticatable; | |
use Laravel\Lumen\Auth\Authorizable; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; | |
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; | |
use Tymon\JWTAuth\Contracts\JWTSubject; |
View auth.php
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 | |
return [ | |
/* | |
|-------------------------------------------------------------------------- | |
| Authentication Defaults | |
|-------------------------------------------------------------------------- | |
| | |
| This option controls the default authentication "guard" and password |
View helpers.php
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 | |
if ( ! function_exists('config_path')) | |
{ | |
/** | |
* Get the configuration path. | |
* | |
* @param string $path | |
* @return string | |
*/ |
View Envoy.blade.php
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
@servers(['web' => 'username@domain.com -p 1234']) | |
@setup | |
$project_name = 'Project Name'; | |
$project_url = 'http://project-domain.com/'; | |
$project_root = '/www/project/web'; | |
$slack_hook = 'your-slack-hook-url'; | |
$slack_channel = '#channel'; | |
@endsetup |
View Envoy.blade.php
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
@servers(['web' => 'user@yourdomain.com -p 1234']) | |
@setup | |
$path = "/path/to/site"; | |
@endsetup | |
@task('down') | |
cd {{ $path }} | |
php artisan down | |
@endtask |
View NewRelicAppName.php
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
/* | |
|-------------------------------------------------------------------------- | |
| New Relic App Name | |
|-------------------------------------------------------------------------- | |
| | |
| If the extension `newrelic` is loaded then | |
| set the name of the app to something. | |
| | |
*/ |
View ArrayValidation.php
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 ArrayValidation extends Illuminate\Validation\Validator | |
{ | |
public function validatePeriodArray($field, $values, $params) | |
{ | |
$valid = true; | |
foreach($values as $value) | |
{ |
NewerOlder