-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
coulterpeterson
committed
Oct 18, 2021
1 parent
eeb6528
commit 5d2b047
Showing
124 changed files
with
20,598 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,40 @@ | ||
# statamic-boilerplate | ||
Growing, up-to-date template that will eventually contain a collection of succinct code examples so that future Statamic sites can get rolling faster. | ||
<p align="center"><img src="https://statamic.com/assets/branding/Statamic-Logo+Wordmark-Rad.svg" width="400" alt="Statamic Logo" /></p> | ||
|
||
Thank you to [studio1902/statamic-peak](https://github.com/studio1902/statamic-peak) for your excellent repo! | ||
## About Statamic 3 | ||
|
||
Statamic 3 is the flat-first, Laravel + Git powered CMS designed for building beautiful, easy to manage websites. | ||
|
||
> **Note:** This repository contains the code for the Statamic application. To contribute to the core package, visit the [Statamic core package repository][cms-repo]. | ||
|
||
## Learning Statamic | ||
|
||
Statamic 3 has extensive [documentation][docs]. We dedicate a significant amount of time and energy every day to improving them, so if something is unclear, feel free to open issues for anything you find confusing or incomplete. We are happy to consider anything you feel will make the docs and CMS better. | ||
|
||
## Support | ||
|
||
We provide official developer support on [Statamic 3 Pro](https://statamic.com/pricing) projects. Community-driven support is available on the [forum](https://statamic.com/forum) and in [Discord][discord]. | ||
|
||
|
||
## Contributing | ||
|
||
Thank you for considering contributing to Statamic! We simply ask that you review the [contribution guide][contribution] before you open issues or send pull requests. | ||
|
||
|
||
## Code of Conduct | ||
|
||
In order to ensure that the Statamic community is welcoming to all and generally a rad place to belong, please review and abide by the [Code of Conduct](https://github.com/statamic/cms/wiki/Code-of-Conduct). | ||
|
||
|
||
## Important Links | ||
|
||
- [Statamic Main Site](https://statamic.com) | ||
- [Statamic 3 Documentation][docs] | ||
- [Statamic 3 Core Package Repo][cms-repo] | ||
- [Statamic 3 Migrator](https://github.com/statamic/migrator) | ||
- [Statamic Discord][discord] | ||
|
||
[docs]: https://statamic.dev/ | ||
[discord]: https://statamic.com/discord | ||
[contribution]: https://github.com/statamic/cms/blob/master/CONTRIBUTING.md | ||
[cms-repo]: https://github.com/statamic/cms |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace App\Console; | ||
|
||
use Illuminate\Console\Scheduling\Schedule; | ||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | ||
|
||
class Kernel extends ConsoleKernel | ||
{ | ||
/** | ||
* The Artisan commands provided by your application. | ||
* | ||
* @var array | ||
*/ | ||
protected $commands = [ | ||
// | ||
]; | ||
|
||
/** | ||
* Define the application's command schedule. | ||
* | ||
* @param \Illuminate\Console\Scheduling\Schedule $schedule | ||
* @return void | ||
*/ | ||
protected function schedule(Schedule $schedule) | ||
{ | ||
// $schedule->command('inspire') | ||
// ->hourly(); | ||
} | ||
|
||
/** | ||
* Register the commands for the application. | ||
* | ||
* @return void | ||
*/ | ||
protected function commands() | ||
{ | ||
$this->load(__DIR__.'/Commands'); | ||
|
||
require base_path('routes/console.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace App\Exceptions; | ||
|
||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | ||
|
||
class Handler extends ExceptionHandler | ||
{ | ||
/** | ||
* A list of the exception types that are not reported. | ||
* | ||
* @var array | ||
*/ | ||
protected $dontReport = [ | ||
// | ||
]; | ||
|
||
/** | ||
* A list of the inputs that are never flashed for validation exceptions. | ||
* | ||
* @var array | ||
*/ | ||
protected $dontFlash = [ | ||
'password', | ||
'password_confirmation', | ||
]; | ||
|
||
/** | ||
* Register the exception handling callbacks for the application. | ||
* | ||
* @return void | ||
*/ | ||
public function register() | ||
{ | ||
// | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; | ||
use Illuminate\Foundation\Bus\DispatchesJobs; | ||
use Illuminate\Foundation\Validation\ValidatesRequests; | ||
use Illuminate\Routing\Controller as BaseController; | ||
|
||
class Controller extends BaseController | ||
{ | ||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
|
||
namespace App\Http; | ||
|
||
use Illuminate\Foundation\Http\Kernel as HttpKernel; | ||
|
||
class Kernel extends HttpKernel | ||
{ | ||
/** | ||
* The application's global HTTP middleware stack. | ||
* | ||
* These middleware are run during every request to your application. | ||
* | ||
* @var array | ||
*/ | ||
protected $middleware = [ | ||
\App\Http\Middleware\TrustProxies::class, | ||
\Fruitcake\Cors\HandleCors::class, | ||
\App\Http\Middleware\PreventRequestsDuringMaintenance::class, | ||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, | ||
\App\Http\Middleware\TrimStrings::class, | ||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, | ||
]; | ||
|
||
/** | ||
* The application's route middleware groups. | ||
* | ||
* @var array | ||
*/ | ||
protected $middlewareGroups = [ | ||
'web' => [ | ||
\App\Http\Middleware\EncryptCookies::class, | ||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, | ||
\Illuminate\Session\Middleware\StartSession::class, | ||
// \Illuminate\Session\Middleware\AuthenticateSession::class, | ||
\Illuminate\View\Middleware\ShareErrorsFromSession::class, | ||
\App\Http\Middleware\VerifyCsrfToken::class, | ||
\Illuminate\Routing\Middleware\SubstituteBindings::class, | ||
], | ||
|
||
'api' => [ | ||
'throttle:api', | ||
\Illuminate\Routing\Middleware\SubstituteBindings::class, | ||
], | ||
]; | ||
|
||
/** | ||
* The application's route middleware. | ||
* | ||
* These middleware may be assigned to groups or used individually. | ||
* | ||
* @var array | ||
*/ | ||
protected $routeMiddleware = [ | ||
'auth' => \App\Http\Middleware\Authenticate::class, | ||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, | ||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, | ||
'can' => \Illuminate\Auth\Middleware\Authorize::class, | ||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, | ||
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, | ||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, | ||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, | ||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, | ||
]; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace App\Http\Middleware; | ||
|
||
use Illuminate\Auth\Middleware\Authenticate as Middleware; | ||
|
||
class Authenticate extends Middleware | ||
{ | ||
/** | ||
* Get the path the user should be redirected to when they are not authenticated. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return string|null | ||
*/ | ||
protected function redirectTo($request) | ||
{ | ||
if (! $request->expectsJson()) { | ||
return route('login'); | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace App\Http\Middleware; | ||
|
||
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware; | ||
|
||
class EncryptCookies extends Middleware | ||
{ | ||
/** | ||
* The names of the cookies that should not be encrypted. | ||
* | ||
* @var array | ||
*/ | ||
protected $except = [ | ||
// | ||
]; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace App\Http\Middleware; | ||
|
||
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware; | ||
|
||
class PreventRequestsDuringMaintenance extends Middleware | ||
{ | ||
/** | ||
* The URIs that should be reachable while maintenance mode is enabled. | ||
* | ||
* @var array | ||
*/ | ||
protected $except = [ | ||
// | ||
]; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace App\Http\Middleware; | ||
|
||
use App\Providers\RouteServiceProvider; | ||
use Closure; | ||
use Illuminate\Support\Facades\Auth; | ||
|
||
class RedirectIfAuthenticated | ||
{ | ||
/** | ||
* Handle an incoming request. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @param \Closure $next | ||
* @param string|null ...$guards | ||
* @return mixed | ||
*/ | ||
public function handle($request, Closure $next, ...$guards) | ||
{ | ||
$guards = empty($guards) ? [null] : $guards; | ||
|
||
foreach ($guards as $guard) { | ||
if (Auth::guard($guard)->check()) { | ||
return redirect(RouteServiceProvider::HOME); | ||
} | ||
} | ||
|
||
return $next($request); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace App\Http\Middleware; | ||
|
||
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware; | ||
|
||
class TrimStrings extends Middleware | ||
{ | ||
/** | ||
* The names of the attributes that should not be trimmed. | ||
* | ||
* @var array | ||
*/ | ||
protected $except = [ | ||
'password', | ||
'password_confirmation', | ||
]; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace App\Http\Middleware; | ||
|
||
use Illuminate\Http\Request; | ||
use Fideloper\Proxy\TrustProxies as Middleware; | ||
|
||
class TrustProxies extends Middleware | ||
{ | ||
/** | ||
* The trusted proxies for this application. | ||
* | ||
* @var array | ||
*/ | ||
protected $proxies; | ||
|
||
/** | ||
* The headers that should be used to detect proxies. | ||
* | ||
* @var string | ||
*/ | ||
protected $headers = Request::HEADER_X_FORWARDED_ALL; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace App\Http\Middleware; | ||
|
||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; | ||
|
||
class VerifyCsrfToken extends Middleware | ||
{ | ||
/** | ||
* The URIs that should be excluded from CSRF verification. | ||
* | ||
* @var array | ||
*/ | ||
protected $except = [ | ||
// | ||
]; | ||
} |
Oops, something went wrong.