Laravel 13 + dockerized
deploy / deploy (push) Failing after 34s

This commit is contained in:
railmedia
2026-09-25 09:28:08 +02:00
commit 13717d33c6
1912 changed files with 151557 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
.git
.gitignore
.env
.env.*
*.zip
qbgmxkhgeu.sql
node_modules
npm-debug.log
vendor
storage/logs/*
storage/framework/cache/*
storage/framework/sessions/*
storage/framework/views/*
bootstrap/cache/*.php
public/extensions-uploads
public/update-plugins
cronjobs
tests
phpunit.xml
+59
View File
@@ -0,0 +1,59 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=cgen-wp-ext-srv
DB_USERNAME=cgen-wp-ext-srv
DB_PASSWORD=cgen_dev_pass
BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
MEMCACHED_HOST=127.0.0.1
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=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
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1
VITE_APP_NAME="${APP_NAME}"
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
+30
View File
@@ -0,0 +1,30 @@
name: deploy
on:
push:
branches: [main]
concurrency:
group: deploy-main
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint (pint)
run: |
docker run --rm -v "$PWD":/app -w /app composer:2 sh -c \
"composer install --no-interaction --quiet && vendor/bin/pint --test"
- name: Deploy over SSH
env:
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts 2>/dev/null
ssh "$DEPLOY_USER@$DEPLOY_HOST" 'bash -s' < deploy/deploy.sh
+16
View File
@@ -0,0 +1,16 @@
/.env
/vendor
/node_modules
/storage/*.key
/storage/logs/*
/storage/framework/cache/*
/storage/framework/sessions/*
/storage/framework/views/*
/bootstrap/cache/*.php
/public/build
/public/extensions-uploads
/public/update-plugins
*.zip
/qbgmxkhgeu.sql
.phpunit.result.cache
.DS_Store
Executable
+54
View File
@@ -0,0 +1,54 @@
# ---- Stage 1: PHP dependencies (composer) ----
FROM composer:2 AS vendor
WORKDIR /app
COPY composer.json composer.lock ./
RUN composer install --no-dev --no-interaction --no-progress --prefer-dist \
--optimize-autoloader --no-scripts
# ---- Stage 2: runtime ----
FROM php:8.5-fpm
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
unzip \
curl \
libzip-dev \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
libicu-dev \
libonig-dev \
libxml2-dev \
libssl-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install \
pdo_mysql \
mbstring \
zip \
gd \
intl \
exif \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /var/www/html
COPY --chown=www-data:www-data . /var/www/html
COPY --from=vendor --chown=www-data:www-data /app/vendor /var/www/html/vendor
COPY docker/php/*.ini /usr/local/etc/php/conf.d/
RUN mkdir -p storage/framework/cache/data \
storage/framework/sessions \
storage/framework/views \
bootstrap/cache \
&& rm -f bootstrap/cache/*.php \
&& php artisan package:discover --ansi \
&& chown -R www-data:www-data storage bootstrap/cache \
&& rm -rf storage/framework/views/*
EXPOSE 9000
USER www-data
CMD ["php-fpm"]
Executable
+42
View File
@@ -0,0 +1,42 @@
<p align="center"><a href="https://www.cloudweb.ch" target="_blank" rel="noopener noreferrer"><img src="https://www.cloudweb.ch/wp-content/uploads/2023/02/cloudweb-10-jahre-logo.webp" width="400" alt="Laravel Logo" /></a></p>
## About the extensions server
Based on Laravel 10, the extensions server aims at providing a UI and wrapper for a custom WordPress extensions updates system. It provides a friendly interface along with user management. It also includes a requests manager, that is, sites that are requesting updates from the server, get logged in the database.
## Requirements
- PHP 8.2;
- MySQL;
- NodeJS 18+.
## Installation
- Copy repository to your server or local environment;
- Create a database to use with the app;
- Create an .env file based on the .env.example file;
- Run composer install;
- Run npm install;
- Run php artisan migrate;
- Run php artisan optimize;
- Run php artisan db:seed --class=FirstAdminSeeder
## Usage
- Login with email <strong>admin@admin.com</strong> and password <strong>password</strong>
- Navigate to /profile and change your password.
- /extensions/ - add extensions. Click Add extension to begin and add the details.
- /extensions/{extension_id}/upload - upload the extension file. ZIP files allowed only.
- /extensions/{extension_id}/manifest - create the manifest for your extension. The manifest is based on the following [template](https://gist.github.com/railmedia/ac5bb57a506dd27c9f225fd21eecb398)
- The manifest section is where you will change the version and trigger an update on the sites using your extension.
- /users section allows you to create admin users for the app.
- /requests section allows you to view and search for requests from remote sites.
## Configuring WordPress extensions (themes or plugins)
- In your extension add a file similar to [this file](https://gist.github.com/railmedia/3326fd650981fbacc2c272c12d947276)
- Make sure you replace the plugin slug and server URL to your own.
## About Us
- [cloudWEB GmbH](https://www.cloudweb.ch/agentur/)
@@ -0,0 +1,47 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Http\Requests\Auth\LoginRequest;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\View\View;
class AuthenticatedSessionController extends Controller
{
/**
* Display the login view.
*/
public function create(): View
{
return view('auth.login');
}
/**
* Handle an incoming authentication request.
*/
public function store(LoginRequest $request): RedirectResponse
{
$request->authenticate();
$request->session()->regenerate();
return redirect()->intended('/dashboard');
}
/**
* Destroy an authenticated session.
*/
public function destroy(Request $request): RedirectResponse
{
Auth::guard('web')->logout();
$request->session()->invalidate();
$request->session()->regenerateToken();
return redirect('/');
}
}
@@ -0,0 +1,40 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\ValidationException;
use Illuminate\View\View;
class ConfirmablePasswordController extends Controller
{
/**
* Show the confirm password view.
*/
public function show(): View
{
return view('auth.confirm-password');
}
/**
* Confirm the user's password.
*/
public function store(Request $request): RedirectResponse
{
if (! Auth::guard('web')->validate([
'email' => $request->user()->email,
'password' => $request->password,
])) {
throw ValidationException::withMessages([
'password' => __('auth.password'),
]);
}
$request->session()->put('auth.password_confirmed_at', time());
return redirect()->intended('/dashboard');
}
}
@@ -0,0 +1,24 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
class EmailVerificationNotificationController extends Controller
{
/**
* Send a new email verification notification.
*/
public function store(Request $request): RedirectResponse
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended('/dashboard');
}
$request->user()->sendEmailVerificationNotification();
return back()->with('status', 'verification-link-sent');
}
}
@@ -0,0 +1,21 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\View\View;
class EmailVerificationPromptController extends Controller
{
/**
* Display the email verification prompt.
*/
public function __invoke(Request $request): RedirectResponse|View
{
return $request->user()->hasVerifiedEmail()
? redirect()->intended('/dashboard')
: view('auth.verify-email');
}
}
+61
View File
@@ -0,0 +1,61 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Auth\Events\PasswordReset;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Password;
use Illuminate\Support\Str;
use Illuminate\Validation\Rules;
use Illuminate\View\View;
class NewPasswordController extends Controller
{
/**
* Display the password reset view.
*/
public function create(Request $request): View
{
return view('auth.reset-password', ['request' => $request]);
}
/**
* Handle an incoming new password request.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function store(Request $request): RedirectResponse
{
$request->validate([
'token' => ['required'],
'email' => ['required', 'email'],
'password' => ['required', 'confirmed', Rules\Password::defaults()],
]);
// Here we will attempt to reset the user's password. If it is successful we
// will update the password on an actual user model and persist it to the
// database. Otherwise we will parse the error and return the response.
$status = Password::reset(
$request->only('email', 'password', 'password_confirmation', 'token'),
function ($user) use ($request) {
$user->forceFill([
'password' => Hash::make($request->password),
'remember_token' => Str::random(60),
])->save();
event(new PasswordReset($user));
}
);
// If the password was successfully reset, we will redirect the user back to
// the application's home authenticated view. If there is an error we can
// redirect them back to where they came from with their error message.
return $status == Password::PASSWORD_RESET
? redirect()->route('login')->with('status', __($status))
: back()->withInput($request->only('email'))
->withErrors(['email' => __($status)]);
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Validation\Rules\Password;
class PasswordController extends Controller
{
/**
* Update the user's password.
*/
public function update(Request $request): RedirectResponse
{
$validated = $request->validateWithBag('updatePassword', [
'current_password' => ['required', 'current_password'],
'password' => ['required', Password::defaults(), 'confirmed'],
]);
$request->user()->update([
'password' => Hash::make($validated['password']),
]);
return back()->with('status', 'password-updated');
}
}
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Password;
use Illuminate\View\View;
class PasswordResetLinkController extends Controller
{
/**
* Display the password reset link request view.
*/
public function create(): View
{
return view('auth.forgot-password');
}
/**
* Handle an incoming password reset link request.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function store(Request $request): RedirectResponse
{
$request->validate([
'email' => ['required', 'email'],
]);
// We will send the password reset link to this user. Once we have attempted
// to send the link, we will examine the response then see the message we
// need to show to the user. Finally, we'll send out a proper response.
$status = Password::sendResetLink(
$request->only('email')
);
return $status == Password::RESET_LINK_SENT
? back()->with('status', __($status))
: back()->withInput($request->only('email'))
->withErrors(['email' => __($status)]);
}
}
+50
View File
@@ -0,0 +1,50 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Auth\Events\Registered;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Illuminate\Validation\Rules;
use Illuminate\View\View;
class RegisteredUserController extends Controller
{
/**
* Display the registration view.
*/
public function create(): View
{
return view('auth.register');
}
/**
* Handle an incoming registration request.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function store(Request $request): RedirectResponse
{
$request->validate([
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:'.User::class],
'password' => ['required', 'confirmed', Rules\Password::defaults()],
]);
$user = User::create([
'name' => $request->name,
'email' => $request->email,
'password' => Hash::make($request->password),
]);
event(new Registered($user));
Auth::login($user);
return redirect('/dashboard');
}
}
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Auth\Events\Verified;
use Illuminate\Foundation\Auth\EmailVerificationRequest;
use Illuminate\Http\RedirectResponse;
class VerifyEmailController extends Controller
{
/**
* Mark the authenticated user's email address as verified.
*/
public function __invoke(EmailVerificationRequest $request): RedirectResponse
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended('/dashboard?verified=1');
}
if ($request->user()->markEmailAsVerified()) {
event(new Verified($request->user()));
}
return redirect()->intended('/dashboard?verified=1');
}
}
+12
View File
@@ -0,0 +1,12 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController
{
use AuthorizesRequests, ValidatesRequests;
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Extension;
use App\Models\User;
class DashboardController extends Controller
{
public function dashboard() {
$extensions = Extension::orderBy('created_at', 'desc')->take(10)->get();
$users = User::orderBy('created_at', 'desc')->take(10)->get();
return view('dashboard')
->with( 'extensions', $extensions )
->with( 'users', $users );
}
}
+328
View File
@@ -0,0 +1,328 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\URL;
use App\Models\Extension;
use App\Models\Site;
use App\Models\SiteRequest;
class ExtensionsController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
return view('extensions.list')
->with('items', Extension::get());
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
return view('extensions.create_edit')
->with('item', new Extension);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
$validated = $request->validate([
'name' => 'required|unique:extensions|max:255'
]);
$extension = new Extension;
$extension->name = $request->name;
$extension->slug = $request->slug;
$extension->type = $request->type;
$extension->description = $request->description;
if( ! $extension->save() ) {
return redirect()->back()->withErrors(['msg' => 'There was an error adding the extension. Please try again.']);
} else {
return redirect( route('extensions.list') );
}
}
/**
* Display the specified resource.
*/
public function show(int $id)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(Request $request, Extension $extension)
{
// $extension = Extension::where('id', $id)->first();
return view('extensions.create_edit')
->with('item', $extension);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, int $id)
{
$validated = $request->validate([
'name' => 'required|unique:extensions,name,' . $id . '|max:255'
]);
$extension = Extension::where('id', $id)->first();
$extension->name = $request->name;
$extension->slug = $request->slug;
$extension->type = $request->type;
$extension->description = $request->description;
if( ! $extension->save() ) {
return redirect()->back()->withErrors(['msg' => 'There was an error editing the extension. Please try again.']);
} else {
// return redirect( route('extensions.list') );
return redirect()->back()->with( 'message-success', 'Saved!' );
}
}
/**
* Remove the specified resource from storage.
*/
public function destroy(int $id)
{
$extension = Extension::where('id', $id)->first();
$extension->delete();
return redirect()->route('extensions.list')->with( 'message-success', 'Deleted!' );
}
public function showManifest( Extension $extension ) {
return view('extensions.create_edit_manifest')
->with('item', $extension)
->with('manifest', $extension->manifest);
}
public function saveManifest( Request $request, Extension $extension ) {
$validate_fields = [
'name' => 'required',
'author' => 'required',
'version' => 'required',
'download_url' => 'required',
'requires' => 'required',
'tested' => 'required',
'requires_php' => 'required',
'last_updated' => 'required',
'description' => 'required',
'changelog' => 'required'
];
if( $extension->type == 'plugin' ) {
$validate_fields['slug'] = 'required';
$validate_fields['banner_low'] = 'image|mimes:jpg,png|max:2048|dimensions:min_width=772,min_height=250,max_width=772,max_height=250';
$validate_fields['banner_high'] = 'image|mimes:jpg,png|max:2048|dimensions:min_width=1544,min_height=500,max_width=1544,max_height=500';
$validate_fields['icon'] = 'image|mimes:jpg,png|max:2048|dimensions:min_width=128,min_height=128,max_width=256,max_height=256';
$validate_fields['installation']= 'required';
}
if( $extension->type == 'theme' ) {
$validate_fields['screenshot'] = 'image|mimes:jpg,png|max:2048|dimensions:min_width=1200,min_height=900,max_width=1200,max_height=900';
}
$validated = $request->validate( $validate_fields );
$manifest = [
'name' => $request->name,
'author' => $request->author,
'author_profile' => $request->author_profile,
'version' => $request->version,
'download_url' => $request->download_url,
'requires' => $request->requires,
'tested' => $request->tested,
'requires_php' => $request->requires_php,
'last_updated' => $request->last_updated,
'sections' => [
'description' => $request->description,
'installation' => $request->installation,
'changelog' => $request->changelog,
],
'banners' => [
'low' => isset( $extension->manifest['banners']['low'] ) ? $extension->manifest['banners']['low'] : '',
'high' => isset( $extension->manifest['banners']['high'] ) ? $extension->manifest['banners']['high'] : ''
],
'icons' => [
'default' => isset( $extension->manifest['icons']['default'] ) ? $extension->manifest['icons']['default'] : ''
]
];
$extension_url = url('/') . '/extensions-uploads/' . $extension->slug . '/';
if( $extension->type == 'plugin' ) {
$manifest['slug'] = $request->slug;
if( $request->banner_low ) {
$manifest['banners']['low'] = $this->uploadExtensionImage( $extension, $request->banner_low, 'banner-772x250' ) ? $extension_url . 'banner-772x250.' . $request->banner_low->getClientOriginalExtension() : '';
}
if( $request->banner_high ) {
$manifest['banners']['high'] = $this->uploadExtensionImage( $extension, $request->banner_high, 'banner-1544x500' ) ? $extension_url . 'banner-1544x500.' . $request->banner_high->getClientOriginalExtension() : '';
}
if( $request->icon ) {
$manifest['icons']['default'] = $this->uploadExtensionImage( $extension, $request->icon, 'icon-128x128' ) ? $extension_url . 'icon-128x128.' . $request->icon->getClientOriginalExtension() : '';
}
}
if( $extension->type == 'theme' ) {
$manifest['screenshot_url'] = isset( $extension->manifest['screenshot_url'] ) ? $extension->manifest['screenshot_url'] : '';
if( $request->screenshot ) {
$manifest['screenshot_url'] = $this->uploadExtensionImage( $extension, $request->screenshot, 'screenshot-1200x900' ) ? $extension_url . 'screenshot-1200x900.' . $request->screenshot->getClientOriginalExtension() : '';
}
}
$extension->manifest = $manifest;
if( ! $extension->save() ) {
return redirect()->back()->withErrors(['msg' => 'There was an error saving the extension\'s manifest. Please try again.']);
} else {
return redirect()->back()->with( 'message-success', 'Saved manifest!' );
}
}
public function publicExtensionData( Request $request ) {
$host_full = $request->userAgent();
$host = explode('; ', $host_full);
$host = $host[1];
$site_id = 0;
$get_site = Site::where('host', $host)->first();
if( ! $get_site ) {
$site = new Site;
$site->host = $host;
$site->host_full = $host_full;
$site->save();
$site_id = $site->id;
} else {
$site_id = $get_site->id;
}
$extension = Extension::where( 'slug', $request->slug )->first();
if( $extension ) {
$site_request = new SiteRequest;
$site_request->site_id = $site_id;
$site_request->extension_id = $extension->id;
$site_request->save();
}
if( $extension && $extension->manifest && File::exists( public_path( 'extensions-uploads/' . $extension->slug ) . '/' . $extension->slug . '.zip') ) {
return json_encode( $extension->manifest );
}
}
public function publicExtensionDescription( Request $request ) {
$extension = Extension::where( 'slug', $request->slug )->first();
return view('extensions.description')
->with('item', $extension)
->with('manifest', $extension->manifest);
}
function uploadExtensionFileForm( Extension $extension ) {
$destinationPath = public_path( 'extensions-uploads/' . $extension->slug );
return view('extensions.upload_extension_file')
->with('item', $extension)
->with('file', File::exists( $destinationPath . '/' . $extension->slug . '.zip') ? URL::to('/') . '/extensions-uploads/' . $extension->slug . '/' . $extension->slug . '.zip' : '' );
}
function uploadExtensionFile( Extension $extension, Request $request ) {
$validated = $request->validate([
'file' => 'required'
]);
$file = $request->file;
$errors = [];
if( $file->getClientOriginalExtension() != 'zip' ) {
$errors['extension'] = 'The extension file type needs to be ZIP. Any other file type is not permitted';
}
if( $errors ) {
return redirect()->back()->withErrors( $errors );
}
$destinationPath = public_path( 'extensions-uploads/' . $extension->slug );
if( File::exists( $destinationPath . '/' . $extension->slug . '.zip') ) {
$manifest = $extension->manifest;
File::move( $destinationPath . '/' . $extension->slug . '.zip', $destinationPath . '/' . $extension->slug . '-' . $manifest['version'] . '-' . date('Y-m-d-H-i-s') . ' .zip');
}
$file->move( $destinationPath, $extension->slug . '.zip' );
return redirect()->back()->with( 'message-success', 'Extension file saved!' );
}
function uploadExtensionImage( Extension $extension, $file, $file_type ) {
$destinationPath = public_path( 'extensions-uploads/' . $extension->slug );
$upload = $file->move( $destinationPath, $file_type . '.' . $file->getClientOriginalExtension() );
return $upload ? $file->getClientOriginalName() : null;
}
}
+60
View File
@@ -0,0 +1,60 @@
<?php
namespace App\Http\Controllers;
use App\Http\Requests\ProfileUpdateRequest;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Redirect;
use Illuminate\View\View;
class ProfileController extends Controller
{
/**
* Display the user's profile form.
*/
public function edit(Request $request): View
{
return view('profile.edit', [
'user' => $request->user(),
]);
}
/**
* Update the user's profile information.
*/
public function update(ProfileUpdateRequest $request): RedirectResponse
{
$request->user()->fill($request->validated());
if ($request->user()->isDirty('email')) {
$request->user()->email_verified_at = null;
}
$request->user()->save();
return Redirect::route('profile.edit')->with('status', 'profile-updated');
}
/**
* Delete the user's account.
*/
public function destroy(Request $request): RedirectResponse
{
$request->validateWithBag('userDeletion', [
'password' => ['required', 'current_password'],
]);
$user = $request->user();
Auth::logout();
$user->delete();
$request->session()->invalidate();
$request->session()->regenerateToken();
return Redirect::to('/');
}
}
+111
View File
@@ -0,0 +1,111 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Site;
use App\Models\SiteRequest;
class SiteRequestsController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$search_sites = SiteRequest::distinct()->get(['site_id']);
$search_terms = ['' => 'Click to search'];
foreach( $search_sites as $term ) {
$search_terms[ $term->site->host ] = $term->site->host;
}
return view('requests.list')
->with('items', SiteRequest::orderBy('created_at', 'desc')->take(20)->get())
->with('search_terms', $search_terms)
->with('search_data', [ 'site' => '', 'date_from' => '', 'date_to' => '' ]);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(string $id)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(string $id)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, string $id)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(string $id)
{
//
}
public function searchRequest( Request $request ) {
$where = [];
if( $request->site ) {
$site = Site::where('host', $request->site)->first();
if( $site ) {
$where[] = [ 'site_id', $site->id ];
}
}
if( $request->date_from ) {
$where[] = [ 'created_at', '>=', $request->date_from ];
}
if( $request->date_to ) {
$where[] = [ 'created_at', '<=', $request->date_to ];
}
$search_sites = SiteRequest::distinct()->get(['site_id']);
$search_terms = ['' => 'Click to search'];
foreach( $search_sites as $term ) {
$search_terms[ $term->site->host ] = $term->site->host;
}
return view('requests.list')
->with('items', SiteRequest::where( $where )->orderBy('created_at', 'desc')->get())
->with('search_terms', $search_terms)
->with('search_data', [ 'site' => $request->site, 'date_from' => $request->date_from, 'date_to' => $request->date_to ]);
}
}
+115
View File
@@ -0,0 +1,115 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use App\Models\User;
class UsersController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
return view('users.list')
->with('items', User::get());
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
return view('users.create_edit')
->with('item', new User);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
$validated = $request->validate([
'name' => 'required|max:255',
'email' => 'required|unique:users|email:rfc,dns|max:255',
'password' => 'required|confirmed|min:6|max:255'
]);
$user = new User;
$user->name = $request->name;
$user->email = $request->email;
$user->password = Hash::make($request->password);
if( ! $user->save() ) {
return redirect()->back()->withErrors(['msg' => 'There was an error adding the user. Please try again.']);
} else {
return redirect( route('users.list') );
}
}
/**
* Display the specified resource.
*/
public function show(string $id)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(Request $request, User $user)
{
return view('users.create_edit')
->with('item', $user);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, string $id)
{
$validate_fields = [
'name' => 'required|max:255',
'email' => 'required|unique:users,email,' . $id . '|max:255',
];
if( $request->password ) {
$validate_fields['password'] = 'required|confirmed|min:6|max:255';
}
$validated = $request->validate( $validate_fields );
$user = User::where('id', $id)->first();
$user->name = $request->name;
$user->email = $request->email;
if( $request->password ) {
$user->password = Hash::make($request->password);
}
if( ! $user->save() ) {
return redirect()->back()->withErrors(['msg' => 'There was an error saving the user. Please try again.']);
} else {
return redirect( route('users.list') )->with( 'message-success', 'Saved!' );
}
}
/**
* Remove the specified resource from storage.
*/
public function destroy(string $id)
{
$user = User::where('id', $id)->first();
$user->delete();
return redirect()->route('users.list')->with( 'message-success', 'Deleted!' );
}
}
+85
View File
@@ -0,0 +1,85 @@
<?php
namespace App\Http\Requests\Auth;
use Illuminate\Auth\Events\Lockout;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\Str;
use Illuminate\Validation\ValidationException;
class LoginRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\Rule|array|string>
*/
public function rules(): array
{
return [
'email' => ['required', 'string', 'email'],
'password' => ['required', 'string'],
];
}
/**
* Attempt to authenticate the request's credentials.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function authenticate(): void
{
$this->ensureIsNotRateLimited();
if (! Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) {
RateLimiter::hit($this->throttleKey());
throw ValidationException::withMessages([
'email' => trans('auth.failed'),
]);
}
RateLimiter::clear($this->throttleKey());
}
/**
* Ensure the login request is not rate limited.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function ensureIsNotRateLimited(): void
{
if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
return;
}
event(new Lockout($this));
$seconds = RateLimiter::availableIn($this->throttleKey());
throw ValidationException::withMessages([
'email' => trans('auth.throttle', [
'seconds' => $seconds,
'minutes' => ceil($seconds / 60),
]),
]);
}
/**
* Get the rate limiting throttle key for the request.
*/
public function throttleKey(): string
{
return Str::transliterate(Str::lower($this->input('email')).'|'.$this->ip());
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Http\Requests;
use App\Models\User;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class ProfileUpdateRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\Rule|array|string>
*/
public function rules(): array
{
return [
'name' => ['string', 'max:255'],
'email' => ['email', 'max:255', Rule::unique(User::class)->ignore($this->user()->id)],
];
}
}
+16
View File
@@ -0,0 +1,16 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Extension extends Model
{
use HasFactory;
protected $casts = [
'manifest' => 'array'
];
}
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Site extends Model
{
use HasFactory;
public function requests()
{
return $this->hasMany(SiteRequest::class);
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class SiteRequest extends Model
{
use HasFactory;
// protected $table = 'site_requests';
public function site()
{
return $this->belongsTo(Site::class);
}
public function extension()
{
return $this->belongsTo(Extension::class);
}
}
+45
View File
@@ -0,0 +1,45 @@
<?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;
use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable
{
use HasApiTokens, HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Providers;
use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});
}
}
+39
View File
@@ -0,0 +1,39 @@
<?php
namespace App\Services;
use Illuminate\Http\Request;
use App\Models\Extension;
class UtilityService {
public function generate_unique_value( Request $request, $try = 0 ) {
switch( $request->type ) {
case 'extension-slug':
$string = $request->slug;
if( ! $string ) {
$string = $request->title;
}
if( $try > 0 ) {
$string .= '-' . strval( $try );
}
$slug = strtolower( str_replace( ' ', '-', preg_replace( "/[^A-Za-z0-9- ]/", '', $string ) ) );
$extension = Extension::where( 'slug', $slug )->first();
return ! $extension ? $slug : $this->generate_unique_value( $request, ($try + 1) );
break;
}
return $string;
}
}
?>
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace App\View\Components;
use Illuminate\View\Component;
use Illuminate\View\View;
class AppLayout extends Component
{
/**
* Get the view / contents that represents the component.
*/
public function render(): View
{
return view('layouts.app');
}
}
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace App\View\Components;
use Illuminate\View\Component;
use Illuminate\View\View;
class GuestLayout extends Component
{
/**
* Get the view / contents that represents the component.
*/
public function render(): View
{
return view('layouts.guest');
}
}
Executable
+53
View File
@@ -0,0 +1,53 @@
#!/usr/bin/env php
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any of our classes manually. It's great to relax.
|
*/
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$status = $kernel->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
new Symfony\Component\Console\Output\ConsoleOutput
);
/*
|--------------------------------------------------------------------------
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running, we will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
*/
$kernel->terminate($input, $status);
exit($status);
+20
View File
@@ -0,0 +1,20 @@
<?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',
api: __DIR__.'/../routes/api.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware): void {
$middleware->redirectGuestsTo(fn () => route('login'));
$middleware->redirectUsersTo('/dashboard');
})
->withExceptions(function (Exceptions $exceptions): void {
//
})->create();
+2
View File
@@ -0,0 +1,2 @@
*
!.gitignore
Executable
+29
View File
@@ -0,0 +1,29 @@
# Change log
## 1.0.2 - 13.09.2023
- Added extensions icon and banners
- Added conditional to return extension manifest only if the extension file exists
- Small fixes and changes
- Styled various components
### Fixed
- Extension name when it is uploaded
## 1.0.1 - 09.09.2023
### Added
- Changelog
- hosts_full migration and database table to keep the entire host that is calling the server from remote sites.
- /public/extensions-uploads added to .gitignore
### Changed
- README.md
- The way old extensions zip files are being stored. Introduced the use of the old version in the filename.
## 1.0.0 - 07.09.2023
### Initial release
Executable
+65
View File
@@ -0,0 +1,65 @@
{
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": "^8.3",
"guzzlehttp/guzzle": "^7.2",
"laravel/breeze": "^2.0",
"laravel/framework": "^13.0",
"laravel/sanctum": "^4.0",
"laravel/tinker": "^3.0"
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel/pint": "^1.27",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.6",
"phpunit/phpunit": "^12.0"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "stable",
"prefer-stable": true
}
Generated
+8331
View File
File diff suppressed because it is too large Load Diff
Executable
+184
View File
@@ -0,0 +1,184 @@
<?php
use Illuminate\Support\Facades\Facade;
use Illuminate\Support\ServiceProvider;
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
|
*/
'name' => env('APP_NAME', 'Laravel'),
/*
|--------------------------------------------------------------------------
| 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
| your application so that it is used when running Artisan tasks.
|
*/
'url' => env('APP_URL', 'http://localhost'),
'asset_url' => env('ASSET_URL'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => 'en',
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/
'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Faker Locale
|--------------------------------------------------------------------------
|
| This locale will be used by the Faker PHP library when generating fake
| data for your database seeds. For example, this will be used to get
| localized telephone numbers, street address information and more.
|
*/
'faker_locale' => 'en_US',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
| 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' => 'file',
// 'store' => 'redis',
],
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
|
*/
'providers' => ServiceProvider::defaultProviders()->merge([
/*
* Package Service Providers...
*/
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
])->toArray(),
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => Facade::defaultAliases()->merge([
// 'Example' => App\Facades\Example::class,
])->toArray(),
];
+115
View File
@@ -0,0 +1,115 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Models\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| 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' => 'password_reset_tokens',
'expire' => 60,
'throttle' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| times out and the user is prompted to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => 10800,
];
+71
View File
@@ -0,0 +1,71 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "ably", "redis", "log", "null"
|
*/
'default' => env('BROADCAST_DRIVER', 'null'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
'port' => env('PUSHER_PORT', 443),
'scheme' => env('PUSHER_SCHEME', 'https'),
'encrypted' => true,
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
],
'client_options' => [
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
],
],
'ably' => [
'driver' => 'ably',
'key' => env('ABLY_KEY'),
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];
+111
View File
@@ -0,0 +1,111 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used while
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
*/
'default' => env('CACHE_DRIVER', '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: "apc", "array", "database", "file",
| "memcached", "redis", "dynamodb", "octane", "null"
|
*/
'stores' => [
'apc' => [
'driver' => 'apc',
],
'array' => [
'driver' => 'array',
'serialize' => false,
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
'lock_connection' => null,
],
'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' => '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',
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing the APC, database, memcached, Redis, or 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(env('APP_NAME', 'laravel'), '_').'_cache_'),
];
+34
View File
@@ -0,0 +1,34 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/
'paths' => ['api/*', 'sanctum/csrf-cookie'],
'allowed_methods' => ['*'],
'allowed_origins' => ['*'],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => false,
];
+151
View File
@@ -0,0 +1,151 @@
<?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 all database work. Of course
| you may use many connections at once using the Database library.
|
*/
'default' => env('DB_CONNECTION', 'mysql'),
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
\Pdo\Mysql::ATTR_SSL_CA
]) : [],
],
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'search_path' => 'public',
'sslmode' => 'prefer',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'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 in the database.
|
*/
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| 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 APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
],
'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'),
],
'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'),
],
],
];
+76
View File
@@ -0,0 +1,76 @@
<?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. Just store away!
|
*/
'default' => env('FILESYSTEM_DISK', 'local'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
| been set up for each driver as an example of the required values.
|
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
'throw' => 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,
],
],
/*
|--------------------------------------------------------------------------
| 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'),
],
];
+52
View File
@@ -0,0 +1,52 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon", "argon2id"
|
*/
'driver' => 'bcrypt',
/*
|--------------------------------------------------------------------------
| Bcrypt Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Bcrypt algorithm. This will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
],
/*
|--------------------------------------------------------------------------
| Argon Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Argon algorithm. These will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'argon' => [
'memory' => 65536,
'threads' => 1,
'time' => 4,
],
];
+131
View File
@@ -0,0 +1,131 @@
<?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 gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
'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' => false,
],
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['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' => 14,
'replace_placeholders' => true,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'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,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
'processors' => [PsrLogMessageProcessor::class],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
'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'),
],
],
];
+125
View File
@@ -0,0 +1,125 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Mailer
|--------------------------------------------------------------------------
|
| This option controls the default mailer that is used to send any email
| messages sent by your application. Alternative mailers may be setup
| and used as needed; however, this mailer will be used by default.
|
*/
'default' => env('MAIL_MAILER', 'smtp'),
/*
|--------------------------------------------------------------------------
| 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 to be used while
| sending an e-mail. You will specify which one you are using for your
| mailers below. You are free to add additional mailers as required.
|
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
| "postmark", "log", "array", "failover"
|
*/
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'url' => env('MAIL_URL'),
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'local_domain' => env('MAIL_EHLO_DOMAIN'),
],
'ses' => [
'transport' => 'ses',
],
'mailgun' => [
'transport' => 'mailgun',
// 'client' => [
// 'timeout' => 5,
// ],
],
'postmark' => [
'transport' => 'postmark',
// 'client' => [
// 'timeout' => 5,
// ],
],
'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',
],
],
],
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails 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 e-mails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
/*
|--------------------------------------------------------------------------
| Markdown Mail Settings
|--------------------------------------------------------------------------
|
| If you are using Markdown based email rendering, you may configure your
| theme and component paths here, allowing you to customize the design
| of the emails. Or, you may simply stick with the Laravel defaults!
|
*/
'markdown' => [
'theme' => 'default',
'paths' => [
resource_path('views/vendor/mail'),
],
],
];
+109
View File
@@ -0,0 +1,109 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue API supports an assortment of back-ends via a single
| API, giving you convenient access to each back-end using the same
| syntax for every one. Here you may define a default connection.
|
*/
'default' => env('QUEUE_CONNECTION', 'sync'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection information for each server that
| is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more.
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 90,
'after_commit' => false,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'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' => 'default',
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'block_for' => null,
'after_commit' => false,
],
],
/*
|--------------------------------------------------------------------------
| 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', 'mysql'),
'table' => 'job_batches',
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control which database and table are used to store the jobs that
| have failed. You may change them to any database / table you wish.
|
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
];
+67
View File
@@ -0,0 +1,67 @@
<?php
use Laravel\Sanctum\Sanctum;
return [
/*
|--------------------------------------------------------------------------
| Stateful Domains
|--------------------------------------------------------------------------
|
| Requests from the following domains / hosts will receive stateful API
| authentication cookies. Typically, these should include your local
| and production domains which access your API via a frontend SPA.
|
*/
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
'%s%s',
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
Sanctum::currentApplicationUrlWithPort()
))),
/*
|--------------------------------------------------------------------------
| Sanctum Guards
|--------------------------------------------------------------------------
|
| This array contains the authentication guards that will be checked when
| Sanctum is trying to authenticate a request. If none of these guards
| are able to authenticate the request, Sanctum will use the bearer
| token that's present on an incoming request for authentication.
|
*/
'guard' => ['web'],
/*
|--------------------------------------------------------------------------
| Expiration Minutes
|--------------------------------------------------------------------------
|
| This value controls the number of minutes until an issued token will be
| considered expired. If this value is null, personal access tokens do
| not expire. This won't tweak the lifetime of first-party sessions.
|
*/
'expiration' => null,
/*
|--------------------------------------------------------------------------
| Sanctum Middleware
|--------------------------------------------------------------------------
|
| When authenticating your first-party SPA with Sanctum you may need to
| customize some of the middleware Sanctum uses while processing the
| request. You may change the middleware listed below as required.
|
*/
'middleware' => [
'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
],
];
+34
View File
@@ -0,0 +1,34 @@
<?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.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
'scheme' => 'https',
],
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
];
+201
View File
@@ -0,0 +1,201 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be used on
| requests. By default, we will use the lightweight native driver but
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "file", "cookie", "database", "apc",
| "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 immediately expire on the browser closing, set that option.
|
*/
'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => false,
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it is stored. All encryption will be run
| automatically by Laravel and you can use the Session like normal.
|
*/
'encrypt' => false,
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When using the native session driver, we need a location where session
| files may be stored. A default has been set for you but a different
| location may be specified. This is only needed for file sessions.
|
*/
'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 we
| should use to manage the sessions. Of course, a sensible default is
| provided for you; however, you are free to change this as needed.
|
*/
'table' => 'sessions',
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| While using one of the framework's cache driven session backends you may
| list a cache store that should be used for these sessions. This value
| must match with one of the application's configured cache "stores".
|
| Affects: "apc", "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 cookie used to identify a session
| instance by ID. The name specified here will get used every time a
| new session cookie is created by the framework for every driver.
|
*/
'cookie' => env(
'SESSION_COOKIE',
Str::slug(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 are free to change this when necessary.
|
*/
'path' => '/',
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| Here you may change the domain of the cookie used to identify a session
| in your application. This will determine which domains the cookie is
| available to in your application. A sensible default has been set.
|
*/
'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. You are free to modify this option if needed.
|
*/
'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" since this is a secure default value.
|
| Supported: "lax", "strict", "none", null
|
*/
'same_site' => 'lax',
];
+36
View File
@@ -0,0 +1,36 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| View Storage Paths
|--------------------------------------------------------------------------
|
| Most templating systems load templates from disk. Here you may specify
| an array of paths that should be checked for your views. Of course
| the usual Laravel view path has already been registered for you.
|
*/
'paths' => [
resource_path('views'),
],
/*
|--------------------------------------------------------------------------
| Compiled View Path
|--------------------------------------------------------------------------
|
| This option determines where all the compiled Blade templates will be
| stored for your application. Typically, this is within the storage
| directory. However, as usual, you are free to change this value.
|
*/
'compiled' => env(
'VIEW_COMPILED_PATH',
realpath(storage_path('framework/views'))
),
];
+42
View File
@@ -0,0 +1,42 @@
<?php
$posturl = 'https://www.bbzh.ch/wp-json/bbzhc/v1/ri';
$request = curl_init();
//$requestfield = urlencode("test");
$requestfield = json_encode( array(
'skipDownload' => false
) );
$headers = array(
'Content-type: application/json',
'Authorization: Basic ' . base64_encode('courses_timetable_import:YIEnsJxCqg&px32@gTi!8DP6')
// 'Content-Length: '.strlen($requestfield)
);
//$body = '{}';
//curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
//curl_setopt($ch, CURLOPT_POSTFIELDS,$body);
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//curl_setopt($request, CURLOPT_USERPWD, "flywheel:shut-rings");
curl_setopt($request, CURLOPT_URL, $posturl);
curl_setopt($request, CURLOPT_HTTPHEADER, $headers);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
// curl_setopt($request, CURLOPT_POST, 0);
// curl_setopt($request, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($request, CURLOPT_POST, 1);
curl_setopt($request, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($request, CURLOPT_POSTFIELDS, $requestfield);
$response = curl_exec($request);
var_dump($response);
ob_start();
var_dump($response);
$dump = ob_get_clean();
curl_close($request);
?>
+41
View File
@@ -0,0 +1,41 @@
<?php
$posturl = 'https://thebluffhouse.ch/wp-json/cdpi/v1/isi';
$request = curl_init();
//$requestfield = urlencode("test");
// $requestfield = json_encode( array(
// 'user' => 'cronjob',
// 'pass' => 'VTlWVlI1c3NSeVBxcUp4S0BjUm1WOXpX'
// ) );
$headers = array(
'Content-type: application/json',
'Authorization: Basic ' . base64_encode('cloudweb:theR@i21lix.ch')
// 'Content-Length: '.strlen($requestfield)
);
//$body = '{}';
//curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
//curl_setopt($ch, CURLOPT_POSTFIELDS,$body);
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//curl_setopt($request, CURLOPT_USERPWD, "flywheel:shut-rings");
curl_setopt($request, CURLOPT_URL, $posturl);
curl_setopt($request, CURLOPT_HTTPHEADER, $headers);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
curl_setopt($request, CURLOPT_POST, 0);
curl_setopt($request, CURLOPT_CUSTOMREQUEST, 'GET');
// curl_setopt($request, CURLOPT_POSTFIELDS, $requestfield);
$response = curl_exec($request);
var_dump($response);
ob_start();
var_dump($response);
$dump = ob_get_clean();
curl_close($request);
?>
+29
View File
@@ -0,0 +1,29 @@
<?php
$posturl = 'http://testwp.local/wp-json/gfdn/v1/rcj';
$request = curl_init();
//$requestfield = urlencode("test");
$requestfield = json_encode(array('job' => '0'));
$headers = array(
'Content-type: application/json',
'Content-Length: '.strlen($requestfield)
);
//curl_setopt($request, CURLOPT_USERPWD, "flywheel:shut-rings");
curl_setopt($request, CURLOPT_HTTPHEADER, $headers);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
curl_setopt($request, CURLOPT_URL, $posturl);
curl_setopt($request, CURLOPT_POST, 1);
curl_setopt($request, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($request, CURLOPT_POSTFIELDS, $requestfield);
$response = curl_exec($request);
var_dump(json_decode($response));
//mail('adriantudorachero@gmail.com', 'test bbzh cron', date('Y-m-d H:i:s'));
curl_close($request);
?>
+41
View File
@@ -0,0 +1,41 @@
<?php
$posturl = 'https://cloudwebdevel.wpengine.com/wp-json/gfdn/v1/rcj';
$request = curl_init();
//$requestfield = urlencode("test");
// $requestfield = json_encode(array('1' => '1'));
$headers = array(
'Content-type: application/json',
// 'Content-Length: '.strlen($requestfield)
);
//$body = '{}';
//curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
//curl_setopt($ch, CURLOPT_POSTFIELDS,$body);
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//curl_setopt($request, CURLOPT_USERPWD, "flywheel:shut-rings");
curl_setopt($request, CURLOPT_URL, $posturl);
curl_setopt($request, CURLOPT_HTTPHEADER, $headers);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
// curl_setopt($request, CURLOPT_POST, 0);
// curl_setopt($request, CURLOPT_CUSTOMREQUEST, "GET");
// curl_setopt($request, CURLOPT_POSTFIELDS, $requestfield);
$response = curl_exec($request);
ob_start();
var_dump($response);
$dump = ob_get_clean();
$file = fopen( '/home/thenextstep/public_html/cronjobs/log.log', 'w' );
fwrite( $file, 'cron job ran at ' . date('Y-m-d H:i:s') . '<br/>' . $dump );
fclose( $file );
// mail('adriantudorachero@gmail.com', 'test delay notif cron', date('Y-m-d H:i:s'));
curl_close($request);
?>
+27
View File
@@ -0,0 +1,27 @@
<?php
$posturl = 'https://www.halagchemie.ch/wp-json/halagchemie/v1/update-specs';
$request = curl_init();
$username = 'rest_user';
$password = '!EcQh1jQ&ChFbT%f7ESPK)EL';
$auth = base64_encode("$username:$password");
$headers = array(
'Authorization: Basic ' . $auth
);
curl_setopt($request, CURLOPT_URL, $posturl);
curl_setopt($request, CURLOPT_HTTPHEADER, $headers);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($request);
$response = $response ? json_decode( $response ) : 'null';
// mail( 'adriantudorachero@gmail.com', 'halag specs cron run', date("d.m.Y H:i:s") );
var_dump($response);
curl_close($request);
?>
+29
View File
@@ -0,0 +1,29 @@
<?php
$posturl = 'https://laebesruumstg.wpengine.com/wp-json/lmps/v1/ri';
$request = curl_init();
//$requestfield = urlencode("test");
$requestfield = json_encode(array('job' => '0'));
$headers = array(
'Content-type: application/json',
// 'Content-Length: ' . strlen($requestfield)
);
curl_setopt($request, CURLOPT_USERPWD, "adrian:test123");
curl_setopt($request, CURLOPT_HTTPHEADER, $headers);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
curl_setopt($request, CURLOPT_URL, $posturl);
// curl_setopt($request, CURLOPT_POST, 1);
// curl_setopt($request, CURLOPT_CUSTOMREQUEST, "POST");
// curl_setopt($request, CURLOPT_POSTFIELDS, $requestfield);
$response = curl_exec($request);
var_dump(json_decode($response));
//mail('adriantudorachero@gmail.com', 'test bbzh cron', date('Y-m-d H:i:s'));
curl_close($request);
?>
+93
View File
@@ -0,0 +1,93 @@
cron job ran at 2023-09-08 18:38:02<br/>string(1957) "<!DOCTYPE html>
<html>
<head>
<title>Site is not available</title>
</head>
<body>
<style>
@import url(//fonts.googleapis.com/css?family=Open+Sans:300);
body {
color: #000;
font-family: 'Open Sans Regular', Helvetica, Arial, sans-serif;
font-size: 16px;
font-weight: 300;
line-height: 1.2;
margin: 50px 25px;
}
h1 {
font-size: 72px;
color: #44BCC8;
font-weight: 300;
margin: 0;
padding: 0;
}
h2 {
font-weight: 300;
margin: 0;
padding: 0;
}
hr {
background: #DFDFDF;
height: 1px;
border: 0;
margin: 20px 0 30px;
}
a {
color: #44BCC8;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
p {
margin-bottom: 1em;
}
.logo {
font-size: 12px;
}
.logo img {
border: 0;
outline: none;
position: relative;
top: 7px;
padding-left: 5px;
}
</style>
<h1>Site is not available</h1>
<hr>
<p>
The domain name in the URL is not associated with any active site on the WP Engine platform.
</p>
<p>
If this is your site, please visit your <a href="https://my.wpengine.com">User Portal</a> to ensure that your
<a href="https://wpengine.com/support/add-domain-in-user-portal/">domain mapping</a> and DNS records are
configured correctly.
</p>
<p>
Still have questions? <a href="https://my.wpengine.com/support">Contact Us</a>.
</p>
<hr>
<p class="logo">
Hosted by <a href="http://www.wpengine.com"><img height="25px" src="logo.png"></a>
</p>
</body>
</html>"
+41
View File
@@ -0,0 +1,41 @@
<?php
$posturl = 'https://www.swissqualityhotels.com/wp-json/sqh-theme/v1/utscj';
$request = curl_init();
//$requestfield = urlencode("test");
$requestfield = json_encode( array(
// 'user' => 'cronjob',
// 'pass' => 'VTlWVlI1c3NSeVBxcUp4S0BjUm1WOXpX'
) );
$headers = array(
'Content-type: application/json',
'Authorization: Basic ' . base64_encode('cronjob:VTlWVlI1c3NSeVBxcUp4S0BjUm1WOXpX')
// 'Content-Length: '.strlen($requestfield)
);
//$body = '{}';
//curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
//curl_setopt($ch, CURLOPT_POSTFIELDS,$body);
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//curl_setopt($request, CURLOPT_USERPWD, "flywheel:shut-rings");
curl_setopt($request, CURLOPT_URL, $posturl);
curl_setopt($request, CURLOPT_HTTPHEADER, $headers);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
curl_setopt($request, CURLOPT_POST, 0);
// curl_setopt($request, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($request, CURLOPT_POSTFIELDS, $requestfield);
$response = curl_exec($request);
var_dump($response);
ob_start();
var_dump($response);
$dump = ob_get_clean();
curl_close($request);
?>
+1
View File
@@ -0,0 +1 @@
*.sqlite*
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* 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' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // 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,
]);
}
}
@@ -0,0 +1,32 @@
<?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();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
}
};
@@ -0,0 +1,28 @@
<?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('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('password_reset_tokens');
}
};
@@ -0,0 +1,32 @@
<?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('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('failed_jobs');
}
};
@@ -0,0 +1,33 @@
<?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('personal_access_tokens', function (Blueprint $table) {
$table->id();
$table->morphs('tokenable');
$table->string('name');
$table->string('token', 64)->unique();
$table->text('abilities')->nullable();
$table->timestamp('last_used_at')->nullable();
$table->timestamp('expires_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('personal_access_tokens');
}
};
@@ -0,0 +1,30 @@
<?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('extensions', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('slug');
$table->text('description')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('extensions');
}
};
@@ -0,0 +1,27 @@
<?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::table('extensions', function(Blueprint $table)
{
$table->string('type')->nullable()->after('slug');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};
@@ -0,0 +1,27 @@
<?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::table('extensions', function(Blueprint $table)
{
$table->text('manifest')->nullable()->after('description');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};
@@ -0,0 +1,28 @@
<?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('sites', function (Blueprint $table) {
$table->id();
$table->text('host');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sites');
}
};
@@ -0,0 +1,29 @@
<?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('site_requests', function (Blueprint $table) {
$table->id();
$table->integer('site_id')->index();
$table->integer('extension_id')->index();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('site_requests');
}
};
@@ -0,0 +1,27 @@
<?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::table('sites', function(Blueprint $table)
{
$table->text('host_full')->nullable()->after('host');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace Database\Seeders;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
// \App\Models\User::factory(10)->create();
// \App\Models\User::factory()->create([
// 'name' => 'Test User',
// 'email' => 'test@example.com',
// ]);
}
}
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
class FirstAdminSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('users')->insert([
'name' => 'Admin',
'email' => 'admin@admin.com',
'password' => Hash::make( 'password' ),
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s')
]);
}
}
+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -euo pipefail
APP_DIR="${APP_DIR:-/home/production/migrationking/wp-up-srv}"
BRANCH="${BRANCH:-main}"
COMPOSE="docker compose -f docker-compose.prod.yml"
cd "$APP_DIR"
echo "==> Fetching latest code"
git fetch origin "$BRANCH"
git reset --hard "origin/$BRANCH"
echo "==> Building images"
$COMPOSE build
echo "==> Starting stack"
$COMPOSE up -d
echo "==> Migrating"
$COMPOSE exec -T app php artisan migrate --force
echo "==> Clearing caches"
$COMPOSE exec -T app php artisan optimize:clear
echo "==> Healthcheck"
for i in $(seq 1 10); do
if curl -fsS https://wp-up-srv.migrationking.com/up >/dev/null; then
echo "Healthy"
exit 0
fi
sleep 3
done
echo "Healthcheck FAILED"
exit 1
+98
View File
@@ -0,0 +1,98 @@
name: cgen-wp-ext-srv-local
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: cgen-wp-ext-srv-local-app
restart: unless-stopped
working_dir: /var/www/html
depends_on:
mysql:
condition: service_healthy
volumes:
- .:/var/www/html
- .env:/var/www/html/.env:ro
- extensions-uploads:/var/www/html/public/extensions-uploads
- update-plugins:/var/www/html/public/update-plugins
- storage-framework:/var/www/html/storage/framework
networks:
- cgen
expose:
- "9000"
web:
image: nginx:alpine
container_name: cgen-wp-ext-srv-local-web
restart: unless-stopped
depends_on:
- app
ports:
- "8090:80"
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./public:/var/www/html/public:ro
- extensions-uploads:/var/www/html/public/extensions-uploads:ro
- update-plugins:/var/www/html/public/update-plugins:ro
networks:
- cgen
mysql:
image: mysql:8
container_name: cgen-wp-ext-srv-local-mysql
restart: unless-stopped
environment:
MYSQL_DATABASE: ${DB_DATABASE:-cgen-wp-ext-srv}
MYSQL_USER: ${DB_USERNAME:-cgen-wp-ext-srv}
MYSQL_PASSWORD: ${DB_PASSWORD:-cgen_dev_pass}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-cgen_root_pass}
ports:
- "3310:3306"
volumes:
- dbdata:/var/lib/mysql
- ./docker/mysql/initdb:/docker-entrypoint-initdb.d:ro
networks:
- cgen
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-p${DB_ROOT_PASSWORD:-cgen_root_pass}"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
mailpit:
image: axllent/mailpit:latest
container_name: cgen-wp-ext-srv-local-mailpit
restart: unless-stopped
ports:
- "8026:8025"
networks:
- cgen
phpmyadmin:
image: phpmyadmin:latest
container_name: cgen-wp-ext-srv-local-phpmyadmin
restart: unless-stopped
depends_on:
- mysql
environment:
PMA_HOST: mysql
PMA_PORT: 3306
PMA_USER: ${DB_USERNAME:-cgen-wp-ext-srv}
PMA_PASSWORD: ${DB_PASSWORD:-cgen_dev_pass}
UPLOAD_LIMIT: 512M
ports:
- "8082:80"
networks:
- cgen
volumes:
dbdata:
extensions-uploads:
update-plugins:
storage-framework:
networks:
cgen:
driver: bridge
+79
View File
@@ -0,0 +1,79 @@
name: wp-up-srv
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: wp-up-srv-app
restart: unless-stopped
working_dir: /var/www/html
depends_on:
mysql:
condition: service_healthy
env_file:
- .env
volumes:
- extensions-uploads:/var/www/html/public/extensions-uploads
- update-plugins:/var/www/html/public/update-plugins
- storage-framework:/var/www/html/storage/framework
networks:
- internal
expose:
- "9000"
web:
image: nginx:alpine
container_name: wp-up-srv-web
restart: unless-stopped
depends_on:
- app
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./public:/var/www/html/public:ro
- extensions-uploads:/var/www/html/public/extensions-uploads:ro
- update-plugins:/var/www/html/public/update-plugins:ro
networks:
- internal
- proxy
labels:
- traefik.enable=true
- traefik.http.routers.wp-up-srv.rule=Host(`wp-up-srv.migrationking.com`)
- traefik.http.routers.wp-up-srv.entrypoints=websecure
- traefik.http.routers.wp-up-srv.tls.certresolver=le
- traefik.http.services.wp-up-srv.loadbalancer.server.port=80
mysql:
image: mysql:8
container_name: wp-up-srv-mysql
restart: unless-stopped
env_file:
- .env
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
volumes:
- dbdata:/var/lib/mysql
- ./docker/mysql/initdb:/docker-entrypoint-initdb.d:ro
networks:
- internal
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-p${DB_ROOT_PASSWORD}"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
volumes:
dbdata:
extensions-uploads:
update-plugins:
storage-framework:
networks:
internal:
driver: bridge
proxy:
external: true
+95
View File
@@ -0,0 +1,95 @@
name: cgen-wp-ext-srv
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: cgen-wp-ext-srv-app
restart: unless-stopped
working_dir: /var/www/html
depends_on:
mysql:
condition: service_healthy
volumes:
- .env:/var/www/html/.env:ro
- extensions-uploads:/var/www/html/public/extensions-uploads
- update-plugins:/var/www/html/public/update-plugins
- storage-framework:/var/www/html/storage/framework
networks:
- cgen
expose:
- "9000"
web:
image: nginx:alpine
container_name: cgen-wp-ext-srv-web
restart: unless-stopped
depends_on:
- app
ports:
- "8090:80"
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./public:/var/www/html/public:ro
- extensions-uploads:/var/www/html/public/extensions-uploads:ro
- update-plugins:/var/www/html/public/update-plugins:ro
networks:
- cgen
mysql:
image: mysql:8
container_name: cgen-wp-ext-srv-mysql
restart: unless-stopped
environment:
MYSQL_DATABASE: ${DB_DATABASE:-cgen-wp-ext-srv}
MYSQL_USER: ${DB_USERNAME:-cgen-wp-ext-srv}
MYSQL_PASSWORD: ${DB_PASSWORD:-cgen_dev_pass}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-cgen_root_pass}
volumes:
- dbdata:/var/lib/mysql
- ./docker/mysql/initdb:/docker-entrypoint-initdb.d:ro
networks:
- cgen
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-p${DB_ROOT_PASSWORD:-cgen_root_pass}"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
mailpit:
image: axllent/mailpit:latest
container_name: cgen-wp-ext-srv-mailpit
restart: unless-stopped
ports:
- "8026:8025"
networks:
- cgen
phpmyadmin:
image: phpmyadmin:latest
container_name: cgen-wp-ext-srv-phpmyadmin
restart: unless-stopped
depends_on:
- mysql
environment:
PMA_HOST: mysql
PMA_PORT: 3306
PMA_USER: ${DB_USERNAME:-cgen-wp-ext-srv}
PMA_PASSWORD: ${DB_PASSWORD:-cgen_dev_pass}
UPLOAD_LIMIT: 512M
ports:
- "8082:80"
networks:
- cgen
volumes:
dbdata:
extensions-uploads:
update-plugins:
storage-framework:
networks:
cgen:
driver: bridge
File diff suppressed because one or more lines are too long
+54
View File
@@ -0,0 +1,54 @@
# default.conf for cgen-wp-ext-srv (Laravel)
# Loaded from /etc/nginx/conf.d/default.conf by the official nginx image.
client_max_body_size 512M;
server {
listen 80;
server_name _;
root /var/www/html/public;
index index.php index.html;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
charset utf-8;
# Laravel asset build (prebuilt at /public/build)
location /build/ {
try_files $uri =404;
}
# Extension uploads served statically (named volume)
location /extensions-uploads/ {
alias /var/www/html/public/extensions-uploads/;
autoindex off;
try_files $uri =404;
}
# Legacy update plugins (named volume)
location /update-plugins/ {
alias /var/www/html/public/update-plugins/;
autoindex off;
try_files $uri =404;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass app:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
+7
View File
@@ -0,0 +1,7 @@
opcache.enable=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.validate_timestamps=1
opcache.revalidate_freq=2
opcache.fast_shutdown=1
+4
View File
@@ -0,0 +1,4 @@
upload_max_filesize=512M
post_max_size=512M
max_execution_time=300
memory_limit=512M
Generated Executable
+3038
View File
File diff suppressed because it is too large Load Diff
Executable
+29
View File
@@ -0,0 +1,29 @@
{
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@popperjs/core": "^2.11.6",
"@tailwindcss/forms": "^0.5.2",
"alpinejs": "^3.4.2",
"autoprefixer": "^10.4.2",
"axios": "^1.1.2",
"bootstrap": "^5.3.1",
"jquery": "^3.7.0",
"laravel-vite-plugin": "^0.8.0",
"lodash": "^4.17.21",
"postcss": "^8.4.6",
"sass": "^1.56.1",
"tailwindcss": "^3.1.0",
"vite": "^4.0.0"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.4.2",
"bootstrap-datepicker": "^1.10.0",
"js-loading-overlay": "^1.2.0",
"select2": "^4.1.0-rc.0"
}
}
Executable
+31
View File
@@ -0,0 +1,31 @@
<?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>tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory>tests/Feature</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>app</directory>
</include>
</source>
<php>
<env name="APP_ENV" value="testing"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_DRIVER" 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="TELESCOPE_ENABLED" value="false"/>
</php>
</phpunit>
+6
View File
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
+21
View File
@@ -0,0 +1,21 @@
<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}]
# 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>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File
+55
View File
@@ -0,0 +1,55 @@
<?php
use Illuminate\Contracts\Http\Kernel;
use Illuminate\Http\Request;
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Check If The Application Is Under Maintenance
|--------------------------------------------------------------------------
|
| If the application is in maintenance / demo mode via the "down" command
| we will load this file so that any pre-rendered content can be shown
| instead of starting the framework, which could cause an exception.
|
*/
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
require $maintenance;
}
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| this application. We just need to utilize it! We'll simply require it
| into the script here so we don't need to manually load our classes.
|
*/
require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request using
| the application's HTTP kernel. Then, we will send the response back
| to this client's browser, allowing them to enjoy our application.
|
*/
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Kernel::class);
$response = $kernel->handle(
$request = Request::capture()
)->send();
$kernel->terminate($request, $response);
+3
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
<svg width="160" height="187" xmlns="http://www.w3.org/2000/svg"><g fill="#0270D7" fill-rule="evenodd"><path fill-opacity=".24" d="M110.211 0l49.45 89.211-89.21 49.45L21 49.452z"/><path fill-opacity=".16" d="M33.812 171.385l-18.385 15.427L0 168.427 18.385 153z"/></g></svg>

After

Width:  |  Height:  |  Size: 273 B

+1
View File
@@ -0,0 +1 @@
<svg width="112" height="100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><filter x="-90%" y="-90%" width="280%" height="280%" filterUnits="objectBoundingBox" id="a"><feGaussianBlur stdDeviation="12" in="SourceGraphic"/></filter><linearGradient x1="99.316%" y1="21.974%" x2="0%" y2="69.777%" id="b"><stop stop-color="#2C3039" offset="0%"/><stop stop-color="#8A94A7" offset="48.131%"/><stop stop-color="#2C3039" offset="100%"/></linearGradient><linearGradient x1="49.892%" y1=".428%" x2="24.856%" y2="100%" id="d"><stop stop-color="#3B404C" offset="0%"/><stop stop-color="#333843" offset="100%"/></linearGradient><path d="M32.833 63.264c-14.9 1.866-25.108-6.384-22.797-18.428 2.31-12.043 16.264-23.319 31.166-25.184C56.103 17.786 66.31 26.036 64 38.08c-2.311 12.043-16.264 23.319-31.167 25.184z" id="c"/></defs><g fill="none" fill-rule="evenodd"><path fill="#0270D7" d="M35.521 6.938L12.04 35.843l48.939 16.136L84.46 23.073z"/><path fill="#02CBB1" d="M20 65.494L35.822 74 36 26.506 20.176 18z"/><g transform="translate(28 31)"><path fill-opacity=".48" fill="#1D2026" filter="url(#a)" d="M1 0h40v40H1z"/><path d="M11.261 54.752l-9.71-18.785C.096 33.152-.389 29.783.327 26.051 2.637 14.01 16.59 2.732 31.492.867 41.776-.42 49.824 3.11 53.065 9.38l9.71 18.785c-3.242-6.27-11.29-9.8-21.573-8.514C26.3 21.518 12.347 32.793 10.036 44.837c-.716 3.732-.23 7.1 1.225 9.915" fill="url(#b)"/><use fill="url(#d)" xlink:href="#c"/></g><path fill="#00BFFB" d="M22.991 85.677l.826-6.614L7.855 84.8l-.825 6.616z"/><path fill-opacity=".32" fill="#00BFFB" d="M106.721 46.737l4.408-2.801-13.699-6.737L93.022 40z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

+1
View File
@@ -0,0 +1 @@
<svg width="108" height="100" xmlns="http://www.w3.org/2000/svg"><defs><filter x="-90%" y="-90%" width="280%" height="280%" filterUnits="objectBoundingBox" id="a"><feGaussianBlur stdDeviation="12" in="SourceGraphic"/></filter><linearGradient x1="17.713%" y1="0%" x2="77.754%" y2="68.424%" id="b"><stop stop-color="#2C3039" offset="0%"/><stop stop-color="#8A94A7" offset="100%"/></linearGradient><linearGradient x1="49.892%" y1=".428%" x2="24.856%" y2="100%" id="c"><stop stop-color="#3B404C" offset="0%"/><stop stop-color="#333843" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path fill-opacity=".32" fill="#00BFFB" d="M31.292 84.984l1.313-5.055-14.613 4.415-1.313 5.056z"/><path d="M41.203 74.416L.222 46.516l30.541-21.314 23.908 16.277-11.69 10.84-1.706 22-.072.097z" fill="#0270D7"/><path fill="#00BFFB" d="M103.305 14.443l4.556-4.866-16.287-4.74-4.556 4.867z"/><path fill="#02CBB1" d="M56.9 77.244L54.771 92.89 94.416 77.84l2.128-15.648z"/><path fill-opacity=".48" fill="#1D2026" filter="url(#a)" d="M31.778 38.241h40v40h-40z" transform="translate(.222 -2.241)"/><path d="M88.023 31.352a2.962 2.962 0 0 0-1.296-1.359l-29.464-15.06a2.888 2.888 0 0 0-2.634.001L25.147 30.03a2.972 2.972 0 0 0-1.298 1.361l32.078 16.398 32.096-16.436z" fill="url(#b)" fill-rule="nonzero" transform="rotate(31 66.542 55.443)"/><path d="M43.266 11.908a3.154 3.154 0 0 0-.96.977L23.763 43.707c-.586.974-.605 2.174-.048 3.1l16.423 27.335c.228.379.543.693.917.917l20.09-33.39-17.878-29.76z" fill="#2C3039" fill-rule="nonzero"/><path d="M38.935 50.59v38.956a3.04 3.04 0 0 0 1.35-.3L70.47 74.263a2.994 2.994 0 0 0 1.67-2.697V35.608a2.98 2.98 0 0 0-.342-1.33L38.935 50.59z" fill="url(#c)" transform="rotate(31 66.143 86.153)"/></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

+1
View File
@@ -0,0 +1 @@
<svg width="103" height="100" xmlns="http://www.w3.org/2000/svg"><defs><filter x="-90%" y="-90%" width="280%" height="280%" filterUnits="objectBoundingBox" id="a"><feGaussianBlur stdDeviation="12" in="SourceGraphic"/></filter><linearGradient x1="49.892%" y1=".428%" x2="24.856%" y2="100%" id="b"><stop stop-color="#3B404C" offset="0%"/><stop stop-color="#333843" offset="100%"/></linearGradient><linearGradient x1="17.713%" y1="0%" x2="77.754%" y2="68.424%" id="c"><stop stop-color="#2C3039" offset="0%"/><stop stop-color="#8A94A7" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M48.028 64.452L.086 77.076l3.95-37.033 27.97-7.364c.1 3.076.27 8.387.512 15.934l15.485 15.72.025.119z" fill="#0270D7"/><path fill="#02CBB1" d="M91.767 72.042l2.455-13.396L58.895 70.67 56.44 84.067z"/><path fill="#00BFFB" d="M40.783 98.37l6.378-1.937-11.735-12.248-6.379 1.937z"/><path fill-opacity=".32" fill="#00BFFB" d="M23.783 14.37l6.378-1.937L18.426.185l-6.379 1.937z"/><path fill-opacity=".48" fill="#1D2026" filter="url(#a)" d="M50 43h40v40H50z" transform="translate(-16 -12)"/><path d="M51.759 16.34a.94.94 0 0 1 .922.399l23.35 40.193c.096.151.143.35.143.545-.001.629-.481 1.21-1.067 1.292l-46.872 6.553a.909.909 0 0 1-.527-.081c-.507-.237-.688-.912-.39-1.5L50.84 16.996c.076-.134.183-.262.307-.372.19-.16.403-.255.612-.283" fill="url(#b)" transform="rotate(27 42.978 77.641)"/><path d="M25.338.52c-.01-.006-.022-.01-.033-.017a.893.893 0 0 0-.174-.066c-.01-.002-.022.001-.034-.001a.925.925 0 0 0-.346-.018 1.064 1.064 0 0 0-.315.096l-.004.001c-.06.03-.12.064-.178.105a1.172 1.172 0 0 0-.107.083l-.008.008a1.495 1.495 0 0 0-.295.368L.616 48.344a1.469 1.469 0 0 0-.064.148c-.02.057-.02.113-.033.171-.012.058-.028.116-.033.174-.007.084.002.164.012.246.007.052.006.106.02.156a.99.99 0 0 0 .103.233c.02.037.031.08.056.113a.877.877 0 0 0 .28.25l26.938 14.927a.868.868 0 0 1-.28-.252c-.024-.034-.037-.076-.057-.113-.04-.075-.08-.15-.103-.232-.013-.051-.013-.104-.02-.156-.01-.082-.02-.163-.012-.248.005-.058.021-.115.033-.173.024-.107.046-.216.097-.32L50.78 16.006c.076-.136.18-.265.304-.376.091-.08.19-.142.289-.19a.96.96 0 0 1 .662-.078.95.95 0 0 1 .24.084L25.337.52z" transform="rotate(27 42.028 77.95)" fill="url(#c)" fill-rule="nonzero"/></g></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

+1
View File
@@ -0,0 +1 @@
<svg width="98" height="100" xmlns="http://www.w3.org/2000/svg"><defs><filter x="-90%" y="-90%" width="280%" height="280%" filterUnits="objectBoundingBox" id="a"><feGaussianBlur stdDeviation="12" in="SourceGraphic"/></filter><linearGradient x1="49.892%" y1=".428%" x2="24.856%" y2="100%" id="b"><stop stop-color="#3B404C" offset="0%"/><stop stop-color="#333843" offset="100%"/></linearGradient><linearGradient x1="17.713%" y1="0%" x2="77.754%" y2="68.424%" id="c"><stop stop-color="#2C3039" offset="0%"/><stop stop-color="#8A94A7" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M49.028 61.452L1.086 74.076l3.95-37.033 27.97-7.364c.1 3.076.27 8.387.512 15.934l15.485 15.72.025.119z" fill="#0270D7"/><path fill-opacity=".32" fill="#00BFFB" d="M23.725 84.328l-5.66 3.52 14.505 8.794 5.66-3.522z"/><path fill="#02CBB1" d="M89.345 72.466l-1.72-15.697L52.8 80.964l1.72 15.698z"/><path fill-opacity=".48" fill="#1D2026" filter="url(#a)" d="M44 41h40v40H44z" transform="translate(-15 -10)"/><path fill="url(#b)" d="M37.841 71.977L0 54.169 37.231 0z" transform="rotate(-36 55.277 18.264)"/><path fill="url(#c)" fill-rule="nonzero" transform="scale(-1 1) rotate(36 .538 -153.515)" d="M73.788 71.977L37.229 54 74.4 0z"/><path fill-opacity=".32" fill="#00BFFB" d="M58.57 10.221l-1.048 5.117 14.362-5.174 1.047-5.118z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

+1
View File
@@ -0,0 +1 @@
<svg width="98" height="100" xmlns="http://www.w3.org/2000/svg"><defs><filter x="-90%" y="-90%" width="280%" height="280%" filterUnits="objectBoundingBox" id="a"><feGaussianBlur stdDeviation="12" in="SourceGraphic"/></filter><linearGradient x1="7.786%" y1="0%" x2="90.938%" y2="49.407%" id="b"><stop stop-color="#2C3039" offset="0%"/><stop stop-color="#8A94A7" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path fill-opacity=".48" fill="#1D2026" filter="url(#a)" d="M38 48h40v40H38z" transform="translate(-9 -17)"/><path fill="#02CBB1" d="M86.755 88.926l3.46-15.26-39.363 10.387-3.459 15.261z"/><path fill="#0270D7" d="M90.735 53.81l7.137-28.53-77.08 20.354-7.137 28.533z"/><path fill-opacity=".32" fill="#00BFFB" d="M77.35 14.62l6.442-1.712-11.3-12.65-6.443 1.713z"/><path fill="#474C59" d="M46.63 33.718L28.384 61.923l43.659 19.72 18.244-28.206z"/><path fill="#00BFFB" d="M29.746 92.298l3.792-3.59-14.732-4-3.793 3.59z"/><path fill="#2C3039" fill-rule="nonzero" d="M17.685 36.372l10.7 25.55 18.339-28.026L35.015 8.122z"/><path fill="url(#b)" fill-rule="nonzero" d="M49.401 21.254L1.988 27.601l23.588 15.653 47.412-6.346z" transform="rotate(32 52.468 75.451)"/></g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

+1
View File
@@ -0,0 +1 @@
<svg width="115" height="100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><filter x="-90%" y="-90%" width="280%" height="280%" filterUnits="objectBoundingBox" id="a"><feGaussianBlur stdDeviation="12" in="SourceGraphic"/></filter><path id="b" d="M0 .856h63.533v59.675H0z"/><linearGradient x1="56.146%" y1="10.87%" x2="25.695%" y2="72.649%" id="c"><stop stop-color="#2C3039" offset="0%"/><stop stop-color="#8A94A7" offset="48.131%"/><stop stop-color="#2C3039" offset="100%"/></linearGradient><path id="e" d="M.062.344h40.511v44.1H.062z"/><linearGradient x1="49.892%" y1=".428%" x2="24.856%" y2="100%" id="f"><stop stop-color="#3B404C" offset="0%"/><stop stop-color="#333843" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path fill="#0270D7" d="M23.302 63.083L.112 44.995l73.273-31.416 23.19 18.091z"/><path fill="#00BFFB" d="M35.902 83.663l1.17-6.562-16.24 4.895-1.17 6.563z"/><path fill-opacity=".32" fill="#00BFFB" d="M41.972 92.478l-2.962 3.376 11.56 2.714 2.961-3.376z"/><path fill-opacity=".48" fill="#1D2026" filter="url(#a)" d="M36.056 33.707h40v40h-40z" transform="rotate(16 55.276 48.942)"/><g transform="rotate(16 -28.89 116.929)"><mask id="d" fill="#fff"><use xlink:href="#b"/></mask><path d="M32.628 40.394c.06-.485.116-.972.204-1.45.055-.295.135-.583.2-.874.096-.427.181-.856.296-1.276.084-.303.192-.596.286-.894.128-.401.246-.808.393-1.202.05-.141.113-.275.169-.414.195-.5.4-.997.624-1.483.103-.22.214-.434.322-.65a28.007 28.007 0 0 1 2.005-3.412c.07-.1.15-.192.219-.29.448-.622.922-1.222 1.418-1.801.172-.198.347-.391.523-.584.464-.508.946-.993 1.444-1.46.175-.162.343-.334.522-.493.13-.113.263-.22.392-.332a25.56 25.56 0 0 1 1.147-.91c.146-.11.291-.22.44-.325.356-.254.723-.49 1.093-.723.212-.134.42-.276.637-.402.428-.252.868-.48 1.311-.702.157-.08.307-.169.465-.244a22.326 22.326 0 0 1 1.727-.721c.162-.06.326-.111.49-.168.45-.155.905-.293 1.366-.417.178-.047.354-.097.532-.14a20.012 20.012 0 0 1 1.862-.362 18.96 18.96 0 0 1 1.675-.155c.175-.01.347-.008.52-.013.382-.008.76-.008 1.134.005a17.935 17.935 0 0 1 1.654.144c.174.022.347.042.518.07.44.071.874.161 1.301.266.075.019.154.03.229.05.508.132 1.003.29 1.49.467.143.05.28.11.42.166.347.136.691.282 1.025.44.288.135.575.268.852.419L31.118 2.89a18.16 18.16 0 0 0-.619-.319c-.075-.038-.156-.065-.233-.1-.337-.16-.68-.305-1.028-.442-.14-.055-.276-.115-.417-.165-.49-.176-.985-.335-1.493-.466l-.03-.01c-.063-.016-.13-.024-.192-.04-.43-.105-.865-.195-1.307-.267-.17-.027-.344-.047-.518-.07a17.934 17.934 0 0 0-1.654-.144 17.699 17.699 0 0 0-1.133-.004c-.174.004-.346.003-.52.012-.554.03-1.112.076-1.678.155a20.56 20.56 0 0 0-1.86.364c-.178.04-.355.09-.532.139-.46.122-.917.262-1.368.417-.162.055-.326.106-.488.168-.566.209-1.126.436-1.674.694l-.054.027c-.155.074-.304.162-.458.24a22.56 22.56 0 0 0-1.318.705c-.215.127-.421.268-.633.401-.276.174-.558.338-.826.524-.093.064-.181.135-.272.2-.148.106-.293.217-.438.325-.39.291-.77.594-1.145.91-.132.112-.264.219-.394.333-.065.058-.136.11-.2.169-.113.102-.21.22-.32.324-.5.465-.982.952-1.445 1.46-.097.106-.208.197-.303.304-.079.09-.143.19-.22.281a26.06 26.06 0 0 0-1.42 1.8c-.057.08-.125.152-.182.233-.013.018-.023.038-.036.057a26.58 26.58 0 0 0-1.459 2.366c-.047.087-.108.167-.156.253-.138.26-.26.528-.391.792-.107.217-.218.43-.32.65-.225.485-.43.98-.625 1.481-.054.14-.118.276-.17.417l-.029.07c-.135.368-.242.749-.361 1.126-.094.3-.204.594-.287.899-.119.425-.204.859-.3 1.29-.065.287-.143.57-.197.86-.09.484-.145.974-.205 1.463-.03.247-.08.488-.102.734-.07.74-.107 1.485-.108 2.233-.014 7.778 3.736 14.079 9.395 17.158L41.813 60.53c-5.66-3.08-9.41-9.38-9.395-17.156.001-.75.037-1.495.107-2.235.024-.25.072-.496.103-.746" fill="url(#c)" mask="url(#d)"/></g><g transform="rotate(16 -109.581 222.973)"><mask id="g" fill="#fff"><use xlink:href="#e"/></mask><path d="M20.358.531C31.545-1.04 40.595 7.473 40.574 19.548c-.023 12.075-9.11 23.137-20.297 24.71C9.09 45.83.04 37.316.062 25.24.084 13.166 9.172 2.103 20.358.531" fill="url(#f)" mask="url(#g)"/></g><path fill="#02CBB1" d="M114.324 47.62l-10.196-8.59-7.761 33.025 10.197 8.59z"/></g></svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 4.9 KiB

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