Skip to content

Commit a0960e6

Browse files
committed
initial release
0 parents  commit a0960e6

File tree

150 files changed

+24513
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+24513
-0
lines changed

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.env.example

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
APP_NAME="Laravel Zero"
2+
APP_ENV=local
3+
APP_KEY=
4+
APP_DEBUG=true
5+
APP_URL=http://localhost
6+
7+
LOG_CHANNEL=stack
8+
9+
DB_CONNECTION=mysql
10+
DB_HOST=127.0.0.1
11+
DB_PORT=3306
12+
DB_DATABASE=laravel
13+
DB_USERNAME=root
14+
DB_PASSWORD=
15+
16+
BROADCAST_DRIVER=log
17+
CACHE_DRIVER=file
18+
QUEUE_CONNECTION=sync
19+
SESSION_DRIVER=file
20+
SESSION_LIFETIME=120
21+
22+
REDIS_HOST=127.0.0.1
23+
REDIS_PASSWORD=null
24+
REDIS_PORT=6379
25+
26+
MAIL_MAILER=smtp
27+
MAIL_HOST=smtp.mailtrap.io
28+
MAIL_PORT=2525
29+
MAIL_USERNAME=null
30+
MAIL_PASSWORD=null
31+
MAIL_ENCRYPTION=null
32+
MAIL_FROM_ADDRESS=null
33+
MAIL_FROM_NAME="${APP_NAME}"
34+
35+
AWS_ACCESS_KEY_ID=
36+
AWS_SECRET_ACCESS_KEY=
37+
AWS_DEFAULT_REGION=us-east-1
38+
AWS_BUCKET=
39+
40+
PUSHER_APP_ID=
41+
PUSHER_APP_KEY=
42+
PUSHER_APP_SECRET=
43+
PUSHER_APP_CLUSTER=mt1
44+
45+
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
46+
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

.gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* text=auto
2+
*.css linguist-vendored
3+
*.scss linguist-vendored
4+
*.js linguist-vendored
5+
CHANGELOG.md export-ignore

.gitignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/resources/docs
2+
/node_modules
3+
/public/hot
4+
/public/mix-manifest.json
5+
/public/uploads
6+
/public/css
7+
/public/js
8+
/public/storage
9+
/storage/*.key
10+
/vendor
11+
.env
12+
.env.backup
13+
.phpunit.result.cache
14+
Homestead.json
15+
Homestead.yaml
16+
npm-debug.log
17+
yarn-error.log
18+
.php_cs.cache
19+
/.idea

.php_cs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
$finder = \PhpCsFixer\Finder::create()
4+
->in(__DIR__)
5+
->exclude(['bootstrap', 'storage', 'vendor'])
6+
->name('*.php')
7+
->name('_ide_helper')
8+
->notName('*.blade.php')
9+
->ignoreDotFiles(true)
10+
->ignoreVCS(true);
11+
12+
13+
return PhpCsFixer\Config::create()
14+
->setRules([
15+
'@PSR2' => true,
16+
'array_syntax' => ['syntax' => 'short'],
17+
'ordered_imports' => ['sortAlgorithm' => 'length'],
18+
'no_unused_imports' => true,
19+
])
20+
->setFinder($finder);

.styleci.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
php:
2+
preset: laravel
3+
disabled:
4+
- unused_use
5+
finder:
6+
not-name:
7+
- index.php
8+
- server.php
9+
js:
10+
finder:
11+
not-name:
12+
- webpack.mix.js
13+
css: true

CONTRIBUTING.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Contribution Guide
2+
3+
- [Introduction](#introduction)
4+
- [Guidelines](#guidelines)
5+
- [Get Started](#get-started)
6+
- [Setup](#setup)
7+
- [Updating After Remote Code Changes](#update)
8+
9+
<a name="introduction"></a>
10+
## Introduction
11+
12+
Contributions are welcome, and are accepted via pull requests. Please review these guidelines before submitting any pull requests.
13+
14+
<a name="guidelines"></a>
15+
### Guidelines
16+
17+
* Send a coherent commit history, making sure each individual commit in your pull request is meaningful.
18+
* You may need to [rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) to avoid merge conflicts.
19+
20+
<a name="get-started"></a>
21+
## Get Started
22+
23+
Let's get started
24+
25+
<a name="setup"></a>
26+
### Setup
27+
28+
1. Fork the project
29+
2. Clone your fork into the by running the following command *with your username placed into the {username} slot*:
30+
```bash
31+
git clone https://github.com:{username}/pestphp.com-next pest
32+
```
33+
3. CD into the new directory you just created:
34+
```bash
35+
cd pest
36+
```
37+
4. Run the `setup.sh` bin script, which will take all the steps necessary to prepare your local install:
38+
```bash
39+
./bin/setup.sh
40+
```
41+
42+
<a name="update"></a>
43+
### Updating After Remote Code Changes
44+
45+
If you pull down the upstream changes from this repository into your local repository, you'll want to update your Composer and NPM dependencies, as well as update your documentation branches. For convenience, you may run the `bin/update.sh` script to update these things:
46+
47+
```bash
48+
./bin/update.sh
49+
```

README.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<p align="center">
2+
<img title="Laravel Zero" height="100" src="https://raw.githubusercontent.com/laravel-zero/docs/master/images/logo/laravel-zero-readme.png" />
3+
</p>
4+
5+
6+
## Laravel Zero Website
7+
8+
This is the source of the official [Laravel Zero website](https://laravel-zero.com).
9+
10+
## Local Development
11+
12+
If you want to work on this project on your local machine, you may follow the instructions below. These instructions assume you are serving the site using Laravel Valet out of your `~/Sites` directory:
13+
14+
1. Fork this repository
15+
2. Open your terminal and `cd` to your `~/Sites` folder
16+
3. Clone your fork into the `~/Sites/pest` folder, by running the following command *with your username placed into the {username} slot*:
17+
```bash
18+
git clone https://github.com:{username}/laravel-zero.com laravel-zero
19+
```
20+
4. CD into the new directory you just created:
21+
```bash
22+
cd pest
23+
```
24+
5. Run the `setup.sh` bin script, which will take all the steps necessary to prepare your local install:
25+
```bash
26+
./bin/setup.sh
27+
```
28+
29+
### Syncing Upstream Changes Into Your Fork
30+
31+
This [GitHub article](https://help.github.com/en/articles/syncing-a-fork) provides instructions on how to pull the latest changes from this repository into your fork.
32+
33+
### Updating After Remote Code Changes
34+
35+
If you pull down the upstream changes from this repository into your local repository, you'll want to update your Composer and NPM dependencies, as well as update your documentation branches. For convenience, you may run the `bin/update.sh` script to update these things:
36+
37+
```bash
38+
./bin/update.sh
39+
```

app/Console/Kernel.php

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
namespace App\Console;
4+
5+
use Illuminate\Console\Scheduling\Schedule;
6+
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
7+
8+
class Kernel extends ConsoleKernel
9+
{
10+
/**
11+
* The Artisan commands provided by your application.
12+
*
13+
* @var array
14+
*/
15+
protected $commands = [
16+
//
17+
];
18+
19+
/**
20+
* Define the application's command schedule.
21+
*
22+
* @param \Illuminate\Console\Scheduling\Schedule $schedule
23+
* @return void
24+
*/
25+
protected function schedule(Schedule $schedule)
26+
{
27+
// $schedule->command('inspire')->hourly();
28+
}
29+
30+
/**
31+
* Register the commands for the application.
32+
*
33+
* @return void
34+
*/
35+
protected function commands()
36+
{
37+
$this->load(__DIR__.'/Commands');
38+
39+
require base_path('routes/console.php');
40+
}
41+
}

app/Exceptions/Handler.php

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
namespace App\Exceptions;
4+
5+
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
6+
7+
class Handler extends ExceptionHandler
8+
{
9+
/**
10+
* A list of the exception types that are not reported.
11+
*
12+
* @var array
13+
*/
14+
protected $dontReport = [
15+
//
16+
];
17+
18+
/**
19+
* A list of the inputs that are never flashed for validation exceptions.
20+
*
21+
* @var array
22+
*/
23+
protected $dontFlash = [
24+
'password',
25+
'password_confirmation',
26+
];
27+
28+
/**
29+
* Register the exception handling callbacks for the application.
30+
*
31+
* @return void
32+
*/
33+
public function register()
34+
{
35+
//
36+
}
37+
}

app/Http/Controllers/Controller.php

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
use Illuminate\Foundation\Bus\DispatchesJobs;
6+
use Illuminate\Routing\Controller as BaseController;
7+
use Illuminate\Foundation\Validation\ValidatesRequests;
8+
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
9+
10+
class Controller extends BaseController
11+
{
12+
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
13+
}
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
use Illuminate\View\View;
6+
use App\Support\Parsedown;
7+
use App\Support\Documentation;
8+
use Illuminate\Http\RedirectResponse;
9+
use Illuminate\Contracts\View\Factory;
10+
use Spatie\YamlFrontMatter\YamlFrontMatter;
11+
use Illuminate\Contracts\Foundation\Application;
12+
13+
class DocsController extends Controller
14+
{
15+
protected const DEFAULT_PAGE = 'installation';
16+
protected const EXCLUDED = ['readme', 'license'];
17+
18+
/**
19+
* Handle the incoming request.
20+
*
21+
* @param Documentation $docs
22+
* @param string|null $page
23+
* @return Application|Factory|View|RedirectResponse
24+
*/
25+
public function __invoke(Documentation $docs, string $page = null)
26+
{
27+
if ($page === null) {
28+
return redirect()->route('docs', [self::DEFAULT_PAGE]);
29+
}
30+
31+
if (! $docs->exists(config('site.defaultVersion'), $page) || in_array($page, self::EXCLUDED)) {
32+
abort(404);
33+
}
34+
35+
$index = (new Parsedown())->text($docs->getIndex(config('site.defaultVersion')));
36+
37+
$file = $docs->get(config('site.defaultVersion'), $page);
38+
$contents = YamlFrontMatter::parse($file);
39+
$matter = $contents->matter();
40+
$markdown = $contents->body();
41+
42+
$parsedown = new Parsedown();
43+
$body = $parsedown->text($markdown);
44+
45+
46+
return view('docs', compact('body', 'matter', 'markdown', 'page', 'index'));
47+
}
48+
}

0 commit comments

Comments
 (0)