Set up a fresh Statamic site

This commit is contained in:
2025-11-23 13:41:35 +01:00
commit 618cc0f799
104 changed files with 15130 additions and 0 deletions

18
.editorconfig Normal file
View File

@ -0,0 +1,18 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
[compose.yaml]
indent_size = 4

76
.env.example Normal file
View File

@ -0,0 +1,76 @@
APP_NAME=Statamic
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=file
# PHP_CLI_SERVER_WORKERS=4
BCRYPT_ROUNDS=12
LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
# DB_USERNAME=root
# DB_PASSWORD=
SESSION_DRIVER=file
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null
BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
CACHE_STORE=file
#CACHE_PREFIX=
MEMCACHED_HOST=127.0.0.1
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=log
MAIL_SCHEME=null
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
VITE_APP_NAME="${APP_NAME}"
STATAMIC_LICENSE_KEY=
STATAMIC_PRO_ENABLED=false
STATAMIC_STACHE_WATCHER=auto
STATAMIC_STATIC_CACHING_STRATEGY=null
STATAMIC_REVISIONS_ENABLED=false
STATAMIC_GRAPHQL_ENABLED=false
STATAMIC_API_ENABLED=false
STATAMIC_GIT_ENABLED=false
DEBUGBAR_ENABLED=false

11
.gitattributes vendored Normal file
View File

@ -0,0 +1,11 @@
* text=auto eol=lf
*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php
/.github export-ignore
CHANGELOG.md export-ignore
.styleci.yml export-ignore

26
.gitignore vendored Normal file
View File

@ -0,0 +1,26 @@
*.log
.DS_Store
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
/.fleet
/.idea
/.nova
/.phpunit.cache
/.vscode
/.zed
/auth.json
/node_modules
/public/build
/public/hot
/public/static
/public/storage
/public/vendor/statamic
/storage/*.key
/storage/pail
/vendor
Homestead.json
Homestead.yaml
Thumbs.db

43
README.md Normal file
View File

@ -0,0 +1,43 @@
<p align="center"><img src="https://statamic.com/assets/branding/Statamic-Logo+Wordmark-Rad.svg" width="400" alt="Statamic Logo" /></p>
## About Statamic
Statamic is the flat-first, Laravel + Git powered CMS designed for building beautiful, easy to manage websites.
> [!NOTE]
> This repository contains the code for a fresh Statamic project that is installed via the Statamic CLI tool.
>
> The code for the Statamic Composer package itself can be found at the [Statamic core package repository][cms-repo].
## Learning Statamic
Statamic 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 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 Documentation][docs]
- [Statamic Core Package Repo][cms-repo]
- [Statamic 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

View File

@ -0,0 +1,8 @@
<?php
namespace App\Http\Controllers;
abstract class Controller
{
//
}

48
app/Models/User.php Normal file
View File

@ -0,0 +1,48 @@
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
/** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var list<string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Statamic\Statamic;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
// Statamic::vite('app', [
// 'resources/js/cp.js',
// 'resources/css/cp.css',
// ]);
}
}

18
artisan Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env php
<?php
use Illuminate\Foundation\Application;
use Symfony\Component\Console\Input\ArgvInput;
define('LARAVEL_START', microtime(true));
// Register the Composer autoloader...
require __DIR__.'/vendor/autoload.php';
// Bootstrap Laravel and handle the command...
/** @var Application $app */
$app = require_once __DIR__.'/bootstrap/app.php';
$status = $app->handleCommand(new ArgvInput);
exit($status);

18
bootstrap/app.php Normal file
View File

@ -0,0 +1,18 @@
<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware): void {
//
})
->withExceptions(function (Exceptions $exceptions): void {
//
})->create();

2
bootstrap/cache/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

5
bootstrap/providers.php Normal file
View File

@ -0,0 +1,5 @@
<?php
return [
App\Providers\AppServiceProvider::class,
];

98
composer.json Normal file
View File

@ -0,0 +1,98 @@
{
"$schema": "https://getcomposer.org/schema.json",
"name": "statamic/statamic",
"type": "project",
"description": "Statamic",
"keywords": [
"statamic",
"cms",
"flat file",
"laravel"
],
"require": {
"php": "^8.2",
"laravel/framework": "^12.0",
"laravel/tinker": "^2.10.1",
"statamic/cms": "^5.0",
"statamic/ssg": "^3.1"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.8.1",
"fakerphp/faker": "^1.23",
"laravel/pail": "^1.2.2",
"laravel/pint": "^1.24",
"laravel/sail": "^1.41",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.6",
"phpunit/phpunit": "^11.5.3",
"spatie/laravel-ignition": "^2.9.1"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"setup": [
"composer install",
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
"@php artisan key:generate",
"@php artisan migrate --force",
"npm install",
"npm run build"
],
"dev": [
"Composer\\Config::disableProcessTimeout",
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite --kill-others"
],
"test": [
"@php artisan config:clear --ansi",
"@php artisan test"
],
"pre-update-cmd": [
"Statamic\\Console\\Composer\\Scripts::preUpdateCmd"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi",
"@php artisan statamic:install --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\""
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"pre-package-uninstall": [
"Illuminate\\Foundation\\ComposerScripts::prePackageUninstall"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true,
"pixelfear/composer-dist-plugin": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}

10729
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

126
config/app.php Normal file
View File

@ -0,0 +1,126 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application, which will be used when the
| framework needs to place the application's name in a notification or
| other UI elements where an application name needs to be displayed.
|
*/
'name' => env('APP_NAME', 'Statamic'),
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => (bool) env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| the application so that it's available within Artisan commands.
|
*/
'url' => env('APP_URL', 'http://localhost'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. The timezone
| is set to "UTC" by default as it is suitable for most use cases.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by Laravel's translation / localization methods. This option can be
| set to any locale for which you plan to have translation strings.
|
*/
'locale' => env('APP_LOCALE', 'en'),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is utilized by Laravel's encryption services and should be set
| to a random, 32 character string to ensure that all encrypted values
| are secure. You should do this prior to deploying the application.
|
*/
'cipher' => 'AES-256-CBC',
'key' => env('APP_KEY'),
'previous_keys' => [
...array_filter(
explode(',', (string) env('APP_PREVIOUS_KEYS', ''))
),
],
/*
|--------------------------------------------------------------------------
| Maintenance Mode Driver
|--------------------------------------------------------------------------
|
| These configuration options determine the driver used to determine and
| manage Laravel's "maintenance mode" status. The "cache" driver will
| allow maintenance mode to be controlled across multiple machines.
|
| Supported drivers: "file", "cache"
|
*/
'maintenance' => [
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'file'),
],
];

126
config/auth.php Normal file
View File

@ -0,0 +1,126 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option defines the default authentication "guard" and password
| reset "broker" for your application. You may change these values
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => env('AUTH_GUARD', 'web'),
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| which utilizes session storage plus the Eloquent user provider.
|
| All authentication guards have a user provider, which defines how the
| users are actually retrieved out of your database or other storage
| system used by the application. Typically, Eloquent is utilized.
|
| Supported: "session"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication guards have a user provider, which defines how the
| users are actually retrieved out of your database or other storage
| system used by the application. Typically, Eloquent is utilized.
|
| If you have multiple user tables or models you may configure multiple
| providers to represent the model / table. These providers may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "statamic", "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'statamic',
],
// 'users' => [
// 'driver' => 'eloquent',
// 'model' => env('AUTH_MODEL', App\Models\User::class),
// ],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| These configuration options specify the behavior of Laravel's password
| reset functionality, including the table utilized for token storage
| and the user provider that is invoked to actually retrieve users.
|
| The expiry time is the number of minutes that each reset token will be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
| The throttle setting is the number of seconds a user must wait before
| generating more password reset tokens. This prevents the user from
| quickly generating a very large amount of password reset tokens.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
'expire' => 60,
'throttle' => 60,
],
'activations' => [
'provider' => 'users',
'table' => env('AUTH_ACTIVATION_TOKEN_TABLE', 'password_activation_tokens'),
'expire' => 4320,
'throttle' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the number of seconds before a password confirmation
| window expires and users are asked to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
];

122
config/cache.php Normal file
View File

@ -0,0 +1,122 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache store that will be used by the
| framework. This connection is utilized if another isn't explicitly
| specified when running a cache operation inside the application.
|
*/
'default' => env('CACHE_STORE', 'file'),
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
| Supported drivers: "array", "database", "file", "memcached",
| "redis", "dynamodb", "octane",
| "failover", "null"
|
*/
'stores' => [
'array' => [
'driver' => 'array',
'serialize' => false,
],
'database' => [
'driver' => 'database',
'connection' => env('DB_CACHE_CONNECTION', null),
'table' => env('DB_CACHE_TABLE', 'cache'),
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
'lock_table' => env('DB_CACHE_LOCK_TABLE'),
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'lock_path' => storage_path('framework/cache/data'),
],
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
],
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],
'octane' => [
'driver' => 'octane',
],
'failover' => [
'driver' => 'failover',
'stores' => [
'database',
'array',
],
],
'static_cache' => [
'driver' => 'file',
'path' => storage_path('statamic/static-urls-cache'),
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
| stores, there might be other applications using the same cache. For
| that reason, you may prefix every cache key to avoid collisions.
|
*/
'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-cache-'),
];

183
config/database.php Normal file
View File

@ -0,0 +1,183 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for database operations. This is
| the connection which will be utilized unless another connection
| is explicitly specified when you execute a query / statement.
|
*/
'default' => env('DB_CONNECTION', 'sqlite'),
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Below are all of the database connections defined for your application.
| An example configuration is provided for each database system which
| is supported by Laravel. You're free to add / remove connections.
|
*/
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DB_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
'busy_timeout' => null,
'journal_mode' => null,
'synchronous' => null,
'transaction_mode' => 'DEFERRED',
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'mariadb' => [
'driver' => 'mariadb',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'prefix' => '',
'prefix_indexes' => true,
'search_path' => 'public',
'sslmode' => 'prefer',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DB_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'prefix' => '',
'prefix_indexes' => true,
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
],
],
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run on the database.
|
*/
'migrations' => [
'table' => 'migrations',
'update_date_on_publish' => true,
],
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer body of commands than a typical key-value system
| such as Memcached. You may define your connection settings here.
|
*/
'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-database-'),
'persistent' => env('REDIS_PERSISTENT', false),
],
'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
'max_retries' => env('REDIS_MAX_RETRIES', 3),
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
'max_retries' => env('REDIS_MAX_RETRIES', 3),
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
],
],
];

90
config/filesystems.php Normal file
View File

@ -0,0 +1,90 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application for file storage.
|
*/
'default' => env('FILESYSTEM_DISK', 'local'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Below you may configure as many filesystem disks as necessary, and you
| may even configure multiple disks for the same driver. Examples for
| most supported storage drivers are configured here for reference.
|
| Supported drivers: "local", "ftp", "sftp", "s3"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app/private'),
'serve' => true,
'throw' => false,
'report' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
'throw' => false,
'report' => false,
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
'report' => false,
// 'visibility' => 'public', // https://statamic.dev/assets#container-visibility
],
'assets' => [
'driver' => 'local',
'root' => public_path('assets'),
'url' => '/assets',
'visibility' => 'public',
'throw' => false,
'report' => false,
],
],
/*
|--------------------------------------------------------------------------
| Symbolic Links
|--------------------------------------------------------------------------
|
| Here you may configure the symbolic links that will be created when the
| `storage:link` Artisan command is executed. The array keys should be
| the locations of the links and the values should be their targets.
|
*/
'links' => [
public_path('storage') => storage_path('app/public'),
],
];

132
config/logging.php Normal file
View File

@ -0,0 +1,132 @@
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Processor\PsrLogMessageProcessor;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that is utilized to write
| messages to your logs. The value provided here should match one of
| the channels present in the list of "channels" configured below.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Deprecations Log Channel
|--------------------------------------------------------------------------
|
| This option controls the log channel that should be used to log warnings
| regarding deprecated PHP and library features. This allows you to get
| your application ready for upcoming major versions of dependencies.
|
*/
'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
],
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Laravel
| utilizes the Monolog PHP logging library, which includes a variety
| of powerful log handlers and formatters that you're free to use.
|
| Available drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog", "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => explode(',', (string) env('LOG_STACK', 'single')),
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => env('LOG_DAILY_DAYS', 14),
'replace_placeholders' => true,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
'level' => env('LOG_LEVEL', 'critical'),
'replace_placeholders' => true,
],
'papertrail' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
],
'processors' => [PsrLogMessageProcessor::class],
],
'stderr' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => StreamHandler::class,
'handler_with' => [
'stream' => 'php://stderr',
],
'formatter' => env('LOG_STDERR_FORMATTER'),
'processors' => [PsrLogMessageProcessor::class],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
'replace_placeholders' => true,
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];

118
config/mail.php Normal file
View File

@ -0,0 +1,118 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Mailer
|--------------------------------------------------------------------------
|
| This option controls the default mailer that is used to send all email
| messages unless another mailer is explicitly specified when sending
| the message. All additional mailers can be configured within the
| "mailers" array. Examples of each type of mailer are provided.
|
*/
'default' => env('MAIL_MAILER', 'log'),
/*
|--------------------------------------------------------------------------
| Mailer Configurations
|--------------------------------------------------------------------------
|
| Here you may configure all of the mailers used by your application plus
| their respective settings. Several examples have been configured for
| you and you are free to add your own as your application requires.
|
| Laravel supports a variety of mail "transport" drivers that can be used
| when delivering an email. You may specify which one you're using for
| your mailers below. You may also add additional mailers if needed.
|
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
| "postmark", "resend", "log", "array",
| "failover", "roundrobin"
|
*/
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'scheme' => env('MAIL_SCHEME'),
'url' => env('MAIL_URL'),
'host' => env('MAIL_HOST', '127.0.0.1'),
'port' => env('MAIL_PORT', 2525),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url((string) env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
],
'ses' => [
'transport' => 'ses',
],
'postmark' => [
'transport' => 'postmark',
// 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'),
// 'client' => [
// 'timeout' => 5,
// ],
],
'resend' => [
'transport' => 'resend',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
'failover' => [
'transport' => 'failover',
'mailers' => [
'smtp',
'log',
],
'retry_after' => 60,
],
'roundrobin' => [
'transport' => 'roundrobin',
'mailers' => [
'ses',
'postmark',
],
'retry_after' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all emails sent by your application to be sent from
| the same address. Here you may specify a name and address that is
| used globally for all emails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
];

129
config/queue.php Normal file
View File

@ -0,0 +1,129 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue supports a variety of backends via a single, unified
| API, giving you convenient access to each backend using identical
| syntax for each. The default queue connection is defined below.
|
*/
'default' => env('QUEUE_CONNECTION', 'sync'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection options for every queue backend
| used by your application. An example configuration is provided for
| each backend supported by Laravel. You're also free to add more.
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis",
| "deferred", "background", "failover", "null"
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'connection' => env('DB_QUEUE_CONNECTION'),
'table' => env('DB_QUEUE_TABLE', 'jobs'),
'queue' => env('DB_QUEUE', 'default'),
'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
'after_commit' => false,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
'queue' => env('BEANSTALKD_QUEUE', 'default'),
'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
'block_for' => 0,
'after_commit' => false,
],
'sqs' => [
'driver' => 'sqs',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'default'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'after_commit' => false,
],
'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90),
'block_for' => null,
'after_commit' => false,
],
'deferred' => [
'driver' => 'deferred',
],
'background' => [
'driver' => 'background',
],
'failover' => [
'driver' => 'failover',
'connections' => [
'database',
'deferred',
],
],
],
/*
|--------------------------------------------------------------------------
| Job Batching
|--------------------------------------------------------------------------
|
| The following options configure the database and table that store job
| batching information. These options can be updated to any database
| connection and table which has been defined by your application.
|
*/
'batching' => [
'database' => env('DB_CONNECTION', 'sqlite'),
'table' => 'job_batches',
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control how and where failed jobs are stored. Laravel ships with
| support for storing failed jobs in a simple file or in a database.
|
| Supported drivers: "database-uuids", "dynamodb", "file", "null"
|
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'sqlite'),
'table' => 'failed_jobs',
],
];

38
config/services.php Normal file
View File

@ -0,0 +1,38 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Mailgun, Postmark, AWS and more. This file provides the de facto
| location for this type of information, allowing packages to have
| a conventional file to locate the various service credentials.
|
*/
'postmark' => [
'key' => env('POSTMARK_API_KEY'),
],
'resend' => [
'key' => env('RESEND_API_KEY'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'slack' => [
'notifications' => [
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
],
],
];

217
config/session.php Normal file
View File

@ -0,0 +1,217 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option determines the default session driver that is utilized for
| incoming requests. Laravel supports a variety of storage options to
| persist session data. Database storage is a great default choice.
|
| Supported: "file", "cookie", "database", "memcached",
| "redis", "dynamodb", "array"
|
*/
'driver' => env('SESSION_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle before it expires. If you want them
| to expire immediately when the browser is closed then you may
| indicate that via the expire_on_close configuration option.
|
*/
'lifetime' => (int) env('SESSION_LIFETIME', 120),
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it's stored. All encryption is performed
| automatically by Laravel and you may use the session like normal.
|
*/
'encrypt' => env('SESSION_ENCRYPT', false),
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When utilizing the "file" session driver, the session files are placed
| on disk. The default storage location is defined here; however, you
| are free to provide another location where they should be stored.
|
*/
'files' => storage_path('framework/sessions'),
/*
|--------------------------------------------------------------------------
| Session Database Connection
|--------------------------------------------------------------------------
|
| When using the "database" or "redis" session drivers, you may specify a
| connection that should be used to manage these sessions. This should
| correspond to a connection in your database configuration options.
|
*/
'connection' => env('SESSION_CONNECTION'),
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
| When using the "database" session driver, you may specify the table to
| be used to store sessions. Of course, a sensible default is defined
| for you; however, you're welcome to change this to another table.
|
*/
'table' => env('SESSION_TABLE', 'sessions'),
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| When using one of the framework's cache driven session backends, you may
| define the cache store which should be used to store the session data
| between requests. This must match one of your defined cache stores.
|
| Affects: "dynamodb", "memcached", "redis"
|
*/
'store' => env('SESSION_STORE'),
/*
|--------------------------------------------------------------------------
| Session Sweeping Lottery
|--------------------------------------------------------------------------
|
| Some session drivers must manually sweep their storage location to get
| rid of old sessions from storage. Here are the chances that it will
| happen on a given request. By default, the odds are 2 out of 100.
|
*/
'lottery' => [2, 100],
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| Here you may change the name of the session cookie that is created by
| the framework. Typically, you should not need to change this value
| since doing so does not grant a meaningful security improvement.
|
*/
'cookie' => env(
'SESSION_COOKIE',
Str::slug((string) env('APP_NAME', 'laravel')).'-session'
),
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The session cookie path determines the path for which the cookie will
| be regarded as available. Typically, this will be the root path of
| your application, but you're free to change this when necessary.
|
*/
'path' => env('SESSION_PATH', '/'),
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| This value determines the domain and subdomains the session cookie is
| available to. By default, the cookie will be available to the root
| domain and all subdomains. Typically, this shouldn't be changed.
|
*/
'domain' => env('SESSION_DOMAIN'),
/*
|--------------------------------------------------------------------------
| HTTPS Only Cookies
|--------------------------------------------------------------------------
|
| By setting this option to true, session cookies will only be sent back
| to the server if the browser has a HTTPS connection. This will keep
| the cookie from being sent to you when it can't be done securely.
|
*/
'secure' => env('SESSION_SECURE_COOKIE'),
/*
|--------------------------------------------------------------------------
| HTTP Access Only
|--------------------------------------------------------------------------
|
| Setting this value to true will prevent JavaScript from accessing the
| value of the cookie and the cookie will only be accessible through
| the HTTP protocol. It's unlikely you should disable this option.
|
*/
'http_only' => env('SESSION_HTTP_ONLY', true),
/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| will set this value to "lax" to permit secure cross-site requests.
|
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
|
| Supported: "lax", "strict", "none", null
|
*/
'same_site' => env('SESSION_SAME_SITE', 'lax'),
/*
|--------------------------------------------------------------------------
| Partitioned Cookies
|--------------------------------------------------------------------------
|
| Setting this value to true will tie the cookie to the top-level site for
| a cross-site context. Partitioned cookies are accepted by the browser
| when flagged "secure" and the Same-Site attribute is set to "none".
|
*/
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
];

View File

@ -0,0 +1,60 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Debugbar
|--------------------------------------------------------------------------
|
| Here you may specify whether the Antlers profiler should be added
| to the Laravel Debugbar. This is incredibly useful for finding
| performance impacts within any of your Antlers templates.
|
*/
'debugbar' => env('STATAMIC_ANTLERS_DEBUGBAR', true),
/*
|--------------------------------------------------------------------------
| Guarded Variables
|--------------------------------------------------------------------------
|
| Any variable pattern that appears in this list will not be allowed
| in any Antlers template, including any user-supplied values.
|
*/
'guardedVariables' => [
'config.app.key',
],
/*
|--------------------------------------------------------------------------
| Guarded Tags
|--------------------------------------------------------------------------
|
| Any tag pattern that appears in this list will not be allowed
| in any Antlers template, including any user-supplied values.
|
*/
'guardedTags' => [
],
/*
|--------------------------------------------------------------------------
| Guarded Modifiers
|--------------------------------------------------------------------------
|
| Any modifier pattern that appears in this list will not be allowed
| in any Antlers template, including any user-supplied values.
|
*/
'guardedModifiers' => [
],
];

87
config/statamic/api.php Normal file
View File

@ -0,0 +1,87 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| API
|--------------------------------------------------------------------------
|
| Whether the API should be enabled, and through what route. You
| can enable or disable the whole API, and expose individual
| resources per environment, depending on your site needs.
|
| https://statamic.dev/content-api#enable-the-api
|
*/
'enabled' => env('STATAMIC_API_ENABLED', false),
'resources' => [
'collections' => false,
'navs' => false,
'taxonomies' => false,
'assets' => false,
'globals' => false,
'forms' => false,
'users' => false,
],
'route' => env('STATAMIC_API_ROUTE', 'api'),
/*
|--------------------------------------------------------------------------
| Middleware & Authentication
|--------------------------------------------------------------------------
|
| Define the middleware / middleware group that will be applied to the
| API route group. If you want to externally expose this API, here
| you can configure a middleware based authentication layer.
|
*/
'middleware' => env('STATAMIC_API_MIDDLEWARE', 'api'),
/*
|--------------------------------------------------------------------------
| Pagination
|--------------------------------------------------------------------------
|
| The numbers of items to show on each paginated page.
|
*/
'pagination_size' => 50,
/*
|--------------------------------------------------------------------------
| Caching
|--------------------------------------------------------------------------
|
| By default, Statamic will cache each endpoint until the specified
| expiry, or until content is changed. See the documentation for
| more details on how to customize your cache implementation.
|
| https://statamic.dev/content-api#caching
|
*/
'cache' => [
'expiry' => 60,
],
/*
|--------------------------------------------------------------------------
| Exclude Keys
|--------------------------------------------------------------------------
|
| Here you may provide an array of keys to be excluded from API responses.
| For example, you may want to hide things like edit_url, api_url, etc.
|
*/
'excluded_keys' => [
//
],
];

238
config/statamic/assets.php Normal file
View File

@ -0,0 +1,238 @@
<?php
return [
'image_manipulation' => [
/*
|--------------------------------------------------------------------------
| Route Prefix
|--------------------------------------------------------------------------
|
| The route prefix for serving HTTP based manipulated images through Glide.
| If using the cached option, this should be the URL of the cached path.
|
*/
'route' => 'img',
/*
|--------------------------------------------------------------------------
| Require Glide security token
|--------------------------------------------------------------------------
|
| With this option enabled, you are protecting your website from mass image
| resize attacks. You will need to generate tokens using the Glide tag
| but may want to disable this while in development to tinker.
|
*/
'secure' => true,
/*
|--------------------------------------------------------------------------
| Image Manipulation Driver
|--------------------------------------------------------------------------
|
| The driver that will be used under the hood for image manipulation.
| Supported: "gd" or "imagick" (if installed on your server)
|
*/
'driver' => 'gd',
/*
|--------------------------------------------------------------------------
| Additional Image Extensions
|--------------------------------------------------------------------------
|
| Define any additional image file extensions you would like Statamic to
| process. You should ensure that both your server and the selected
| image manipulation driver properly supports these extensions.
|
*/
'additional_extensions' => [
// 'heic',
],
/*
|--------------------------------------------------------------------------
| Save Cached Images
|--------------------------------------------------------------------------
|
| Enabling this will make Glide save publicly accessible images. It will
| increase performance at the cost of the dynamic nature of HTTP based
| image manipulation. You will need to invalidate images manually.
|
*/
'cache' => false,
'cache_path' => public_path('img'),
/*
|--------------------------------------------------------------------------
| Image Manipulation Defaults
|--------------------------------------------------------------------------
|
| You may define global defaults for all manipulation parameters, such as
| quality, format, and sharpness. These can and will be overwritten
| on the tag parameter level as well as the preset level.
|
*/
'defaults' => [
// 'quality' => 50,
],
/*
|--------------------------------------------------------------------------
| Image Manipulation Presets
|--------------------------------------------------------------------------
|
| Rather than specifying your manipulation params in your templates with
| the glide tag, you may define them here and reference their handles.
| They may also be automatically generated when you upload assets.
| Containers can be configured to warm these caches on upload.
|
*/
'presets' => [
// 'small' => ['w' => 200, 'h' => 200, 'q' => 75, 'fit' => 'crop'],
],
/*
|--------------------------------------------------------------------------
| Generate Image Manipulation Presets on Upload
|--------------------------------------------------------------------------
|
| By default, presets will be automatically generated on upload, ensuring
| the cached images are available when they are first used. You may opt
| out of this behavior here and have the presets generated on demand.
|
*/
'generate_presets_on_upload' => true,
],
/*
|--------------------------------------------------------------------------
| Auto-Crop Assets
|--------------------------------------------------------------------------
|
| Enabling this will make Glide automatically crop assets at their focal
| point (which is the center if no focal point is defined). Otherwise,
| you will need to manually add any crop related parameters.
|
*/
'auto_crop' => true,
/*
|--------------------------------------------------------------------------
| Control Panel Thumbnail Restrictions
|--------------------------------------------------------------------------
|
| Thumbnails will not be generated for any assets any larger (in either
| axis) than the values listed below. This helps prevent memory usage
| issues out of the box. You may increase or decrease as necessary.
|
*/
'thumbnails' => [
'max_width' => 10000,
'max_height' => 10000,
],
/*
|--------------------------------------------------------------------------
| File Previews with Google Docs
|--------------------------------------------------------------------------
|
| Filetypes that cannot be rendered with HTML5 can opt into the Google Docs
| Viewer. Google will get temporary access to these files so keep that in
| mind for any privacy implications: https://policies.google.com/privacy
|
*/
'google_docs_viewer' => false,
/*
|--------------------------------------------------------------------------
| Cache Metadata
|--------------------------------------------------------------------------
|
| Asset metadata (filesize, dimensions, custom data, etc) will get cached
| to optimize performance, so that it will not need to be constantly
| re-evaluated from disk. You may disable this option if you are
| planning to continually modify the same asset repeatedly.
|
*/
'cache_meta' => true,
/*
|--------------------------------------------------------------------------
| Focal Point Editor
|--------------------------------------------------------------------------
|
| When editing images in the Control Panel, there is an option to choose
| a focal point. When working with third-party image providers such as
| Cloudinary it can be useful to disable Statamic's built-in editor.
|
*/
'focal_point_editor' => true,
/*
|--------------------------------------------------------------------------
| Enforce Lowercase Filenames
|--------------------------------------------------------------------------
|
| Control whether asset filenames will be converted to lowercase when
| uploading and renaming. This can help you avoid file conflicts
| when working in case-insensitive filesystem environments.
|
*/
'lowercase' => true,
/*
|--------------------------------------------------------------------------
| Additional Uploadable Extensions
|--------------------------------------------------------------------------
|
| Statamic will only allow uploads of certain approved file extensions.
| If you need to allow more file extensions, you may add them here.
|
*/
'additional_uploadable_extensions' => [],
/*
|--------------------------------------------------------------------------
| SVG Sanitization
|--------------------------------------------------------------------------
|
| Statamic will automatically sanitize SVG files when uploaded to avoid
| potential security issues. However, if you have a valid reason for
| disabling this, and you trust your users, you may do so here.
|
*/
'svg_sanitization_on_upload' => true,
/*
|--------------------------------------------------------------------------
| Use V6 Permissions
|--------------------------------------------------------------------------
|
| This allows you to opt in to the asset permissions that will become the
| default behavior in Statamic 6. This will be removed in Statamic 6.
|
*/
'v6_permissions' => false,
];

View File

@ -0,0 +1,36 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Enable autosave
|--------------------------------------------------------------------------
|
| THIS IS A EXPERIMENTAL FEATURE. Things may go wrong.
|
| Set to true to enable autosave. You must also enable autosave
| manually in every collection in order for it to work.
|
| For example, inside `content/collections/pages.yaml`, add
| `autosave: 5000` for a 5s interval or `autosave: true`
| to use the default interval as defined below.
|
*/
'enabled' => false,
/*
|--------------------------------------------------------------------------
| Default autosave interval
|--------------------------------------------------------------------------
|
| The default value may be set here and will apply to all collections.
| However, it is also possible to manually adjust the value in the
| each collection's config file. By default, this is set to 5s.
|
*/
'interval' => 5000,
];

160
config/statamic/cp.php Normal file
View File

@ -0,0 +1,160 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Control Panel
|--------------------------------------------------------------------------
|
| Whether the Control Panel should be enabled, and through what route.
|
*/
'enabled' => env('CP_ENABLED', true),
'route' => env('CP_ROUTE', 'cp'),
/*
|--------------------------------------------------------------------------
| Authentication
|--------------------------------------------------------------------------
|
| Whether the Control Panel's authentication pages should be enabled,
| and where users should be redirected in order to authenticate.
|
*/
'auth' => [
'enabled' => true,
'redirect_to' => null,
],
/*
|--------------------------------------------------------------------------
| Start Page
|--------------------------------------------------------------------------
|
| When a user logs into the Control Panel, they will be taken here.
| For example: "dashboard", "collections/pages", etc.
|
*/
'start_page' => 'dashboard',
/*
|--------------------------------------------------------------------------
| Dashboard Widgets
|--------------------------------------------------------------------------
|
| Here you may define any number of dashboard widgets. You're free to
| use the same widget multiple times in different configurations.
|
*/
'widgets' => [
'getting_started',
],
/*
|--------------------------------------------------------------------------
| Date Format
|--------------------------------------------------------------------------
|
| When a date is encountered throughout the Control Panel, it will be
| rendered in the following format unless overridden in specific
| fields, and so on. Any PHP date variables are permitted.
|
| This takes precedence over the date_format in system.php.
|
| https://www.php.net/manual/en/function.date.php
|
*/
'date_format' => 'Y-m-d',
/*
|--------------------------------------------------------------------------
| Pagination
|--------------------------------------------------------------------------
|
| Here you may define the default pagination size as well as the options
| the user can select on any paginated listing in the Control Panel.
|
*/
'pagination_size' => 50,
'pagination_size_options' => [10, 25, 50, 100, 500],
/*
|--------------------------------------------------------------------------
| Links to Documentation
|--------------------------------------------------------------------------
|
| Show contextual links to documentation throughout the Control Panel.
|
*/
'link_to_docs' => env('STATAMIC_LINK_TO_DOCS', true),
/*
|--------------------------------------------------------------------------
| Support Link
|--------------------------------------------------------------------------
|
| Set the location of the support link in the "Useful Links" header
| dropdown. Use 'false' to remove it entirely.
|
*/
'support_url' => env('STATAMIC_SUPPORT_URL', 'https://statamic.com/support'),
/*
|--------------------------------------------------------------------------
| Theme
|--------------------------------------------------------------------------
|
| Optionally spice up the login and other outside-the-control-panel
| screens. You may choose between "rad" or "business" themes.
|
*/
'theme' => env('STATAMIC_THEME', 'rad'),
/*
|--------------------------------------------------------------------------
| White Labeling
|--------------------------------------------------------------------------
|
| When in Pro Mode you may replace the Statamic name, logo, favicon,
| and add your own CSS to the control panel to match your
| company or client's brand.
|
*/
'custom_cms_name' => env('STATAMIC_CUSTOM_CMS_NAME', 'Statamic'),
'custom_logo_url' => env('STATAMIC_CUSTOM_LOGO_URL', null),
'custom_dark_logo_url' => env('STATAMIC_CUSTOM_DARK_LOGO_URL', null),
'custom_logo_text' => env('STATAMIC_CUSTOM_LOGO_TEXT', null),
'custom_favicon_url' => env('STATAMIC_CUSTOM_FAVICON_URL', null),
'custom_css_url' => env('STATAMIC_CUSTOM_CSS_URL', null),
/*
|--------------------------------------------------------------------------
| Thumbnails
|--------------------------------------------------------------------------
|
| Here you may define additional CP asset thumbnail presets.
|
*/
'thumbnail_presets' => [
// 'medium' => 800,
],
];

View File

@ -0,0 +1,11 @@
<?php
return [
'pro' => env('STATAMIC_PRO_ENABLED', false),
'addons' => [
//
],
];

57
config/statamic/forms.php Normal file
View File

@ -0,0 +1,57 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Forms Path
|--------------------------------------------------------------------------
|
| Where your form YAML files are stored.
|
*/
'forms' => resource_path('forms'),
/*
|--------------------------------------------------------------------------
| Email View Folder
|--------------------------------------------------------------------------
|
| The folder under resources/views where your email templates are found.
|
*/
'email_view_folder' => null,
/*
|--------------------------------------------------------------------------
| Send Email Job
|--------------------------------------------------------------------------
|
| The class name of the job that will be used to send an email.
|
*/
'send_email_job' => \Statamic\Forms\SendEmail::class,
/*
|--------------------------------------------------------------------------
| Exporters
|--------------------------------------------------------------------------
|
| Here you may define all the available form submission exporters.
| You may customize the options within each exporter's array.
|
*/
'exporters' => [
'csv' => [
'class' => Statamic\Forms\Exporters\CsvExporter::class,
],
'json' => [
'class' => Statamic\Forms\Exporters\JsonExporter::class,
],
],
];

184
config/statamic/git.php Normal file
View File

@ -0,0 +1,184 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Git Integration
|--------------------------------------------------------------------------
|
| Whether Statamic's git integration should be enabled. This feature
| assumes that git is already installed and accessible by your
| PHP process' server user. For more info, see the docs at:
|
| https://statamic.dev/git-automation
|
*/
'enabled' => env('STATAMIC_GIT_ENABLED', false),
/*
|--------------------------------------------------------------------------
| Automatically Run
|--------------------------------------------------------------------------
|
| By default, commits are automatically queued when `Saved` or `Deleted`
| events are fired. If you prefer users to manually trigger commits
| using the `Git` utility interface, you may set this to `false`.
|
| https://statamic.dev/git-automation#committing-changes
|
*/
'automatic' => env('STATAMIC_GIT_AUTOMATIC', true),
/*
|--------------------------------------------------------------------------
| Queue Connection
|--------------------------------------------------------------------------
|
| You may choose which queue connection should be used when dispatching
| commit jobs. Unless specified, the default connection will be used.
|
| https://statamic.dev/git-automation#queueing-commits
|
*/
'queue_connection' => env('STATAMIC_GIT_QUEUE_CONNECTION'),
/*
|--------------------------------------------------------------------------
| Dispatch Delay
|--------------------------------------------------------------------------
|
| When `Saved` and `Deleted` events queue up commits, you may wish to
| set a delay time in minutes for each queued job. This can allow
| for more consolidated commits when you have multiple users
| making simultaneous content changes to your repository.
|
| Note: Not supported by default `sync` queue driver.
|
*/
'dispatch_delay' => env('STATAMIC_GIT_DISPATCH_DELAY', 0),
/*
|--------------------------------------------------------------------------
| Git User
|--------------------------------------------------------------------------
|
| The git user that will be used when committing changes. By default, it
| will attempt to commit with the authenticated user's name and email
| when possible, falling back to the below user when not available.
|
| https://statamic.dev/git-automation#git-user
|
*/
'use_authenticated' => true,
'user' => [
'name' => env('STATAMIC_GIT_USER_NAME', 'Spock'),
'email' => env('STATAMIC_GIT_USER_EMAIL', 'spock@example.com'),
],
/*
|--------------------------------------------------------------------------
| Tracked Paths
|--------------------------------------------------------------------------
|
| Define the tracked paths to be considered when staging changes. Default
| stache and file locations are already set up for you, but feel free
| to modify these paths to suit your storage config. Referencing
| absolute paths to external repos is also completely valid.
|
*/
'paths' => [
base_path('content'),
base_path('users'),
resource_path('blueprints'),
resource_path('fieldsets'),
resource_path('forms'),
resource_path('users'),
resource_path('preferences.yaml'),
resource_path('sites.yaml'),
storage_path('forms'),
public_path('assets'),
],
/*
|--------------------------------------------------------------------------
| Git Binary
|--------------------------------------------------------------------------
|
| By default, Statamic will try to use the "git" command, but you can set
| an absolute path to the git binary if necessary for your environment.
|
*/
'binary' => env('STATAMIC_GIT_BINARY', 'git'),
/*
|--------------------------------------------------------------------------
| Commands
|--------------------------------------------------------------------------
|
| Define a list commands to be run when Statamic is ready to `git add`
| and `git commit` your changes. These commands will be run once
| per repo, attempting to consolidate commits where possible.
|
| https://statamic.dev/git-automation#customizing-commits
|
*/
'commands' => [
'{{ git }} add {{ paths }}',
'{{ git }} -c "user.name={{ name }}" -c "user.email={{ email }}" commit -m "{{ message }}"',
],
/*
|--------------------------------------------------------------------------
| Push
|--------------------------------------------------------------------------
|
| Determine whether `git push` should be run after the commands above
| have finished. This is disabled by default, but can be enabled
| globally, or per environment using the provided variable.
|
| https://statamic.dev/git-automation#pushing-changes
|
*/
'push' => env('STATAMIC_GIT_PUSH', false),
/*
|--------------------------------------------------------------------------
| Ignored Events
|--------------------------------------------------------------------------
|
| Statamic will listen on all `Saved` and `Deleted` events, as well
| as any events registered by installed addons. If you wish to
| ignore any specific events, you may reference them here.
|
*/
'ignored_events' => [
// \Statamic\Events\UserSaved::class,
// \Statamic\Events\UserDeleted::class,
],
/*
|--------------------------------------------------------------------------
| Locale
|--------------------------------------------------------------------------
|
| The locale to be used when translating commit messages, etc. By
| default, the authenticated user's locale will be used, but
| feel free to override this using the provided variable.
|
*/
'locale' => env('STATAMIC_GIT_LOCALE', null),
];

View File

@ -0,0 +1,91 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| GraphQL
|--------------------------------------------------------------------------
|
| Here you may enable the GraphQL API, and select which resources
| are available to be queried, depending on your site's needs.
|
| https://statamic.dev/graphql
|
*/
'enabled' => env('STATAMIC_GRAPHQL_ENABLED', false),
'resources' => [
'collections' => false,
'navs' => false,
'taxonomies' => false,
'assets' => false,
'globals' => false,
'forms' => false,
'sites' => false,
'users' => false,
],
/*
|--------------------------------------------------------------------------
| Queries
|--------------------------------------------------------------------------
|
| Here you may list queries to be added to the Statamic schema.
|
| https://statamic.dev/graphql#custom-queries
|
*/
'queries' => [
//
],
/*
|--------------------------------------------------------------------------
| Mutations
|--------------------------------------------------------------------------
|
| Here you may list mutations to be added to the Statamic schema.
|
| https://statamic.dev/graphql#custom-mutations
*/
'mutations' => [
//
],
/*
|--------------------------------------------------------------------------
| Middleware
|--------------------------------------------------------------------------
|
| Here you may list middleware to be added to the Statamic schema.
|
| https://statamic.dev/graphql#custom-middleware
|
*/
'middleware' => [
//
],
/*
|--------------------------------------------------------------------------
| Caching
|--------------------------------------------------------------------------
|
| By default, Statamic will cache each request until the specified
| expiry, or until content is changed. See the documentation for
| more details on how to customize your cache implementation.
|
| https://statamic.dev/graphql#caching
|
*/
'cache' => [
'expiry' => 60,
],
];

View File

@ -0,0 +1,48 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Devices
|--------------------------------------------------------------------------
|
| Live Preview displays a device selector for you to preview the page
| in predefined sizes. You are free to add or edit these presets.
|
*/
'devices' => [
'Laptop' => ['width' => 1440, 'height' => 900],
'Tablet' => ['width' => 1024, 'height' => 786],
'Mobile' => ['width' => 375, 'height' => 812],
],
/*
|--------------------------------------------------------------------------
| Additional Inputs
|--------------------------------------------------------------------------
|
| Additional fields may be added to the Live Preview header bar. You
| may define a list of Vue components to be injected. Their values
| will be added to the cascade on the front-end for you to use.
|
*/
'inputs' => [
//
],
/*
|--------------------------------------------------------------------------
| Force Reload Javascript Modules
|--------------------------------------------------------------------------
|
| To force a reload, Live Preview appends a timestamp to the URL on
| script tags of type 'module'. You may disable this behavior here.
|
*/
'force_reload_js_modules' => true,
];

View File

@ -0,0 +1,28 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Markdown Parser Configurations
|--------------------------------------------------------------------------
|
| Here you may define the configuration arrays for each markdown parser.
| You may use the base CommonMark options as well as any extensions'
| options here. The available options are in the CommonMark docs.
|
| https://statamic.dev/extending/markdown#configuration
|
*/
'configs' => [
'default' => [
// 'heading_permalink' => [
// 'symbol' => '#',
// ],
],
],
];

69
config/statamic/oauth.php Normal file
View File

@ -0,0 +1,69 @@
<?php
return [
'enabled' => env('STATAMIC_OAUTH_ENABLED', false),
'email_login_enabled' => true,
'providers' => [
// 'github',
],
'routes' => [
'login' => 'oauth/{provider}',
'callback' => 'oauth/{provider}/callback',
],
/*
|--------------------------------------------------------------------------
| Create User
|--------------------------------------------------------------------------
|
| Whether or not a user account should be created upon authentication
| with an OAuth provider. If disabled, a user account will be need
| to be explicitly created ahead of time.
|
*/
'create_user' => true,
/*
|--------------------------------------------------------------------------
| Merge User Data
|--------------------------------------------------------------------------
|
| When authenticating with an OAuth provider, the user data returned
| such as their name will be merged with the existing user account.
|
*/
'merge_user_data' => true,
/*
|--------------------------------------------------------------------------
| Unauthorized Redirect
|--------------------------------------------------------------------------
|
| This controls where the user is taken after authenticating with
| an OAuth provider but their account is unauthorized. This may
| happen when the create_user option has been set to false.
|
*/
'unauthorized_redirect' => null,
/*
|--------------------------------------------------------------------------
| Remember Me
|--------------------------------------------------------------------------
|
| Whether or not the "remember me" functionality should be used when
| authenticating using OAuth. When enabled, the user will remain
| logged in indefinitely, or until they manually log out.
|
*/
'remember_me' => true,
];

View File

@ -0,0 +1,53 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default (or site-wide) Scheme
|--------------------------------------------------------------------------
|
| The default scheme will be applied to every page of the site.
| By default, you probably won't want to protect anything
| at all, but you are free to select one if necessary.
|
*/
'default' => null,
/*
|--------------------------------------------------------------------------
| Protection Schemes
|--------------------------------------------------------------------------
|
| Here you may define all of the protection schemes for your application
| as well as their drivers. You may even define multiple schemes for
| the same driver to easily protect different types of pages.
|
| Supported drivers: "ip_address", "auth", "password"
|
*/
'schemes' => [
'ip_address' => [
'driver' => 'ip_address',
'allowed' => ['127.0.0.1'],
],
'logged_in' => [
'driver' => 'auth',
'login_url' => '/login',
'append_redirect' => true,
],
'password' => [
'driver' => 'password',
'allowed' => ['secret'],
'field' => null,
'form_url' => null,
],
],
];

View File

@ -0,0 +1,30 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Revisions
|--------------------------------------------------------------------------
|
| Revisions must be enabled per-collection by adding `revisions: true` to
| the collection's yaml file. Here you may disable revisions completely
| in one go. This is useful for disabling revisions per environment.
|
*/
'enabled' => env('STATAMIC_REVISIONS_ENABLED', false),
/*
|--------------------------------------------------------------------------
| Storage Path
|--------------------------------------------------------------------------
|
| This is the directory where your revision files will be located. Within
| here, they will be further organized into collection, site, ID, etc.
|
*/
'path' => env('STATAMIC_REVISIONS_PATH', storage_path('statamic/revisions')),
];

View File

@ -0,0 +1,56 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Enable Routes
|--------------------------------------------------------------------------
|
| Statamic adds its own routes to the front-end of your site. You are
| free to disable this behavior.
|
| More info: https://statamic.dev/routing
|
*/
'enabled' => true,
/*
|--------------------------------------------------------------------------
| Enable Route Bindings
|--------------------------------------------------------------------------
|
| Whether route bindings for Statamic repositories (entry, taxonomy,
| collections, etc) are enabled for front end routes. This may be
| useful if you want to make your own custom routes with them.
|
*/
'bindings' => false,
/*
|--------------------------------------------------------------------------
| Action Route Prefix
|--------------------------------------------------------------------------
|
| Some extensions may provide routes that go through the frontend of your
| website. These URLs begin with the following prefix. We've chosen an
| unobtrusive default but you are free to select whatever you want.
|
*/
'action' => '!',
/*
|--------------------------------------------------------------------------
| Middleware
|--------------------------------------------------------------------------
|
| Define the middleware that will be applied to the web route group.
|
*/
'middleware' => 'web',
];

View File

@ -0,0 +1,82 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default search index
|--------------------------------------------------------------------------
|
| This option controls the search index that gets queried when performing
| search functions without explicitly selecting another index.
|
*/
'default' => env('STATAMIC_DEFAULT_SEARCH_INDEX', 'default'),
/*
|--------------------------------------------------------------------------
| Search Indexes
|--------------------------------------------------------------------------
|
| Here you can define all of the available search indexes.
|
*/
'indexes' => [
'default' => [
'driver' => 'local',
'searchables' => 'all',
'fields' => ['title'],
],
// 'blog' => [
// 'driver' => 'local',
// 'searchables' => 'collection:blog',
// ],
],
/*
|--------------------------------------------------------------------------
| Driver Defaults
|--------------------------------------------------------------------------
|
| Here you can specify default configuration to be applied to all indexes
| that use the corresponding driver. For instance, if you have two
| indexes that use the "local" driver, both of them can have the
| same base configuration. You may override for each index.
|
*/
'drivers' => [
'local' => [
'path' => storage_path('statamic/search'),
],
'algolia' => [
'credentials' => [
'id' => env('ALGOLIA_APP_ID', ''),
'secret' => env('ALGOLIA_SECRET', ''),
],
],
],
/*
|--------------------------------------------------------------------------
| Search Defaults
|--------------------------------------------------------------------------
|
| Here you can specify default configuration to be applied to all indexes
| regardless of the driver. You can override these per driver or per index.
|
*/
'defaults' => [
'fields' => ['title'],
],
];

118
config/statamic/ssg.php Normal file
View File

@ -0,0 +1,118 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Base URL
|--------------------------------------------------------------------------
|
| This informs the generator where the static site will eventually be hosted.
| For instance, if you are relying on absolute URLs in your app, this one
| will be used. It should be an absolute URL, eg. "http://my-app.com"
|
*/
'base_url' => config('app.url'),
/*
|--------------------------------------------------------------------------
| Destination Directory
|--------------------------------------------------------------------------
|
| This option defines where the static files will be saved.
|
*/
'destination' => storage_path('app/static'),
/*
|--------------------------------------------------------------------------
| Files and Symlinks
|--------------------------------------------------------------------------
|
| You are free to define a set of directories to be copied along with the
| generated HTML files. For example, you may want to link your CSS,
| JavaScript, static images, and perhaps any uploaded assets.
| You may choose to symlink rather than copy.
|
*/
'copy' => [
public_path('build') => 'build',
],
'symlinks' => [
// public_path('build') => 'build',
],
/*
|--------------------------------------------------------------------------
| Additional URLs
|--------------------------------------------------------------------------
|
| Here you may define a list of additional URLs to be generated,
| such as manually created routes.
|
*/
'urls' => [
//
],
/*
|--------------------------------------------------------------------------
| Exclude URLs
|--------------------------------------------------------------------------
|
| Here you may define a list of URLs that should not be generated.
|
*/
'exclude' => [
//
],
/*
|--------------------------------------------------------------------------
| Pagination Route
|--------------------------------------------------------------------------
|
| Here you may define how paginated entries are routed. This will take
| effect wherever pagination is detected in your antlers templates,
| like if you use the `paginate` param on the `collection` tag.
|
*/
'pagination_route' => '{url}/{page_name}/{page_number}',
/*
|--------------------------------------------------------------------------
| Glide
|--------------------------------------------------------------------------
|
| Glide images are dynamically resized server-side when requesting a URL.
| On a static site, you would just be serving HTML files without PHP.
| Glide images will be pre-generated into the given directory.
|
*/
'glide' => [
'directory' => 'img',
'override' => true,
],
/*
|--------------------------------------------------------------------------
| Failures
|--------------------------------------------------------------------------
|
| You may configure whether the console command will exit early with a
| failure status code when it encounters errors or warnings. You may
| want to do this to prevent deployments in CI environments, etc.
|
*/
'failures' => false, // 'errors' or 'warnings'
];

View File

@ -0,0 +1,77 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| File Watcher
|--------------------------------------------------------------------------
|
| File changes will be noticed and data will be updated accordingly.
| This can be disabled to reduce overhead, but you will need to
| either update the cache manually or use the Control Panel.
|
*/
'watcher' => env('STATAMIC_STACHE_WATCHER', 'auto'),
/*
|--------------------------------------------------------------------------
| Cache Store
|--------------------------------------------------------------------------
|
| Here you may configure which Cache Store the Stache uses.
|
*/
'cache_store' => null,
/*
|--------------------------------------------------------------------------
| Stores
|--------------------------------------------------------------------------
|
| Here you may configure the stores that are used inside the Stache.
|
| https://statamic.dev/stache#stores
|
*/
'stores' => [
//
],
/*
|--------------------------------------------------------------------------
| Indexes
|--------------------------------------------------------------------------
|
| Here you may define any additional indexes that will be inherited
| by each store in the Stache. You may also define indexes on a
| per-store level by adding an "indexes" key to its config.
|
*/
'indexes' => [
//
],
/*
|--------------------------------------------------------------------------
| Locking
|--------------------------------------------------------------------------
|
| In order to prevent concurrent requests from updating the Stache at the
| same time and wasting resources, it will be locked so that subsequent
| requests will have to wait until the first one has been completed.
|
| https://statamic.dev/stache#locks
|
*/
'lock' => [
'enabled' => true,
'timeout' => 30,
],
];

View File

@ -0,0 +1,179 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Active Static Caching Strategy
|--------------------------------------------------------------------------
|
| To enable Static Caching, you should choose a strategy from the ones
| you have defined below. Leave this null to disable static caching.
|
*/
'strategy' => env('STATAMIC_STATIC_CACHING_STRATEGY', null),
/*
|--------------------------------------------------------------------------
| Caching Strategies
|--------------------------------------------------------------------------
|
| Here you may define all of the static caching strategies for your
| application as well as their drivers.
|
| Supported drivers: "application", "file"
|
*/
'strategies' => [
'half' => [
'driver' => 'application',
'expiry' => null,
],
'full' => [
'driver' => 'file',
'path' => public_path('static'),
'lock_hold_length' => 0,
'permissions' => [
'directory' => 0755,
'file' => 0644,
],
],
],
/*
|--------------------------------------------------------------------------
| Exclusions
|--------------------------------------------------------------------------
|
| Here you may define a list of URLs to be excluded from static
| caching. You may want to exclude URLs containing dynamic
| elements like contact forms, or shopping carts.
|
*/
'exclude' => [
'class' => null,
'urls' => [
//
],
],
/*
|--------------------------------------------------------------------------
| Invalidation Rules
|--------------------------------------------------------------------------
|
| Here you may define the rules that trigger when and how content would be
| flushed from the static cache. See the documentation for more details.
| If a custom class is not defined, the default invalidator is used.
|
| https://statamic.dev/static-caching
|
*/
'invalidation' => [
'class' => null,
'rules' => [
//
],
],
/*
|--------------------------------------------------------------------------
| Ignoring Query Strings
|--------------------------------------------------------------------------
|
| Statamic will cache pages of the same URL but with different query
| parameters separately. This is useful for pages with pagination.
| If you'd like to ignore the query strings, you may do so.
|
*/
'ignore_query_strings' => false,
'allowed_query_strings' => [
//
],
'disallowed_query_strings' => [
//
],
/*
|--------------------------------------------------------------------------
| Nocache
|--------------------------------------------------------------------------
|
| Here you may define where the nocache data is stored.
|
| https://statamic.dev/tags/nocache#database
|
| Supported drivers: "cache", "database"
|
*/
'nocache' => 'cache',
'nocache_db_connection' => env('STATAMIC_NOCACHE_DB_CONNECTION'),
'nocache_js_position' => 'body',
/*
|--------------------------------------------------------------------------
| Replacers
|--------------------------------------------------------------------------
|
| Here you may define replacers that dynamically replace content within
| the response. Each replacer must implement the Replacer interface.
|
*/
'replacers' => [
\Statamic\StaticCaching\Replacers\CsrfTokenReplacer::class,
\Statamic\StaticCaching\Replacers\NoCacheReplacer::class,
],
/*
|--------------------------------------------------------------------------
| Warm Queue
|--------------------------------------------------------------------------
|
| Here you may define the queue name and connection
| that will be used when warming the static cache and
| optionally set the "--insecure" flag by default.
|
*/
'warm_queue' => env('STATAMIC_STATIC_WARM_QUEUE'),
'warm_queue_connection' => env('STATAMIC_STATIC_WARM_QUEUE_CONNECTION'),
'warm_insecure' => env('STATAMIC_STATIC_WARM_INSECURE', false),
/*
|--------------------------------------------------------------------------
| Shared Error Pages
|--------------------------------------------------------------------------
|
| You may choose to share the same statically generated error page across
| all errors. For example, the first time a 404 is encountered it will
| be generated and cached, and then served for all subsequent 404s.
|
| This is only supported for half measure.
|
*/
'share_errors' => false,
];

243
config/statamic/system.php Normal file
View File

@ -0,0 +1,243 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| License Key
|--------------------------------------------------------------------------
|
| The license key for the corresponding domain from your Statamic account.
| Without a key entered, your app will be considered to be in Trial Mode.
|
| https://statamic.dev/licensing#trial-mode
|
*/
'license_key' => env('STATAMIC_LICENSE_KEY'),
/*
|--------------------------------------------------------------------------
| Enable Multi-site
|--------------------------------------------------------------------------
|
| Whether Statamic's multi-site functionality should be enabled. It is
| assumed Statamic Pro is also enabled. To get started, you can run
| the `php please multisite` command to update your content file
| structure, after which you can manage your sites in the CP.
|
| https://statamic.dev/multi-site
|
*/
'multisite' => false,
/*
|--------------------------------------------------------------------------
| Default Addons Paths
|--------------------------------------------------------------------------
|
| When generating addons via `php please make:addon`, this path will be
| used by default. You can still specify custom repository paths in
| your composer.json, but this is the path used by the generator.
|
*/
'addons_path' => base_path('addons'),
/*
|--------------------------------------------------------------------------
| Blueprints Path
|--------------------------------------------------------------------------
|
| Where your blueprint YAML files are stored.
|
*/
'blueprints_path' => resource_path('blueprints'),
/*
|--------------------------------------------------------------------------
| Fieldsets Path
|--------------------------------------------------------------------------
|
| Where your fieldset YAML files are stored.
|
*/
'fieldsets_path' => resource_path('fieldsets'),
/*
|--------------------------------------------------------------------------
| Send the Powered-By Header
|--------------------------------------------------------------------------
|
| Websites like builtwith.com use the X-Powered-By header to determine
| what technologies are used on a particular site. By default, we'll
| send this header, but you are absolutely allowed to disable it.
|
*/
'send_powered_by_header' => true,
/*
|--------------------------------------------------------------------------
| Date Format
|--------------------------------------------------------------------------
|
| Whenever a Carbon date is cast to a string on front-end routes, it will
| use this format. On CP routes, the format defined in cp.php is used.
| You can customize this format using PHP's date string constants.
| Setting this value to null will use Carbon's default format.
|
| https://www.php.net/manual/en/function.date.php
|
*/
'date_format' => 'F jS, Y',
/*
|--------------------------------------------------------------------------
| Default Character Set
|--------------------------------------------------------------------------
|
| Statamic will use this character set when performing specific string
| encoding and decoding operations; This does not apply everywhere.
|
*/
'charset' => 'UTF-8',
/*
|--------------------------------------------------------------------------
| Track Last Update
|--------------------------------------------------------------------------
|
| Statamic will automatically set an `updated_at` timestamp (along with
| `updated_by`, where applicable) when specific content is updated.
| In some situations, you may wish disable this functionality.
|
*/
'track_last_update' => true,
/*
|--------------------------------------------------------------------------
| Enable Cache Tags
|--------------------------------------------------------------------------
|
| Sometimes you'll want to be able to disable the {{ cache }} tags in
| Antlers, so here is where you can do that. Otherwise, it will be
| enabled all the time.
|
*/
'cache_tags_enabled' => env('STATAMIC_CACHE_TAGS_ENABLED', true),
/*
|--------------------------------------------------------------------------
| Intensive Operations
|--------------------------------------------------------------------------
|
| Sometimes Statamic requires extra resources to complete intensive
| operations. Here you may configure system resource limits for
| those rare times when we need to turn things up to eleven!
|
*/
'php_memory_limit' => '-1',
'php_max_execution_time' => '0',
'ajax_timeout' => '600000',
'pcre_backtrack_limit' => '-1',
/*
|--------------------------------------------------------------------------
| Debugbar Integration
|--------------------------------------------------------------------------
|
| Statamic integrates with Laravel Debugbar to bring more detail to your
| debugging experience. Here you may adjust various default options.
|
*/
'debugbar' => [
'pretty_print_variables' => true,
],
/*
|--------------------------------------------------------------------------
| ASCII
|--------------------------------------------------------------------------
|
| During various string manipulations (e.g. slugification), Statamic will
| need to make ASCII character conversions. Here you may define whether
| or not extra characters get converted. e.g. "%" becomes "percent".
|
*/
'ascii_replace_extra_symbols' => false,
/*
|--------------------------------------------------------------------------
| Update References on Change
|--------------------------------------------------------------------------
|
| With this enabled, Statamic will attempt to update references to assets
| and terms when moving, renaming, replacing, deleting, etc. This will
| be queued, but it can disabled as needed for performance reasons.
|
*/
'update_references' => true,
/*
|--------------------------------------------------------------------------
| Always Augment to Query
|--------------------------------------------------------------------------
|
| By default, Statamic will augment relationship fields with max_items: 1
| to the result of a query, for example an Entry instance. Setting this
| to true will augment to the query builder instead of the result.
|
*/
'always_augment_to_query' => false,
/*
|--------------------------------------------------------------------------
| Row ID handle
|--------------------------------------------------------------------------
|
| Rows in Grid, Replicator, and Bard fields will be given a unique ID using
| the "id" field. You may need your own field named "id", in which case
| you may customize the handle of the field that Statamic will use.
|
*/
'row_id_handle' => 'id',
/*
|--------------------------------------------------------------------------
| Fake SQL Queries
|--------------------------------------------------------------------------
|
| Enable while using the flat-file Stache driver to show fake "SQL" query
| approximations in your database debugging tools — including Debugbar,
| Laravel Telescope, and Ray with the ray()->showQueries() helper.
|
*/
'fake_sql_queries' => config('app.debug'),
/*
|--------------------------------------------------------------------------
| Layout
|--------------------------------------------------------------------------
|
| Define the default layout that will be used by views.
|
*/
'layout' => env('STATAMIC_LAYOUT', 'layout'),
];

182
config/statamic/users.php Normal file
View File

@ -0,0 +1,182 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| User Repository
|--------------------------------------------------------------------------
|
| Statamic uses a repository to get users, roles, groups, and their
| relationships from specified storage locations. The file driver
| gets it from disk, while the eloquent driver gets from a DB.
|
| Supported: "file", "eloquent"
|
*/
'repository' => 'file',
'repositories' => [
'file' => [
'driver' => 'file',
'paths' => [
'roles' => resource_path('users/roles.yaml'),
'groups' => resource_path('users/groups.yaml'),
],
],
'eloquent' => [
'driver' => 'eloquent',
],
],
/*
|--------------------------------------------------------------------------
| Avatars
|--------------------------------------------------------------------------
|
| User avatars are initials by default, with custom options for services
| like Gravatar.com.
|
| Supported: "initials", "gravatar", or a custom class name.
|
*/
'avatars' => 'initials',
/*
|--------------------------------------------------------------------------
| New User Roles
|--------------------------------------------------------------------------
|
| When registering new users through the user:register_form tag, these
| roles will automatically be applied to your newly created users.
|
*/
'new_user_roles' => [
//
],
/*
|--------------------------------------------------------------------------
| New User Groups
|--------------------------------------------------------------------------
|
| When registering new users through the user:register_form tag, these
| groups will automatically be applied to your newly created users.
|
*/
'new_user_groups' => [
//
],
/*
|--------------------------------------------------------------------------
| Registration form honeypot field
|--------------------------------------------------------------------------
|
| When registering new users through the user:register_form tag,
| specify the field to act as a honeypot for bots
|
*/
'registration_form_honeypot_field' => null,
/*
|--------------------------------------------------------------------------
| User Wizard Invitation Email
|--------------------------------------------------------------------------
|
| When creating new users through the wizard in the control panel,
| you may choose whether to be able to send an invitation email.
| Setting to true will give the user the option. But setting
| it to false will disable the invitation option entirely.
|
*/
'wizard_invitation' => true,
/*
|--------------------------------------------------------------------------
| Password Brokers
|--------------------------------------------------------------------------
|
| When resetting passwords, Statamic uses an appropriate password broker.
| Here you may define which broker should be used for each situation.
| You may want a longer expiry for user activations, for example.
|
*/
'passwords' => [
'resets' => 'users',
'activations' => 'activations',
],
/*
|--------------------------------------------------------------------------
| Database
|--------------------------------------------------------------------------
|
| Here you may configure the database connection and its table names.
|
*/
'database' => config('database.default'),
'tables' => [
'users' => 'users',
'role_user' => 'role_user',
'roles' => false,
'group_user' => 'group_user',
'groups' => false,
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| By default, Statamic will use the `web` authentication guard. However,
| if you want to run Statamic alongside the default Laravel auth
| guard, you can configure that for your cp and/or frontend.
|
*/
'guards' => [
'cp' => 'web',
'web' => 'web',
],
/*
|--------------------------------------------------------------------------
| Impersonation
|--------------------------------------------------------------------------
|
| Here you can configure if impersonation is available, and what URL to
| redirect to after impersonation begins.
|
*/
'impersonate' => [
'enabled' => env('STATAMIC_IMPERSONATE_ENABLED', true),
'redirect' => env('STATAMIC_IMPERSONATE_REDIRECT', null),
],
/*
|--------------------------------------------------------------------------
| Default Sorting
|--------------------------------------------------------------------------
|
| Here you may configure the default sort behavior for user listings.
|
*/
'sort_field' => 'email',
'sort_direction' => 'asc',
];

0
content/assets/.gitkeep Normal file
View File

View File

@ -0,0 +1,2 @@
title: Assets
disk: assets

View File

View File

@ -0,0 +1,5 @@
title: Pages
structure:
root: true
route: '{parent_uri}/{slug}'
propagate: true

View File

@ -0,0 +1,16 @@
---
title: Home
id: home
template: home
blueprint: pages
---
## Welcome to your brand new Statamic site!
Not sure what to do next? Here are a few ideas, but feel free to explore in your own way, in your own time.
- [Jump into the Control Panel](/cp) and edit this page or begin setting up your own collections and blueprints.
- [Head to the docs](https://statamic.dev) and learn how Statamic works.
- [Watch some Statamic videos](https://youtube.com/statamic) on YouTube.
- [Join our Discord chat](https://statamic.com/discord) and meet thousands of other Statamic developers.
- [Start a discussion](https://github.com/statamic/cms/discussions) and get answers to your questions.
- [Star Statamic on Github](https://github.com/statamic/cms) if you enjoy using it!

0
content/globals/.gitkeep Normal file
View File

View File

View File

View File

@ -0,0 +1,3 @@
tree:
-
entry: home

1
database/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.sqlite*

View File

@ -0,0 +1,44 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* The current password being used by the factory.
*/
protected static ?string $password;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
];
}
/**
* Indicate that the model's email address should be unverified.
*/
public function unverified(): static
{
return $this->state(fn (array $attributes) => [
'email_verified_at' => null,
]);
}
}

View File

@ -0,0 +1,49 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->longText('payload');
$table->integer('last_activity')->index();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
Schema::dropIfExists('password_reset_tokens');
Schema::dropIfExists('sessions');
}
};

View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});
Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};

View File

@ -0,0 +1,57 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('jobs', function (Blueprint $table) {
$table->id();
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
Schema::create('job_batches', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('name');
$table->integer('total_jobs');
$table->integer('pending_jobs');
$table->integer('failed_jobs');
$table->longText('failed_job_ids');
$table->mediumText('options')->nullable();
$table->integer('cancelled_at')->nullable();
$table->integer('created_at');
$table->integer('finished_at')->nullable();
});
Schema::create('failed_jobs', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jobs');
Schema::dropIfExists('job_batches');
Schema::dropIfExists('failed_jobs');
}
};

View File

@ -0,0 +1,25 @@
<?php
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
use WithoutModelEvents;
/**
* Seed the application's database.
*/
public function run(): void
{
// User::factory(10)->create();
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
]);
}
}

8
lang/en/validation.php Normal file
View File

@ -0,0 +1,8 @@
<?php
return [
'unique_entry_value' => 'The :attribute has already been taken.',
'unique_user_value' => 'The :attribute has already been taken.',
];

18
package.json Normal file
View File

@ -0,0 +1,18 @@
{
"$schema": "https://www.schemastore.org/package.json",
"private": true,
"type": "module",
"scripts": {
"build": "vite build",
"dev": "vite",
"watch": "vite"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.16",
"@tailwindcss/vite": "^4.0.6",
"concurrently": "^9.0.1",
"laravel-vite-plugin": "^2.0.0",
"tailwindcss": "^4.0.6",
"vite": "^7.0.7"
}
}

35
phpunit.xml Normal file
View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./app</directory>
</include>
</source>
<php>
<env name="APP_ENV" value="testing"/>
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="BROADCAST_CONNECTION" value="null"/>
<env name="CACHE_STORE" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="MAIL_MAILER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="PULSE_ENABLED" value="false"/>
<env name="TELESCOPE_ENABLED" value="false"/>
<env name="NIGHTWATCH_ENABLED" value="false"/>
</php>
</phpunit>

20
please Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env php
<?php
use Symfony\Component\Console\Input\ArgvInput;
define('LARAVEL_START', microtime(true));
// Register the Composer autoloader...
require __DIR__.'/vendor/autoload.php';
// Bootstrap Laravel...
$app = require_once __DIR__.'/bootstrap/app.php';
// Rebind the kernel...
Statamic\Console\Please\Application::rebindKernel();
// Handle the command...
$status = $app->handleCommand(new ArgvInput);
exit($status);

25
public/.htaccess Normal file
View File

@ -0,0 +1,25 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Handle X-XSRF-Token Header
RewriteCond %{HTTP:x-xsrf-token} .
RewriteRule .* - [E=HTTP_X_XSRF_TOKEN:%{HTTP:X-XSRF-Token}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

0
public/assets/.gitkeep Normal file
View File

0
public/favicon.ico Normal file
View File

20
public/index.php Normal file
View File

@ -0,0 +1,20 @@
<?php
use Illuminate\Foundation\Application;
use Illuminate\Http\Request;
define('LARAVEL_START', microtime(true));
// Determine if the application is in maintenance mode...
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
require $maintenance;
}
// Register the Composer autoloader...
require __DIR__.'/../vendor/autoload.php';
// Bootstrap Laravel and handle the request...
/** @var Application $app */
$app = require_once __DIR__.'/../bootstrap/app.php';
$app->handleRequest(Request::capture());

2
public/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-agent: *
Disallow:

View File

@ -0,0 +1,8 @@
title: Asset
fields:
-
handle: alt
field:
display: 'Alt Text'
type: text
instructions: 'Description of the image'

View File

@ -0,0 +1,22 @@
title: Default
fields:
-
handle: content
field:
type: markdown
display: Content
localizable: true
-
handle: author
field:
type: users
display: Author
default: current
localizable: true
max_items: 1
-
handle: template
field:
type: template
display: Template
localizable: true

View File

@ -0,0 +1,29 @@
title: User
fields:
-
handle: name
field:
type: text
display: Name
-
handle: email
field:
type: text
input: email
display: Email Address
-
handle: roles
field:
type: user_roles
width: 50
-
handle: groups
field:
type: user_groups
width: 50
-
handle: avatar
field:
type: assets
max_files: 1
container: assets

1
resources/css/cp.css Normal file
View File

@ -0,0 +1 @@
/* This is all you. */

4
resources/css/site.css Normal file
View File

@ -0,0 +1,4 @@
@import "tailwindcss";
@plugin "@tailwindcss/typography";
@source "../views";
@source "../../content";

View File

@ -0,0 +1,15 @@
<template>
<div class="example-fieldtype-container">
<text-input :value="value" @input="update" />
</div>
</template>
<script>
// Learn more at https://statamic.dev/extending/fieldtypes/
export default {
mixins: [Fieldtype],
data() {
return {}
}
};
</script>

14
resources/js/cp.js Normal file
View File

@ -0,0 +1,14 @@
/**
* When extending the control panel, be sure to uncomment the necessary code for your build process:
* https://statamic.dev/extending/control-panel
*/
/** Example Fieldtype
import ExampleFieldtype from './components/fieldtypes/ExampleFieldtype.vue';
Statamic.booting(() => {
Statamic.$components.register('example-fieldtype', ExampleFieldtype);
});
*/

1
resources/js/site.js Normal file
View File

@ -0,0 +1 @@
// This is all you.

View File

@ -0,0 +1,4 @@
# admin:
# title: Administrators
# roles:
# - admin

View File

@ -0,0 +1,4 @@
# admin:
# title: Administrator
# permissions:
# - super

View File

@ -0,0 +1 @@
{{ content }}

View File

@ -0,0 +1 @@
<p>404 Page not found.</p>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,15 @@
<!doctype html>
<html lang="{{ site:short_locale }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ title ?? site:name }}</title>
{{ vite src="resources/js/site.js|resources/css/site.css" }}
</head>
<body class="bg-slate-100 dark:bg-gray-800 font-sans leading-normal text-slate-800 dark:text-gray-400">
<div class="mx-auto px-2 lg:min-h-screen flex flex-col items-center justify-center">
{{ template_content }}
</div>
</body>
</html>

8
routes/console.php Normal file
View File

@ -0,0 +1,8 @@
<?php
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote');

7
routes/web.php Normal file
View File

@ -0,0 +1,7 @@
<?php
use Illuminate\Support\Facades\Route;
// Route::statamic('example', 'example-view', [
// 'title' => 'Example'
// ]);

4
storage/app/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*
!private/
!public/
!.gitignore

2
storage/app/private/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/app/public/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/debugbar/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

9
storage/framework/.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
compiled.php
config.php
down
events.scanned.php
maintenance.php
routes.php
routes.scanned.php
schedule-*
services.json

3
storage/framework/cache/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*
!data/
!.gitignore

View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/framework/sessions/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/framework/testing/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/framework/views/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/logs/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/statamic/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

View File

@ -0,0 +1,21 @@
<?php
namespace Tests;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Foundation\Application;
trait CreatesApplication
{
/**
* Creates the application.
*/
public function createApplication(): Application
{
$app = require __DIR__.'/../bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();
return $app;
}
}

View File

@ -0,0 +1,19 @@
<?php
namespace Tests\Feature;
// use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*/
public function test_the_application_returns_a_successful_response(): void
{
$response = $this->get('/');
$response->assertStatus(200);
}
}

10
tests/TestCase.php Normal file
View File

@ -0,0 +1,10 @@
<?php
namespace Tests;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
}

Some files were not shown because too many files have changed in this diff Show More