Compare commits

...

31 Commits

Author SHA1 Message Date
21683284b0 favicon 2026-03-27 00:54:57 +01:00
fa74c4834f CSS 2026-03-27 00:46:32 +01:00
edfb2583fc Copyright :3 - Our Services ☭ 2026-03-27 00:24:38 +01:00
e6a92213ea CSS fix 2026-03-26 23:54:38 +01:00
9bbe92d8ee CSS 2026-03-26 23:49:58 +01:00
f3cb4c2a5f Merge branch 'develop' of ssh://git.chaospott.de:2222/c3gov/website into develop 2026-03-26 23:49:10 +01:00
0c2a439363 new lines 2026-03-26 23:39:17 +01:00
75f934028b Text für Dienstleistungen erstellt. Englisch und Deutsch. Begrifflichkeiten ersetzt 2026-03-26 23:34:58 +01:00
ff25a01b8f the real ' 2026-03-26 21:42:13 +01:00
79414e3d4a Bescheide 2026-03-26 20:09:54 +01:00
351c73778a Neuigkeiten/News/Blog-Editing und Bugfixes 2026-03-26 01:16:56 +01:00
b0d7b97c46 Dateien nach "public/Bilder" hochladen 2026-03-25 11:55:38 +00:00
2baa0dfccd Dateien nach "public/Bilder" hochladen 2026-03-25 11:55:19 +00:00
60ef833d0a Login-Sachen 2026-03-25 00:42:26 +01:00
91554516d3 php artisan app:generate-register-token 2026-03-25 00:14:58 +01:00
7bf444123d Besseres CSS; News 2026-03-25 00:02:08 +01:00
ae9592902c No bootstrap anymore! 2026-03-24 19:20:17 +01:00
8b39cb4dbc Jetzt beantragen! 2026-03-24 00:46:04 +01:00
87c7193686 Progress und aber auch Über uns 2026-03-24 00:33:53 +01:00
58472b28ca neues Submodule 2026-03-23 23:41:51 +01:00
122af4aa54 Hintergrundverwaltung und leere Hüllen; neuaufsetzen submodule 2026-03-23 23:40:20 +01:00
a2751d4776 Banner; unfertiges Register 2026-03-23 15:28:26 +01:00
baaf614a88 Force https on production 2026-03-23 14:59:38 +01:00
9bedccb738 css-Randomiser 2026-03-23 14:13:20 +01:00
efb3a8d813 Bootstrap 2026-03-23 14:06:17 +01:00
eff865587b nicht funktionierende Links 2026-03-23 00:15:23 +01:00
5158b61f56 German as default 2026-03-22 22:55:06 +01:00
d09bca6326 Mehr! 2026-03-22 22:44:58 +01:00
5a5b9f7227 First steps 2026-03-22 19:00:00 +01:00
54f6a1d235 New laravel project 2026-03-22 15:31:14 +01:00
b54e28050f test 2026-03-21 21:03:54 +01:00
114 changed files with 46936 additions and 1 deletions

5
.buildpath Normal file
View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path=""/>
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
</buildpath>

18
.editorconfig Normal file
View File

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

65
.env.example Normal file
View File

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

11
.gitattributes vendored Normal file
View File

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

24
.gitignore vendored Normal file
View File

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

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "public/Dokumente"]
path = public/Dokumente
url = ssh://git@git.chaospott.de:2222/c3gov/docs.git

2340
.phpstorm.meta.php Normal file

File diff suppressed because it is too large Load Diff

22
.project Normal file
View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>website</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.dltk.core.scriptbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.php.core.PHPNature</nature>
</natures>
</projectDescription>

View File

@@ -1,2 +1,58 @@
# c3gov website <p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
<p align="center">
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>
## About Laravel
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
Laravel is accessible, powerful, and provides tools required for large, robust applications.
## Learning Laravel
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
In addition, [Laracasts](https://laracasts.com) contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
You can also watch bite-sized lessons with real-world projects on [Laravel Learn](https://laravel.com/learn), where you will be guided through building a Laravel application from scratch while learning PHP fundamentals.
## Agentic Development
Laravel's predictable structure and conventions make it ideal for AI coding agents like Claude Code, Cursor, and GitHub Copilot. Install [Laravel Boost](https://laravel.com/docs/ai) to supercharge your AI workflow:
```bash
composer require laravel/boost --dev
php artisan boost:install
```
Boost provides your agent 15+ tools and skills that help agents build Laravel applications while following best practices.
## Contributing
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
## Code of Conduct
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
## Security Vulnerabilities
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
## License
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

28856
_ide_helper.php Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Console\Commands;
use App\Models\RegisterToken;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
use Nette\Utils\Random;
#[Signature('app:generate-register-token')]
#[Description('Generate a register token for the internal authentication platform.')]
class GenerateRegisterToken extends Command
{
/**
* Execute the console command.
*/
public function handle()
{
$newToken = Random::generate(12, "0-9A-Z");
try {
$rt = new RegisterToken;
$rt->token = $newToken;
$rt->save();
} catch (\ErrorException $e) {
$this->error($e->getMessage());
return 1;
}
$this->info("Register token generated: \n" . $newToken);
return 0;
}
}

View File

@@ -0,0 +1,75 @@
<?php
namespace App\Http\Controllers;
use App\Models\Blog;
use Illuminate\Database\QueryException;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Auth;
class BlogController extends Controller
{
public function addBlog(Request $request){
if(Auth::check()){
try {
$blog = new Blog();
$blog->published_by = Auth::user()->id;
$blog->language = $request->input('language');
$blog->title = $request->input('title');
$blog->body = $request->input('body');
$blog->published = "1";
$blog->created_at = now();
$blog->updated_at = now();
$blog->save();
return ['messageStatus' => 'success', 'errorMessage' => ''];
} catch (\Illuminate\Database\QueryException $e) {
return ['messageStatus' => 'danger', 'errorMessage' => $e->getMessage()];
}
}
abort(404);
}
public function editBlog(Request $request){
if(Auth::check()){
try {
$blog = Blog::find($request->input('id'));
$blog->title = $request->input('title');
$blog->body = $request->input('body');
$blog->language = $request->input('language');
$blog->published = $request->input('published');
$blog->published_by = Auth::user()->id;
$blog->save();
return ['messageStatus' => 'success', 'errorMessage' => ''];
} catch (\Illuminate\Database\QueryException $e) {
return ['messageStatus' => 'failure', 'errorMessage' => $e->getMessage()];
}
}
abort(404);
}
public function deleteBlog(Request $request){
if(Auth::check()){
try {
$blog = Blog::find($request->input('id'));
if ($blog) {
$blog->delete();
}
return ['messageStatus' => 'success', 'errorMessage' => ''];
} catch(\Exception $e){
return ['messageStatus' => 'failure', 'errorMessage' => $e->getMessage()];
}
}
abort(404);
}
public static function blogPaginated(){
return Blog::where('language', App::getLocale())->where('published', 1)->orderBy('id', 'desc')->paginate(5);
}
public static function blogPaginatedEdit(){
return Blog::orderBy('id', 'desc')->paginate(5);
}
}

View File

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

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Http\Controllers;
use App\Models\RegisterToken;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Log;
class LoginController extends Controller
{
//
public function register(Request $request){
// messageStatus success|failure|not permitted
$json = ["messageStatus" => "failure", "errorMessage" => "idk"];
$mail = $request->input('mail');
$username = $request->input('username');
$password = Hash::make($request->input('password'));
$token = $request->input('token');
if(preg_match('/@c3gov\.de$/', $mail) != 1){
return ["messageStatus" => "not permitted", "errorMessage" => ""];
}
$rt = RegisterToken::where('token', $token)->first();
if($rt) {
$u = User::whereEmail($mail)->first();
if($u) {
return ["messageStatus" => "failure", "errorMessage" => "Diese elektronische Postadresse wird bereits verwendet."];
}
try {
$u = new User();
$u->name = $username;
$u->email = $mail;
$u->email_verified_at = now();
$u->password = $password;
$u->save();
$rt->delete();
} catch (\Exception $e) {
return ["messageStatus" => "failure", "errorMessage" => $e->getMessage()];
}
} else {
return ["messageStatus" => "failure", "errorMessage" => "Machen Sie die Musik aus."];
}
return ["messageStatus" => "success", "errorMessage" => ""];
}
public function login(Request $request){
$mail = $request->input('mail');
$password = $request->input('password');
$u = User::whereEmail($mail)->first();
if($u){
$u_pw = $u->password;
if(Hash::check($password, $u_pw)){
Auth::login($u);
return ["messageStatus" => "success", "errorMessage" => ""];
} else {
return ["messageStatus" => "failure", "errorMessage" => "Falsch. Einfach nur falsch."];
}
} else {
return ["messageStatus" => "failure", "errorMessage" => "Falsch. Einfach nur falsch."];
}
}
}

View File

@@ -0,0 +1,59 @@
<?php
namespace App\Http\Controllers;
use App\Models\TickerMessages;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Auth;
class TickerController extends Controller
{
public function deleteTicker(Request $request){
if(Auth::check()){
$toDelete = $request->input('delete')[0];
try{
foreach($toDelete as $item){
$ticker = TickerMessages::find($item);
$ticker->delete();
}
return ["messageStatus" => "success", "errorMessage" => ""];
} catch(\Exception $e){
return ["messageStatus" => "failure", "errorMessage" => $e->getMessage()];
}
}
abort(404);
}
public function addTicker(Request $request){
if(Auth::check()){
$toAdd = $request->input('insert');
$lang = $request->input('lang');
try {
$ticker = new TickerMessages();
$ticker->message = $toAdd;
$ticker->language = $lang;
$ticker->save();
return ["messageStatus" => "success", "errorMessage" => ""];
} catch(\Exception $e){
return ["messageStatus" => "failure", "errorMessage" => $e->getMessage()];
}
}
abort(404);
}
public static function getTicker(){
$t = "";
foreach(TickerMessages::getMessages(App::getLocale())->get() as $message){
$t .= " -- $message->message";
}
if(!empty($t)){
$t .= " -- ";
}
return $t;
}
}

View File

@@ -0,0 +1,84 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Auth;
class WebsiteController extends Controller
{
public function __construct()
{
$this->setLang($_COOKIE['lang'] ?? 'de');
}
private function setLang($lang)
{
if (!in_array($lang, ['de', 'en'])) {
$lang = 'de';
}
App::setLocale($lang);
}
//
public function index(Request $request)
{
return view('content.index');
}
public function about(Request $request){
return view('content.about');
}
public function contact(Request $request){
return view('content.contact');
}
public function imprint(Request $request){
return view('content.imprint');
}
public function news(Request $request){
return view('content.news', ['blogs' => BlogController::blogPaginated(App::getLocale(), true)]);
}
public function services(Request $request){
return view('content.services');
}
public function apply(Request $request){
return view('application.apply');
}
// c3gov-Stuffs
public function showRegister()
{
return view('login.register');
}
public function showLogin()
{
return view('login.login');
}
public function editTicker(){
if(Auth::check()){
return view('ticker.edit');
}
abort(404);
}
public function editNews(){
if(Auth::check()){
return response()
->view('blog.edit', ['blogs' => BlogController::blogPaginatedEdit()])
->header('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
}
abort(404);
}
}

16
app/Models/Blog.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Blog extends Model
{
//
protected $table = 'blogs';
public function byUser(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo('App\Models\User', 'published_by', 'id');
}
}

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* @method static \Illuminate\Database\Eloquent\Builder<static>|RegisterToken newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|RegisterToken newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|RegisterToken query()
* @mixin \Eloquent
*/
class RegisterToken extends Model
{
protected $table = 'register_tokens';
protected $primaryKey = 'token';
public $incrementing = false;
public $timestamps = false;
}

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property string $language
* @property string $message
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder<static>|TickerMessages newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|TickerMessages newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|TickerMessages query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|TickerMessages whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|TickerMessages whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|TickerMessages whereLanguage($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|TickerMessages whereMessage($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|TickerMessages whereUpdatedAt($value)
* @mixin \Eloquent
*/
class TickerMessages extends Model
{
//
protected $table = 'ticker_messages';
protected $fillable = ['language', 'message'];
public static function getMessages($language){
return self::where('language', $language)->orderBy('updated_at', 'desc');
}
}

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

@@ -0,0 +1,57 @@
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Database\Factories\UserFactory;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Attributes\Hidden;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
/**
* @property int $id
* @property string $name
* @property string $email
* @property \Illuminate\Support\Carbon|null $email_verified_at
* @property string $password
* @property string|null $remember_token
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
* @property-read int|null $notifications_count
* @method static \Database\Factories\UserFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder<static>|User newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|User newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|User query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|User whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|User whereEmail($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|User whereEmailVerifiedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|User whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|User whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|User wherePassword($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|User whereRememberToken($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|User whereUpdatedAt($value)
* @mixin \Eloquent
*/
#[Fillable(['name', 'email', 'password'])]
#[Hidden(['password', 'remember_token'])]
class User extends Authenticatable
{
/** @use HasFactory<UserFactory> */
use HasFactory, Notifiable;
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}
}

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
//
if(config('app.env') === 'production') {
\URL::forceScheme('https');
}
}
}

18
artisan Executable file
View File

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

18
bootstrap/app.php Normal file
View File

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

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

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

7
bootstrap/providers.php Normal file
View File

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

90
composer.json Normal file
View File

@@ -0,0 +1,90 @@
{
"$schema": "https://getcomposer.org/schema.json",
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": [
"laravel",
"framework"
],
"license": "MIT",
"require": {
"php": "^8.3",
"laravel/framework": "^13.0",
"laravel/tinker": "^3.0"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^3.7",
"fakerphp/faker": "^1.23",
"laravel/pail": "^1.2.5",
"laravel/pint": "^1.27",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.6",
"pestphp/pest": "^4.4",
"pestphp/pest-plugin-laravel": "^4.1"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"setup": [
"composer install",
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
"@php artisan key:generate",
"@php artisan migrate --force",
"npm install",
"npm run build"
],
"dev": [
"Composer\\Config::disableProcessTimeout",
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1 --timeout=0\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite --kill-others"
],
"test": [
"@php artisan config:clear --ansi",
"@php artisan test"
],
"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",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi"
],
"pre-package-uninstall": [
"Illuminate\\Foundation\\ComposerScripts::prePackageUninstall"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "stable",
"prefer-stable": true
}

9399
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

126
config/app.php Normal file
View File

@@ -0,0 +1,126 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application, which will be used when the
| framework needs to place the application's name in a notification or
| other UI elements where an application name needs to be displayed.
|
*/
'name' => env('APP_NAME', '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
| the application so that it's available within Artisan commands.
|
*/
'url' => env('APP_URL', 'http://localhost'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. The timezone
| is set to "UTC" by default as it is suitable for most use cases.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by Laravel's translation / localization methods. This option can be
| set to any locale for which you plan to have translation strings.
|
*/
'locale' => env('APP_LOCALE', 'en'),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is utilized by Laravel's encryption services and should be set
| to a random, 32 character string to ensure that all encrypted values
| are secure. You should do this prior to deploying the application.
|
*/
'cipher' => 'AES-256-CBC',
'key' => env('APP_KEY'),
'previous_keys' => [
...array_filter(
explode(',', (string) env('APP_PREVIOUS_KEYS', ''))
),
],
/*
|--------------------------------------------------------------------------
| Maintenance Mode Driver
|--------------------------------------------------------------------------
|
| These configuration options determine the driver used to determine and
| manage Laravel's "maintenance mode" status. The "cache" driver will
| allow maintenance mode to be controlled across multiple machines.
|
| Supported drivers: "file", "cache"
|
*/
'maintenance' => [
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],
];

117
config/auth.php Normal file
View File

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

130
config/cache.php Normal file
View File

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

184
config/database.php Normal file
View File

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

80
config/filesystems.php Normal file
View File

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

132
config/logging.php Normal file
View File

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

118
config/mail.php Normal file
View File

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

129
config/queue.php Normal file
View File

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

38
config/services.php Normal file
View File

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

233
config/session.php Normal file
View File

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

1
database/.gitignore vendored Normal file
View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,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('ticker_messages', function (Blueprint $table) {
$table->id();
$table->string('language');
$table->string('message');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('ticker_messages');
}
};

View File

@@ -0,0 +1,26 @@
<?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('register_tokens', function (Blueprint $table) {
$table->string('token')->primary();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('register_tokens');
}
};

View File

@@ -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('blogs', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('published_by');
$table->foreign('published_by')->references('id')->on('users');
$table->string('language');
$table->string('title');
$table->text('body');
$table->boolean('published')->default(false);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('blogs');
}
};

View File

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

58
lang/de/app.php Normal file
View File

@@ -0,0 +1,58 @@
<?php
return [
'subtitle' => 'Ihr Amt für Reisepass-Angelegenheiten in der Bezirksregion CCC.',
'logo' => 'Offizielles Logo des c3gov',
'banner' => 'Banner. Abgebildet ist die c3gov-Verwaltungsvorschrift, ein Junghacker*innen-Pass und ein Hacker*innen-Reisepass.',
'signed_in_as' => 'Angemeldet als:',
'guest' => 'Gastkonto',
'language' => [
'en' => 'English',
'de' => 'Deutsch',
],
'nav' => [
'about' => 'Über uns',
'services' => 'Dienstleistungen',
'news' => 'Neuigkeiten',
'contact' => 'Kontakt',
'imprint' => 'Impressum',
'apply' => 'Jetzt beantragen',
],
'about' => [
'subtitle' => 'Unbeschwertes Einreisen in die stationären sowie temporären CCC Bezirksregionen',
'text1' => 'Das C3Gov bietet Ihnen die Ausstellung unserer zertifizierten Reisepässe an, mit denen Sie unbeschwert in die Botschaften [Hackspaces] sowie temporär bestehenden Bezirksregionen des CCC einreisen und Ihren Aufenthalt verifizieren lassen können.',
'text2' => 'Unser Team setzt bei dem Ausstellen auf hochqualitative Stempel und neuste Technik. Ob Hacker*innen-Reisepass oder Junghackerpass - unser stets motiviertes Team hilft Ihnen gerne weiter.',
'text3' => 'Jetzt neu',
'text4' => 'Um unsere Internetpräsenz zu erweitern, können Sie uns jetzt auch im Fediversum besuchen.',
'text5' => 'Klicken Sie dafür auf diesen Verweis:',
'insertvideo' => '*Hier Werbefilm einfügen*'
],
'services' => [
'title' => 'Unsere Dienstleistungen im Überblick',
'topic1' => [
'title' => 'Ausstellung von Reisepässen',
'content' => 'Unser Team kümmert sich um die Ausstellung der Reisepässe.
<br />Die Pässe werden durch neuste Technik automatisch bedruckt und mit Ihren Angaben versehen.
<br />Um die Echtheit des Passes zu verifizieren, erhält jeder Pass eine Sicherheitsnummer und wird letztendlich abgestempelt.
<br />Folgende Formate stehen Ihnen zur Verfügung:
<ul><li>Hacker*innen-Reisepass</li>
<li>Junghackerpass</li></ul>'
],
'topic2' => [
'title' => 'Nachträgliche Verifizierung der Reisepässe',
'content' => 'Sie besitzen bereits ein Reisedokument, welches jedoch noch nicht verifiziert wurde?
<br />Wir gehen mit Ihnen die nötigen Schritte durch, um Ihren Pass zu legitimisieren.
<br />Völlig unkompliziert.'
],
'topic3' => [
'title' => 'Zweitausstellung bei Verlust oder maximaler Auslastung Ihres Reisepasses',
'content' => 'Sollten Sie Ihren Reisepass verlieren oder sollte der Reisepass seine maximle Kapazität ausgereizt haben,
<br />stellen wir Ihnen gerne ein Ersatzdomument aus.
<br />Leider können Stempel vorheriger Besuche der Botschaften [Hackspaces] des CCC nicht ersetzt werden.'
],
'topic4' => [
'title' => 'Anwesenheitsbestätigung',
'content' => 'Sollten Sie eine Bestätigung Ihres Besuchs benötigen, stellen wir Ihnen diese selbstverständlich in Papierform aus.'
]
]
];

20
lang/de/auth.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => 'Diese Anmeldedaten wurden von uns nicht genehmigt.',
'password' => 'Dieses Kennwort entspricht nicht der Form.',
'throttle' => 'Ihre Frist zur Anmeldung ist abgelaufen. Bitte versuchen Sie es in :seconds Sekunden erneut.',
];

19
lang/de/pagination.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; Vorherige',
'next' => 'Nächste &raquo;',
];

22
lang/de/passwords.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Password Reset Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| outcome such as failure due to an invalid password / reset token.
|
*/
'reset' => 'Ihr Kennwort wurde zurückgesetzt.',
'sent' => 'Wir haben Ihnen ein Kennwortzurücksetz-Internetwebseitenlink per elektronischer Post zugesandt.',
'throttled' => 'Ihre Frist ist abgelaufen. Eine erneute Beantragung ist erst später möglich.',
'token' => 'Dieser Kennwortzurücksetz-Internetwebseitenlink ist bereits außerhalb der Meldefrist.',
'user' => "Diese Adresse der elektronischen Post ist uns nicht bekannt.",
];

200
lang/de/validation.php Normal file
View File

@@ -0,0 +1,200 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => ':attribute müssen akzeptiert werden.',
'accepted_if' => ':attribute müssen akzeptiert werden, wenn :other ist :value.',
'active_url' => ':attribute muss ein valider Internetseitenlink sein.',
'after' => ':attribute muss nach dem :date liegen.',
'after_or_equal' => ':attribute muss genau am oder nach dem :date liegen.',
'alpha' => ':attribute darf nur Buchstaben enthalten.',
'alpha_dash' => ':attribute darf nur Buchstaben, Nummern, Minus und Unterstriche enthalten.',
'alpha_num' => ':attribute darf nur Buchstaben und Nummern enthalten.',
'any_of' => ':attribute ist nicht valide.',
'array' => ':attribute muss ein Array sein.',
'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',
'before' => ':attribute vor dem :date liegen.',
'before_or_equal' => ':attribute muss genau am oder nach dem :date liegen.',
'between' => [
'array' => 'The :attribute field must have between :min and :max items.',
'file' => 'The :attribute field must be between :min and :max kilobytes.',
'numeric' => 'The :attribute field must be between :min and :max.',
'string' => 'The :attribute field must be between :min and :max characters.',
],
'boolean' => 'The :attribute field must be true or false.',
'can' => 'The :attribute field contains an unauthorized value.',
'confirmed' => 'The :attribute field confirmation does not match.',
'contains' => 'The :attribute field is missing a required value.',
'current_password' => 'The password is incorrect.',
'date' => ':attribute muss ein echtes Datum sein.',
'date_equals' => 'The :attribute field must be a date equal to :date.',
'date_format' => 'The :attribute field must match the format :format.',
'decimal' => 'The :attribute field must have :decimal decimal places.',
'declined' => 'The :attribute field must be declined.',
'declined_if' => 'The :attribute field must be declined when :other is :value.',
'different' => 'The :attribute field and :other must be different.',
'digits' => 'The :attribute field must be :digits digits.',
'digits_between' => 'The :attribute field must be between :min and :max digits.',
'dimensions' => 'The :attribute field has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
'doesnt_contain' => 'The :attribute field must not contain any of the following: :values.',
'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.',
'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.',
'email' => 'The :attribute field must be a valid email address.',
'encoding' => 'The :attribute field must be encoded in :encoding.',
'ends_with' => 'The :attribute field must end with one of the following: :values.',
'enum' => 'The selected :attribute is invalid.',
'exists' => 'The selected :attribute is invalid.',
'extensions' => 'The :attribute field must have one of the following extensions: :values.',
'file' => 'The :attribute field must be a file.',
'filled' => 'The :attribute field must have a value.',
'gt' => [
'array' => 'The :attribute field must have more than :value items.',
'file' => 'The :attribute field must be greater than :value kilobytes.',
'numeric' => 'The :attribute field must be greater than :value.',
'string' => 'The :attribute field must be greater than :value characters.',
],
'gte' => [
'array' => 'The :attribute field must have :value items or more.',
'file' => 'The :attribute field must be greater than or equal to :value kilobytes.',
'numeric' => 'The :attribute field must be greater than or equal to :value.',
'string' => 'The :attribute field must be greater than or equal to :value characters.',
],
'hex_color' => 'The :attribute field must be a valid hexadecimal color.',
'image' => 'The :attribute field must be an image.',
'in' => 'The selected :attribute is invalid.',
'in_array' => 'The :attribute field must exist in :other.',
'in_array_keys' => 'The :attribute field must contain at least one of the following keys: :values.',
'integer' => 'The :attribute field must be an integer.',
'ip' => 'The :attribute field must be a valid IP address.',
'ipv4' => 'The :attribute field must be a valid IPv4 address.',
'ipv6' => 'The :attribute field must be a valid IPv6 address.',
'json' => 'The :attribute field must be a valid JSON string.',
'list' => 'The :attribute field must be a list.',
'lowercase' => 'The :attribute field must be lowercase.',
'lt' => [
'array' => 'The :attribute field must have less than :value items.',
'file' => 'The :attribute field must be less than :value kilobytes.',
'numeric' => 'The :attribute field must be less than :value.',
'string' => 'The :attribute field must be less than :value characters.',
],
'lte' => [
'array' => 'The :attribute field must not have more than :value items.',
'file' => 'The :attribute field must be less than or equal to :value kilobytes.',
'numeric' => 'The :attribute field must be less than or equal to :value.',
'string' => 'The :attribute field must be less than or equal to :value characters.',
],
'mac_address' => 'The :attribute field must be a valid MAC address.',
'max' => [
'array' => 'The :attribute field must not have more than :max items.',
'file' => 'The :attribute field must not be greater than :max kilobytes.',
'numeric' => 'The :attribute field must not be greater than :max.',
'string' => 'The :attribute field must not be greater than :max characters.',
],
'max_digits' => 'The :attribute field must not have more than :max digits.',
'mimes' => 'The :attribute field must be a file of type: :values.',
'mimetypes' => 'The :attribute field must be a file of type: :values.',
'min' => [
'array' => 'The :attribute field must have at least :min items.',
'file' => 'The :attribute field must be at least :min kilobytes.',
'numeric' => 'The :attribute field must be at least :min.',
'string' => 'The :attribute field must be at least :min characters.',
],
'min_digits' => 'The :attribute field must have at least :min digits.',
'missing' => 'The :attribute field must be missing.',
'missing_if' => 'The :attribute field must be missing when :other is :value.',
'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
'missing_with' => 'The :attribute field must be missing when :values is present.',
'missing_with_all' => 'The :attribute field must be missing when :values are present.',
'multiple_of' => 'The :attribute field must be a multiple of :value.',
'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute field format is invalid.',
'numeric' => 'The :attribute field must be a number.',
'password' => [
'letters' => 'The :attribute field must contain at least one letter.',
'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.',
'numbers' => 'The :attribute field must contain at least one number.',
'symbols' => 'The :attribute field must contain at least one symbol.',
'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
],
'present' => 'The :attribute field must be present.',
'present_if' => 'The :attribute field must be present when :other is :value.',
'present_unless' => 'The :attribute field must be present unless :other is :value.',
'present_with' => 'The :attribute field must be present when :values is present.',
'present_with_all' => 'The :attribute field must be present when :values are present.',
'prohibited' => 'The :attribute field is prohibited.',
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
'prohibited_if_accepted' => 'The :attribute field is prohibited when :other is accepted.',
'prohibited_if_declined' => 'The :attribute field is prohibited when :other is declined.',
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
'prohibits' => 'The :attribute field prohibits :other from being present.',
'regex' => 'The :attribute field format is invalid.',
'required' => 'The :attribute field is required.',
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
'required_if' => 'The :attribute field is required when :other is :value.',
'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
'required_if_declined' => 'The :attribute field is required when :other is declined.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values are present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
'same' => 'The :attribute field must match :other.',
'size' => [
'array' => 'The :attribute field must contain :size items.',
'file' => 'The :attribute field must be :size kilobytes.',
'numeric' => 'The :attribute field must be :size.',
'string' => 'The :attribute field must be :size characters.',
],
'starts_with' => 'The :attribute field must start with one of the following: :values.',
'string' => 'The :attribute field must be a string.',
'timezone' => 'The :attribute field must be a valid timezone.',
'unique' => 'The :attribute has already been taken.',
'uploaded' => 'The :attribute failed to upload.',
'uppercase' => 'The :attribute field must be uppercase.',
'url' => 'The :attribute field must be a valid URL.',
'ulid' => 'The :attribute field must be a valid ULID.',
'uuid' => 'The :attribute field must be a valid UUID.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap our attribute placeholder
| with something more reader friendly such as "E-Mail Address" instead
| of "email". This simply helps us make our message more expressive.
|
*/
'attributes' => [],
];

58
lang/en/app.php Normal file
View File

@@ -0,0 +1,58 @@
<?php
return [
'subtitle' => 'Your office for passport document affairs within the district region CCC.',
'logo' => 'Official logo of the c3gov',
'banner' => 'Banner. The c3gov laws are seen on a sheet of paper, and two different hacker passports.',
'signed_in_as' => 'Signed in as:',
'guest' => 'Guest account',
'language' => [
'en' => 'English',
'de' => 'Deutsch',
],
'nav' => [
'about' => 'About us',
'services' => 'Services',
'news' => 'News',
'contact' => 'Contact',
'imprint' => 'Imprint',
'apply' => 'Apply now',
],
'about' => [
'subtitle' => 'Hassle-Free Entry into CCC\'s Permanent and Temporary District Regions',
'text1' => 'C3Gov offers you the issuance of our certified travel documents, which allow you to enter the CCC\'s permanent and temporary district regions hassle-free and have your stay verified.',
'text2' => 'Our team uses high-quality stamps and the latest technology when issuing these documents.',
'text3' => 'NEW!!!',
'text4' => 'To expand our online presence, you can now also visit us on the Fediverse.',
'text5' => 'To do so, click on this link:',
'insertvideo' => '*Insert promotional video here*'
],
'services' => [
'title' => 'Our Services',
'topic1' => [
'title' => 'Issuance of Hacker Passports',
'content' => 'Our team handles the issuance of travel documents.
<br />The passports are automatically printed using the latest technology - personalised with your details.
<br />To verify the authenticity of the passport, each one is assigned a security number and finally stamped.
<br />The following formats are available:
<ul><li>Hacker Passport</li>
<li>Junghackerpass [German only]</li></ul>'
],
'topic2' => [
'title' => 'Retrospective Verification of Passports',
'content' => 'Do you already have a passport that has not yet been verified?
<br />We will guide you through the necessary steps to validate your passport.
<br />Simple and clean.'
],
'topic3' => [
'title' => 'Replacement Passport issued in the Event of Loss or when your Passport is full',
'content' => 'Should you lose your passport or should your passport have reached its maximum capacity,
<br />we will be happy to issue you with a replacement document.
<br />Unfortunately, stamps from previous visits to the CCC\'s embassies [hackspaces] cannot be replaced.'
],
'topic4' => [
'title' => 'Certification of Attendance',
'content' => 'Should you require certification of your visit, we will of course provide you with an official document.'
]
]
];

20
lang/en/auth.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => 'These credentials do not match our records.',
'password' => 'The provided password is incorrect.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
];

19
lang/en/pagination.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; Previous',
'next' => 'Next &raquo;',
];

22
lang/en/passwords.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Password Reset Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| outcome such as failure due to an invalid password / reset token.
|
*/
'reset' => 'Your password has been reset.',
'sent' => 'We have emailed your password reset link.',
'throttled' => 'Please wait before retrying.',
'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that email address.",
];

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

@@ -0,0 +1,200 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => 'The :attribute field must be accepted.',
'accepted_if' => 'The :attribute field must be accepted when :other is :value.',
'active_url' => 'The :attribute field must be a valid URL.',
'after' => 'The :attribute field must be a date after :date.',
'after_or_equal' => 'The :attribute field must be a date after or equal to :date.',
'alpha' => 'The :attribute field must only contain letters.',
'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.',
'alpha_num' => 'The :attribute field must only contain letters and numbers.',
'any_of' => 'The :attribute field is invalid.',
'array' => 'The :attribute field must be an array.',
'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',
'before' => 'The :attribute field must be a date before :date.',
'before_or_equal' => 'The :attribute field must be a date before or equal to :date.',
'between' => [
'array' => 'The :attribute field must have between :min and :max items.',
'file' => 'The :attribute field must be between :min and :max kilobytes.',
'numeric' => 'The :attribute field must be between :min and :max.',
'string' => 'The :attribute field must be between :min and :max characters.',
],
'boolean' => 'The :attribute field must be true or false.',
'can' => 'The :attribute field contains an unauthorized value.',
'confirmed' => 'The :attribute field confirmation does not match.',
'contains' => 'The :attribute field is missing a required value.',
'current_password' => 'The password is incorrect.',
'date' => 'The :attribute field must be a valid date.',
'date_equals' => 'The :attribute field must be a date equal to :date.',
'date_format' => 'The :attribute field must match the format :format.',
'decimal' => 'The :attribute field must have :decimal decimal places.',
'declined' => 'The :attribute field must be declined.',
'declined_if' => 'The :attribute field must be declined when :other is :value.',
'different' => 'The :attribute field and :other must be different.',
'digits' => 'The :attribute field must be :digits digits.',
'digits_between' => 'The :attribute field must be between :min and :max digits.',
'dimensions' => 'The :attribute field has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
'doesnt_contain' => 'The :attribute field must not contain any of the following: :values.',
'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.',
'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.',
'email' => 'The :attribute field must be a valid email address.',
'encoding' => 'The :attribute field must be encoded in :encoding.',
'ends_with' => 'The :attribute field must end with one of the following: :values.',
'enum' => 'The selected :attribute is invalid.',
'exists' => 'The selected :attribute is invalid.',
'extensions' => 'The :attribute field must have one of the following extensions: :values.',
'file' => 'The :attribute field must be a file.',
'filled' => 'The :attribute field must have a value.',
'gt' => [
'array' => 'The :attribute field must have more than :value items.',
'file' => 'The :attribute field must be greater than :value kilobytes.',
'numeric' => 'The :attribute field must be greater than :value.',
'string' => 'The :attribute field must be greater than :value characters.',
],
'gte' => [
'array' => 'The :attribute field must have :value items or more.',
'file' => 'The :attribute field must be greater than or equal to :value kilobytes.',
'numeric' => 'The :attribute field must be greater than or equal to :value.',
'string' => 'The :attribute field must be greater than or equal to :value characters.',
],
'hex_color' => 'The :attribute field must be a valid hexadecimal color.',
'image' => 'The :attribute field must be an image.',
'in' => 'The selected :attribute is invalid.',
'in_array' => 'The :attribute field must exist in :other.',
'in_array_keys' => 'The :attribute field must contain at least one of the following keys: :values.',
'integer' => 'The :attribute field must be an integer.',
'ip' => 'The :attribute field must be a valid IP address.',
'ipv4' => 'The :attribute field must be a valid IPv4 address.',
'ipv6' => 'The :attribute field must be a valid IPv6 address.',
'json' => 'The :attribute field must be a valid JSON string.',
'list' => 'The :attribute field must be a list.',
'lowercase' => 'The :attribute field must be lowercase.',
'lt' => [
'array' => 'The :attribute field must have less than :value items.',
'file' => 'The :attribute field must be less than :value kilobytes.',
'numeric' => 'The :attribute field must be less than :value.',
'string' => 'The :attribute field must be less than :value characters.',
],
'lte' => [
'array' => 'The :attribute field must not have more than :value items.',
'file' => 'The :attribute field must be less than or equal to :value kilobytes.',
'numeric' => 'The :attribute field must be less than or equal to :value.',
'string' => 'The :attribute field must be less than or equal to :value characters.',
],
'mac_address' => 'The :attribute field must be a valid MAC address.',
'max' => [
'array' => 'The :attribute field must not have more than :max items.',
'file' => 'The :attribute field must not be greater than :max kilobytes.',
'numeric' => 'The :attribute field must not be greater than :max.',
'string' => 'The :attribute field must not be greater than :max characters.',
],
'max_digits' => 'The :attribute field must not have more than :max digits.',
'mimes' => 'The :attribute field must be a file of type: :values.',
'mimetypes' => 'The :attribute field must be a file of type: :values.',
'min' => [
'array' => 'The :attribute field must have at least :min items.',
'file' => 'The :attribute field must be at least :min kilobytes.',
'numeric' => 'The :attribute field must be at least :min.',
'string' => 'The :attribute field must be at least :min characters.',
],
'min_digits' => 'The :attribute field must have at least :min digits.',
'missing' => 'The :attribute field must be missing.',
'missing_if' => 'The :attribute field must be missing when :other is :value.',
'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
'missing_with' => 'The :attribute field must be missing when :values is present.',
'missing_with_all' => 'The :attribute field must be missing when :values are present.',
'multiple_of' => 'The :attribute field must be a multiple of :value.',
'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute field format is invalid.',
'numeric' => 'The :attribute field must be a number.',
'password' => [
'letters' => 'The :attribute field must contain at least one letter.',
'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.',
'numbers' => 'The :attribute field must contain at least one number.',
'symbols' => 'The :attribute field must contain at least one symbol.',
'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
],
'present' => 'The :attribute field must be present.',
'present_if' => 'The :attribute field must be present when :other is :value.',
'present_unless' => 'The :attribute field must be present unless :other is :value.',
'present_with' => 'The :attribute field must be present when :values is present.',
'present_with_all' => 'The :attribute field must be present when :values are present.',
'prohibited' => 'The :attribute field is prohibited.',
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
'prohibited_if_accepted' => 'The :attribute field is prohibited when :other is accepted.',
'prohibited_if_declined' => 'The :attribute field is prohibited when :other is declined.',
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
'prohibits' => 'The :attribute field prohibits :other from being present.',
'regex' => 'The :attribute field format is invalid.',
'required' => 'The :attribute field is required.',
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
'required_if' => 'The :attribute field is required when :other is :value.',
'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
'required_if_declined' => 'The :attribute field is required when :other is declined.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values are present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
'same' => 'The :attribute field must match :other.',
'size' => [
'array' => 'The :attribute field must contain :size items.',
'file' => 'The :attribute field must be :size kilobytes.',
'numeric' => 'The :attribute field must be :size.',
'string' => 'The :attribute field must be :size characters.',
],
'starts_with' => 'The :attribute field must start with one of the following: :values.',
'string' => 'The :attribute field must be a string.',
'timezone' => 'The :attribute field must be a valid timezone.',
'unique' => 'The :attribute has already been taken.',
'uploaded' => 'The :attribute failed to upload.',
'uppercase' => 'The :attribute field must be uppercase.',
'url' => 'The :attribute field must be a valid URL.',
'ulid' => 'The :attribute field must be a valid ULID.',
'uuid' => 'The :attribute field must be a valid UUID.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap our attribute placeholder
| with something more reader friendly such as "E-Mail Address" instead
| of "email". This simply helps us make our message more expressive.
|
*/
'attributes' => [],
];

1949
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

17
package.json Normal file
View File

@@ -0,0 +1,17 @@
{
"$schema": "https://www.schemastore.org/package.json",
"private": true,
"type": "module",
"scripts": {
"build": "vite build",
"dev": "vite"
},
"devDependencies": {
"@tailwindcss/vite": "^4.0.0",
"axios": "^1.11.0",
"concurrently": "^9.0.1",
"laravel-vite-plugin": "^3.0.0",
"tailwindcss": "^4.0.0",
"vite": "^8.0.0"
}
}

36
phpunit.xml Normal file
View File

@@ -0,0 +1,36 @@
<?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="APP_MAINTENANCE_DRIVER" value="file"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="BROADCAST_CONNECTION" value="null"/>
<env name="CACHE_STORE" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="DB_URL" value=""/>
<env name="MAIL_MAILER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="PULSE_ENABLED" value="false"/>
<env name="TELESCOPE_ENABLED" value="false"/>
<env name="NIGHTWATCH_ENABLED" value="false"/>
</php>
</phpunit>

25
public/.htaccess Normal file
View File

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

BIN
public/Bilder/banner.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
public/Bilder/banner2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 KiB

BIN
public/Bilder/deutsch.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
public/Bilder/englisch.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
public/Bilder/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

1
public/Dokumente Submodule

Submodule public/Dokumente added at 8a14d91484

23
public/css/blog/edit.css Normal file
View File

@@ -0,0 +1,23 @@
.blogEdit {
padding: 0.5em;
border: 1px solid black;
}
.blogEdit button {
padding: 0.7em;
font-size: 1em;
background-color: #ccc;
}
.blogEdit input[type=text] {
font-size: 1em;
}
.blogEdit textarea {
font-size: 1.2em;
}
.blogEdit select {
font-size: 1em;
padding: 0.5em;
}

214
public/css/style.css Normal file
View File

@@ -0,0 +1,214 @@
html, body {
margin: 0;
width: 100%;
min-height: 100vh;
background-color: #4b0600;
box-sizing: border-box;
display: flex;
flex-direction: column;
overflow-x: hidden;
}
*, *:before, *:after {
box-sizing: inherit;
}
.ticker {
background-color: #0c0;
height: 3vh;
min-height: 24px;
flex-shrink: 0;
}
.header {
background-color: #999;
min-height: 20vh;
margin: 0;
display: flex;
flex-wrap: wrap;
flex-shrink: 0;
}
.header-main {
width: 200px;
height: 20vh;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
flex-shrink: 0;
}
.banner {
flex-grow: 1;
height: 20vh;
display: flex;
justify-content: center;
align-items: center;
}
.banner img {
max-width: 100%;
height: auto;
display: block;
}
.language-area {
width: 200px;
height: 20vh;
background-color: #ccc;
padding: 10px;
flex-shrink: 0;
}
.language {
margin: 5px;
display: flex;
gap: 10px;
justify-content: center;
}
.language img {
cursor: pointer;
}
.login-status {
text-align: center;
font-size: 0.9em;
}
#logo {
max-width: 90%;
max-height: 18vh;
}
.main {
display: flex;
flex-direction: row;
margin: 0;
flex-grow: 1;
width: 100%;
}
.navbar {
background-color: #ccc;
width: 200px;
flex-shrink: 0;
}
.content {
background-color: #dcccaa;
flex-grow: 1;
padding: 15px;
}
.navbar ul {
list-style-type: none;
padding: 10px;
margin: 0;
}
.navbar li {
margin-bottom: 8px;
}
.navbar a {
text-decoration: none;
color: #333;
display: block;
padding: 5px;
text-align: center;
}
.navbar a:hover {
background-color: #bbb;
}
@media (max-width: 1024px) {
.header {
flex-direction: column;
height: auto;
}
.header-main, .banner, .language-area {
width: 100%;
height: auto;
padding: 10px;
}
.main {
flex-direction: column;
}
.navbar {
width: 100%;
}
.navbar ul {
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: center;
}
.content {
width: 100%;
}
#logo {
max-height: 100px;
}
.banner img {
max-width: 100%;
}
}
.eingabemaske {
border: 5px inset;
font-size: 1.2em;
padding: 0.5em;
overflow-x: auto;
}
.eingabemaske table, th, td {
border: 4px outset;
}
.eingabemaske input {
padding: 0.5em;
max-width: 100%;
}
.eingabemaske button {
padding: 1em;
border: 4px outset;
font-size: 1.2em;
background-color: #ccc;
}
#fehlermeldung {
border: 4px outset;
width: 100%;
max-width: 500px;
}
nav {
font-size: 1.2em;
}
.w-5 {
width: 5%;
}
.h-5 {
height: 5vh;
}
.footer {
width: 100%;
background-color: #999;
padding: 10px;
text-align: center;
flex-shrink: 0;
}

View File

@@ -0,0 +1,10 @@
.split-left {
float: left;
width: 21%;
}
.split-right {
float: left;
width: 50%;
border-left: 1px dotted #000;
padding-left: 30px;
}

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

20
public/index.php Normal file
View File

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

96
public/js/blog/blog.js Normal file
View File

@@ -0,0 +1,96 @@
$(function() {
$('select[autocomplete="off"]').each(function() {
let selectedValue = $(this).find('option[selected]').val();
if (selectedValue) {
$(this).val(selectedValue);
}
});
});
function addBlog(){
let b = {};
b.title = $('#blogTitle_new').val();
b.body = $('#blogBody_new').val();
b.published = $('#blogPublished_new').is(":checked") ? "1" : "0";
b.language = $('#blogLanguage_new').val();
console.log(b);
if(window.confirm('Eintrag wirklich speichern?')){
$.ajax({
type: "POST",
url: "/intern/nachrichten/add",
data: b,
dataType: "json",
success:function(r){
if(r.messageStatus === "success"){
$('#blogTitle_new').val("");
$('#blogBody_new').val("");
$('#blogLanguage_new').val("de");
location.reload();
} else {
alert(r.errorMessage);
}
},
error:function(r, a, e){
alert(e);
}
});
}
}
function editBlog(blogId){
let b = {};
b.id = blogId;
b.title = $('#blogTitle_'+blogId).val();
b.body = $('#blogBody_'+blogId).val();
b.published = $('#blogPublished_'+blogId).is(":checked") ? "1" : "0";
b.language = $('#blogLanguage_'+blogId).val();
if(window.confirm('Eintrag wirklich speichern?')){
$.ajax({
type: "PUT",
url: "/intern/nachrichten/edit",
data: b,
dataType: "json",
success:function(r){
if(r.messageStatus === "success"){
location.reload();
} else {
alert(r.errorMessage);
}
},
error:function(r, a, e){
alert(e);
}
});
}
}
function deleteBlog(blogId){
let b = {};
b.id = blogId;
if(window.confirm('Eintrag wirklich löschen?')){
$.ajax({
type:"DELETE",
url:"/intern/nachrichten/delete",
data:b,
dataType:"json",
success:function(r){
if(r.messageStatus === "success"){
$('#blogDelete_' + blogId).closest('.blogEdit').fadeOut(300, function() {
$(this).remove();
location.reload();
});
} else {
alert(r.errorMessage);
}
},
error:function(r, a, e){
alert(e);
}
})
}
}

12
public/js/intern.js Normal file
View File

@@ -0,0 +1,12 @@
function setzeFehlermeldung(alertType, message){
let f = $("#fehlermeldung");
switch(alertType){
case "success":
f.css("border-color", "#0033cc");
break;
case "failure":
f.css("border-color", "#cc3300");
break;
}
f.html(message);
}

2
public/js/jquery/jquery-4.0.0.min.js vendored Normal file

File diff suppressed because one or more lines are too long

30
public/js/login/login.js Normal file
View File

@@ -0,0 +1,30 @@
function login(){
let data = {};
data.mail = $("#mail").val();
data.password = $("#password").val();
$.ajax({
type: "POST",
url: "/intern/anmelden/einloggen",
data: data,
dataType: "json",
success: function(d){
switch(d.messageStatus){
case "success":
setzeFehlermeldung("success", "Sie wurden erfolgreich angemeldet.");
location.reload();
break;
case "failure":
setzeFehlermeldung("failure", "Es ist ein Fehler geschehen: " + d.errorMessage);
break;
case "not permitted":
setzeFehlermeldung("failure", "Sie sind nicht berechtigt diese Funktion zu nutzen.");
break;
}
},
error: function(d, status, errorThrown) {
setzeFehlermeldung("failure", "Es ist ein Fehler geschehen: " + errorThrown);
}
});
}

View File

@@ -0,0 +1,39 @@
function abschicken(){
let data = {};
data.mail = $("#mail").val();
data.username = $("#username").val();
data.password = $("#password").val();
data.token = $("#register_token").val();
if(data.password !== $("#password_repeat").val()) {
setzeFehlermeldung("failure", "Ihr Kennwort stimmt nicht überein.");
for(let i=0; i<Math.random() * 10; i++){
alert("Ihr Kennwort stimmt nicht überein.");
}
} else {
$.ajax({
type: "POST",
url: "/intern/registrieren/abschicken",
data: data,
dataType: "json",
success: function(d){
switch(d.messageStatus){
case "success":
setzeFehlermeldung("success", "Sie wurden erfolgreich registriert.")
break;
case "failure":
setzeFehlermeldung("failure", "Es ist ein Fehler geschehen: " + d.errorMessage);
break;
case "not permitted":
setzeFehlermeldung("failure", "Sie sind nicht berechtigt diese Funktion zu nutzen.");
break;
}
},
error: function(d, status, errorThrown) {
setzeFehlermeldung("failure", "Es ist ein Fehler geschehen: " + errorThrown);
}
});
}
}

57
public/js/ticker/edit.js Normal file
View File

@@ -0,0 +1,57 @@
function remove(lang){
let data = {};
data["delete"] = [];
$("#ticker_" + lang).each(function(){
data["delete"].push($(this).val());
});
console.log(JSON.stringify(data));
$.ajax({
type: "DELETE",
url: "/intern/ticker/remove",
data: data,
dataType: "json",
success: function (d) {
switch(d.messageStatus){
case "success":
setzeFehlermeldung(d.messageStatus, "Löschen erfolgreich!");
location.reload();
break;
case "failure":
setzeFehlermeldung(d.messageStatus, d.errorMessage);
break;
}
},
error: function (d, status, error) {
setzeFehlermeldung("failure", error);
}
});
}
function insert(lang){
let data = {};
data.insert = $("#insert_" + lang).val();
data.lang = lang;
$.ajax({
type: "PUT",
url: "/intern/ticker/add",
data: data,
dataType: "json",
success: function (d) {
switch(d.messageStatus){
case "success":
setzeFehlermeldung(d.messageStatus, "Einfügen erfolgreich!");
location.reload();
break;
case "failure":
setzeFehlermeldung(d.messageStatus, d.errorMessage);
break;
}
},
error: function (d, status, error) {
setzeFehlermeldung("failure", error);
}
});
}

4
public/js/web.js Normal file
View File

@@ -0,0 +1,4 @@
function setLanguage(lang) {
document.cookie = "lang=" + lang;
location.reload();
}

2
public/robots.txt Normal file
View File

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

11
resources/css/app.css Normal file
View File

@@ -0,0 +1,11 @@
@import 'tailwindcss';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';
@theme {
--font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol', 'Noto Color Emoji';
}

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

@@ -0,0 +1 @@
import './bootstrap';

4
resources/js/bootstrap.js vendored Normal file
View File

@@ -0,0 +1,4 @@
import axios from 'axios';
window.axios = axios;
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

View File

@@ -0,0 +1,7 @@
@extends('layout.app')
@section('scripts')
@endsection
@section('content')
@endsection

View File

@@ -0,0 +1,63 @@
@extends('layout.app')
@section('scripts')
<link rel="stylesheet" href="{{ asset("css/blog/edit.css") . "?rnd=" . rand(0, 1000000000) }}">
<script src="{{ asset('/js/blog/blog.js') }}"></script>
@endsection
@section('content')
<h2>Post hinzufügen</h2>
<div class="blogEdit">
Veröffentlichen? <input type="checkbox" id="blogPublished_new" checked><br /><br />
Sprache:
<select id="blogLanguage_new" name="language" autocomplete="off">
<option value="de">Deutsch</option>
<option value="en">Englisch</option>
</select><br /><br />
<label for="blogTitle_new">Titel:<br />
</label><input id="blogTitle_new" type="text" value="" placeholder="Titel eingeben...">
<br /><br />
<label for="blogBody_new">Inhalt:</label><br />
<textarea cols="64" rows="8" maxlength="2000" id="blogBody_new" placeholder="Text/HTML eingeben..."></textarea>
<br />
<br />
<button onclick="addBlog()" id="blogEdit_new">Hinzufügen</button><br /><br />
</div>
<h2>Posts ändern/löschen</h2>
<br />
@foreach($blogs as $blog)
<div class="blogEdit">
<b>Erstellt von: {{$blog->byUser()->first()->name}} - Erstellt am: {{ $blog->created_at }} - Verändert am: {{ $blog->updated_at }}</b><br /><br />
Veröffentlicht: <input type="checkbox" id="blogPublished_{{$blog->id}}"{{ $blog->published ? " checked" : "" }}><br /><br />
Sprache:
<select id="blogLanguage_{{ $blog->id }}" name="language" autocomplete="off">
<option value="de"{{ ($blog->language == "de" ? " selected" : "") }}>Deutsch</option>
<option value="en"{{ ($blog->language == "en" ? " selected" : "") }}>Englisch</option>
</select><br /><br />
<button onclick="deleteBlog({{ $blog->id }})" id="blogDelete_{{ $blog->id }}">Löschen</button><br /><br />
<label for="blogTitle_{{ $blog->id }}">Titel:<br />
</label><input id="blogTitle_{{ $blog->id }}" type="text" value="{{ $blog->title }}">
<br /><br />
<label for="blogBody_{{$blog->id}}">Inhalt:</label><br />
<textarea cols="64" rows="8" maxlength="2000" id="blogBody_{{$blog->id}}">{!! $blog->body !!}</textarea>
<br />
<br />
<button onclick="editBlog({{ $blog->id }})" id="blogEdit_{{ $blog->id }}">Speichern</button><br /><br />
</div>
@endforeach
<br /><br />
{{ $blogs->links() }}
<br /><br />
@endsection

View File

@@ -0,0 +1,24 @@
@extends('layout.app')
@section('scripts')
@endsection
@section('content')
<h2>{{ __('app.nav.about') }}</h2>
<h1>{{ __('app.about.subtitle') }}</h1>
{{ __('app.about.text1') }}
<p>
{{ __('app.about.text2') }}
<p>
<h3>{{ __('app.about.text3') }}</h3>
{{ __('app.about.text4') }}
<p>{{ __('app.about.text5') }} <a href="https://chaos.social/@c3gov">https://chaos.social/@c3gov</a>
<br />
<br />
<br />
<br />
<br />
<br />
{{ __('app.about.insertvideo') }}
@endsection

View File

@@ -0,0 +1,7 @@
@extends('layout.app')
@section('scripts')
@endsection
@section('content')
@endsection

View File

@@ -0,0 +1,7 @@
@extends('layout.app')
@section('scripts')
@endsection
@section('content')
@endsection

View File

@@ -0,0 +1,5 @@
@extends('layout.app')
@section('content')
<h1>Guten Tag.</h1>
@endsection

View File

@@ -0,0 +1,18 @@
@extends('layout.app')
@section('scripts')
@endsection
@section('content')
<h1>{{ __('app.nav.news') }}</h1>
@foreach($blogs as $blog)
<h2>{{ $blog->title }}</h2>
<b>{{ $blog->created_at }}</b><br />
<p>{!! $blog->body !!}</p>
<br />
<hr>
<br />
@endforeach
<br /><br />
{{ $blogs->links() }}
<br /><br />
@endsection

View File

@@ -0,0 +1,21 @@
@extends('layout.app')
@section('scripts')
@endsection
@section('content')
<h1>{{ __('app.services.title') }}</h1>
<br />
<h2>{{ __('app.services.topic1.title') }}</h2>
<p>{!! __('app.services.topic1.content') !!}</p>
<br />
<h2>{{ __('app.services.topic2.title') }}</h2>
<p>{!! __('app.services.topic2.content') !!}</p>
<br />
<h2>{{ __('app.services.topic3.title') }}</h2>
<p>{!! __('app.services.topic3.content') !!}</p>
<br />
<h2>{{ __('app.services.topic4.title') }}</h2>
<p>{!! __('app.services.topic4.content') !!}</p>
<br />
<br />
@endsection

View File

@@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>c3gov - {{ __('app.subtitle') }}</title>
<link rel="icon" type="image/x-icon" href="{{ asset("favicon.ico") }}">
<link rel="stylesheet" href="{{ asset("css/style.css") . "?rnd=" . rand(0, 1000000000) }}">
<script src="{{ asset("js/jquery/jquery-4.0.0.min.js") }}"></script>
<script src="{{ asset("js/web.js") }}"></script>
@yield('scripts')
</head>
<body>
<div class="ticker">
<marquee>{{\App\Http\Controllers\TickerController::getTicker()}}</marquee>
</div>
<div class="header">
<div class="header-main">
<a href="/">
<img id="logo" src="{{ asset("Bilder/logo.png") }}" alt="{{ __('app.logo') }}">
</a>
</div>
<div class="banner">
<img src="{{ asset("Bilder/banner2.gif") }}" alt="{{ __("app.banner") }}">
</div>
<div class="language-area">
<div class="language">
<img alt="{{ __('app.language.de') }}" onclick="setLanguage('de')" src="{{ asset("Bilder/deutsch.gif") }}">
<img alt="{{ __('app.language.en') }}" onclick="setLanguage('en')" src="{{ asset("Bilder/englisch.gif") }}">
</div>
<br />
<div class="login-status">{{ __('app.signed_in_as') }} {{Auth::user()->name ?? __("app.guest")}}</div>
</div>
</div>
<div class="main">
<div class="navbar">
<ul>
<li><a href="{{ route('about') }}">{{ __('app.nav.about') }}</a></li>
<li><a href="{{ route('services') }}">{{ __('app.nav.services') }}</a></li>
<li><a href="{{ route('news') }}">{{ __('app.nav.news') }}</a></li>
<li><a href="{{ route('contact') }}">{{ __('app.nav.contact') }}</a></li>
<li><a href="{{ route('imprint') }}">{{ __('app.nav.imprint') }}</a></li>
<br />
<li><a href="{{ route('apply') }}">{{ __('app.nav.apply') }}</a></li>
@auth
<br />
<li><a href="{{ route('editTicker') }}">Ticker bearbeiten</a></li>
<li><a href="{{ route('editNews') }}">Nachrichten bearbeiten</a></li>
<li><a href="{{ route('logout') }}">Abmelden</a></li>
@endauth
</ul>
</div>
<div class="content col">
@yield('content')
<br />
<br />
</div>
</div>
<div class="footer">
&copy; 1999 by C3Gov
</div>
</body>
</html>

View File

@@ -0,0 +1,37 @@
@extends('layout.app')
@section('scripts')
<script src="{{ asset("js/intern.js") }}"></script>
<script src="{{ asset("js/login/login.js") }}"></script>
@endsection
@section('content')
<h1>Anmelden</h1>
<span>
@guest
<div id="fehlermeldung">Bitte melden Sie sich gefälligst an!</div>
<br /><br />
<table class="eingabemaske">
<tr>
<td><label for="mail">Elektronische Postadresse:</label></td>
<td><input size="32" type="text" id="mail" pattern="^[0-9A-Za-z+_\-]+@[0-9A-Za-z_\-]+\.[0-9A-Za-z]+$"
title="Nur echte Adressen der elektronischen Post verwenden!"/></td>
</tr>
<tr>
<td><label for="password">Kennwort:</label></td>
<td><input size="32" type="password" id="password"></td>
</tr>
</table>
<br/><br/>
<button class="eingabemaske" onclick="login()">Anmelden</button>
@endguest
@auth
<div id="fehlermeldung">Sie sind angemeldet.</div>
<a href="{{ route('logout') }}"><button>Abmelden</button></a>
@endauth
</span>
@endsection

View File

@@ -0,0 +1,42 @@
@extends('layout.app')
@section('scripts')
<script src="{{ asset("js/intern.js") }}"></script>
<script src="{{ asset("js/login/registrieren.js") }}"></script>
@endsection
@section('content')
<h1>Registrieren</h1>
<span>
<div id="fehlermeldung" class="alert alert-primary">Bitte registrieren Sie sich.</div>
<table class="eingabemaske">
<tr>
<td><label for="mail">Elektronische Postadresse:</label></td>
<td><input size="32" type="text" id="mail" pattern="^[0-9A-Za-z+_\-]+@[0-9A-Za-z_\-]+\.[0-9A-Za-z]+$"
title="Nur echte Adressen der elektronischen Post verwenden!"/></td>
</tr>
<tr>
<td><label for="username">Name/Nick:</label></td>
<td><input size="32" type="text" id="username"/></td>
</tr>
<tr>
<td><label for="password">Kennwort:</label></td>
<td><input size="32" type="password" id="password"></td>
</tr>
<tr>
<td><label for="password_repeat">Kennwort wiederholen:</label></td>
<td><input size="32" type="password" id="password_repeat"></td>
</tr>
<tr>
<td><label for="register_token">Registrierungsnummer:</label></td>
<td><input size="32" type="text" id="register_token"></td>
</tr>
</table>
<br/><br/>
<button class="eingabemaske" onclick="abschicken()">Registrieren</button>
</span>
@endsection

View File

@@ -0,0 +1,48 @@
@extends('layout.app')
@section('scripts')
<link rel="stylesheet" href="{{ asset("css/ticker/ticker.css") }}">
<script src="{{ asset("js/intern.js") }}"></script>
<script src="{{ asset("js/ticker/edit.js") }}"></script>
@endsection
@section('content')
<h1>Ticker bearbeiten</h1>
<div id="fehlermeldung">Hier kann der Ticker verändert werden.</div>
<div class="split-left">
<h2>Deutsch</h2>
<label for="ticker_de">Aktive Tickernachrichten:</label><br /><br />
<select name="ticker_de" id="ticker_de" multiple>
@foreach(\App\Models\TickerMessages::where('language', 'de')->orderBy('updated_at', 'desc')->get() as $tm)
<option value="{{$tm->id}}">{{$tm->message}}</option>
@endforeach
</select>
<br /><br />
<button onclick="remove('de')">Ausgewählte Tickernachricht löschen</button>
<br /><br /><br />
<label for="insert_de">Tickernachricht erstellen: </label><br />
<input size="32" type="text" id="insert_de">
<br /><br />
<button onclick="insert('de')">Tickernachricht hinzufügen</button>
</div>
<div class="split-right">
<h2>Englisch</h2>
<label for="ticker_en">Aktive Tickernachrichten:</label><br /><br />
<select name="ticker_en" id="ticker_en" multiple>
@foreach(\App\Models\TickerMessages::where('language', 'en')->orderBy('updated_at', 'desc')->get() as $tm)
<option value="{{$tm->id}}">{{$tm->message}}</option>
@endforeach
</select>
<br /><br />
<button onclick="remove('en')">Ausgewählte Tickernachricht löschen</button>
<br /><br /><br />
<label for="insert_de">Tickernachricht erstellen: </label><br />
<input size="32" type="text" id="insert_en">
<br /><br />
<button onclick="insert('en')">Tickernachricht hinzufügen</button>
</div>
@endsection

File diff suppressed because one or more lines are too long

8
routes/console.php Normal file
View File

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

38
routes/web.php Normal file
View File

@@ -0,0 +1,38 @@
<?php
use App\Http\Controllers\BlogController;
use App\Http\Controllers\LoginController;
use App\Http\Controllers\WebsiteController;
use App\Http\Controllers\TickerController;
use Illuminate\Support\Facades\Route;
Route::get('/', [WebsiteController::class, 'index']);
Route::get('/ueberuns', [WebsiteController::class, 'about'])->name('about');
Route::get('/kontakt', [WebsiteController::class, 'contact'])->name('contact');
Route::get('/impressum', [WebsiteController::class, 'imprint'])->name('imprint');
Route::get('/services', [WebsiteController::class, 'services'])->name('services');
Route::get('/neuigkeiten', [WebsiteController::class, 'news'])->name('news');
Route::get('/beantragen', [WebsiteController::class, 'apply'])->name('apply');
Route::get('/intern/registrieren', [WebsiteController::class, 'showRegister']);
Route::post('/intern/registrieren/abschicken', [LoginController::class, 'register']);
Route::get('/intern/anmelden', [WebsiteController::class, 'showLogin']);
Route::post('/intern/anmelden/einloggen', [LoginController::class, 'login']);
Route::get('/intern/abmelden', function(){
Auth::logout();
return redirect("/");
})->name('logout');
Route::get('/intern/ticker', [WebsiteController::class, 'editTicker'])->name('editTicker');
Route::delete('/intern/ticker/remove', [TickerController::class, 'deleteTicker']);
Route::put('/intern/ticker/add', [TickerController::class, 'addTicker']);
Route::get('/intern/nachrichten', [WebsiteController::class, 'editNews'])->name('editNews');
Route::post('/intern/nachrichten/add', [BlogController::class, 'addBlog']);
Route::delete('/intern/nachrichten/delete', [BlogController::class, 'deleteBlog']);
Route::put('/intern/nachrichten/edit', [BlogController::class, 'editBlog']);

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

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

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