3
0
Fork 0

Updated to Laravel 9, small fixes, and more

This commit is contained in:
SBDeveloper 2022-11-28 21:07:07 +01:00
parent 6fc52ee512
commit 9fd844ae1a
24 changed files with 5589 additions and 2557 deletions

View file

@ -1,24 +1,31 @@
APP_NAME=ThemePark APP_NAME=ThemeParkPanel
APP_ENV=local APP_ENV=local
APP_KEY=base64:NgU4ntPnC5jzbmnTbXM5cahMRa5GCrfUyb3P+3tq9BM= APP_KEY=
APP_DEBUG=true APP_DEBUG=false
APP_URL=http://localhost APP_URL=https://yourpanellink.com
HOME_PAGE=false LOG_CHANNEL=stack
SHOWS=true
STORE_URL=''
OPENAUDIOMC_URL=''
DB_CONNECTION=mysql DB_CONNECTION=mysql
DB_HOST=127.0.0.1 DB_HOST=127.0.0.1
DB_PORT=3306 DB_PORT=3306
DB_DATABASE=themepark DB_DATABASE=themeparkpanel
DB_USERNAME=root DB_USERNAME=root
DB_PASSWORD= DB_PASSWORD=yourpassword
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
MAIL_DRIVER=smtp MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io MAIL_HOST=web.yourhosting.com
MAIL_PORT=2525 MAIL_PORT=587
MAIL_USERNAME=null MAIL_USERNAME=yourmail@yourpanellink.com
MAIL_PASSWORD=null MAIL_PASSWORD=yourpassword
MAIL_ENCRYPTION=null MAIL_ENCRYPTION=tls
STORE_URL=https://store.yourpanellink.com
SHOWS=true
HOME_PAGE=true

5
.gitattributes vendored
View file

@ -1,5 +0,0 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore

5
.gitignore vendored
View file

@ -1,13 +1,18 @@
/node_modules /node_modules
/public/build
/public/hot /public/hot
/public/storage /public/storage
/storage/*.key /storage/*.key
/vendor /vendor
.env .env
.env.backup .env.backup
.env.production
.phpunit.result.cache .phpunit.result.cache
Homestead.json Homestead.json
Homestead.yaml Homestead.yaml
auth.json
npm-debug.log npm-debug.log
yarn-error.log yarn-error.log
/.fleet
/.idea /.idea
/.vscode

18
.htaccess Normal file
View file

@ -0,0 +1,18 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]
RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
RewriteRule ^(.*)$ public/$1
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ server.php
</IfModule>

View file

@ -1,14 +1,17 @@
<?php <?php
namespace App\Cache; namespace App\Cache;
class Cache { class Cache
{
public static function getUsername($uuid) { public static function getUsername($uuid)
{
if (file_exists(storage_path('app/uuid/' . $uuid . '.json'))) { if (file_exists(storage_path('app/uuid/' . $uuid . '.json'))) {
$json = file_get_contents(storage_path('app/uuid/' . $uuid . '.json')); $json = file_get_contents(storage_path('app/uuid/' . $uuid . '.json'));
$json = json_decode($json, true); $json = json_decode($json, true);
if ((time() - strtotime($json['time'])) > 3600) { if ((time() - strtotime($json['time'])) > 3600) {
$json = file_get_contents('https://api.mojang.com/user/profiles/'.$uuid.'/names'); $json = file_get_contents('https://api.mojang.com/user/profile/' . $uuid);
if (empty($json)) { if (empty($json)) {
$json = file_get_contents(storage_path('app/uuid/' . $uuid . '.json')); $json = file_get_contents(storage_path('app/uuid/' . $uuid . '.json'));
$json = json_decode($json, true); $json = json_decode($json, true);
@ -22,17 +25,14 @@ class Cache {
return $json['name']; return $json['name'];
} }
$name = $json[count($json) -1]['name']; $name = $json['name'];
$json = []; $json = [];
$json['id'] = $uuid; $json['id'] = $uuid;
$json['name'] = $name; $json['name'] = $name;
self::saveJson($json); self::saveJson($json);
return $json['name'];
} else {
return $json['name'];
} }
} else { } else {
$json = file_get_contents('https://api.mojang.com/user/profiles/'.$uuid.'/names'); $json = file_get_contents('https://api.mojang.com/user/profile/' . $uuid);
if (empty($json)) if (empty($json))
return $uuid; return $uuid;
@ -40,16 +40,17 @@ class Cache {
if (isset($json['error'])) if (isset($json['error']))
return $uuid; return $uuid;
$name = $json[count($json) -1]['name']; $name = $json['name'];
$json = []; $json = [];
$json['id'] = $uuid; $json['id'] = $uuid;
$json['name'] = $name; $json['name'] = $name;
self::saveJson($json); self::saveJson($json);
}
return $json['name']; return $json['name'];
} }
}
public static function getUUID($username) { public static function getUUID($username)
{
foreach (glob(storage_path('app/uuid/*')) as $file) { foreach (glob(storage_path('app/uuid/*')) as $file) {
$json = file_get_contents($file); $json = file_get_contents($file);
$json = json_decode($json, true); $json = json_decode($json, true);
@ -70,10 +71,8 @@ class Cache {
} }
self::saveJson($json); self::saveJson($json);
return $json['id'];
} else {
return $json['id'];
} }
return $json['id'];
} }
$json = file_get_contents('https://api.mojang.com/users/profiles/minecraft/' . $username); $json = file_get_contents('https://api.mojang.com/users/profiles/minecraft/' . $username);
@ -88,7 +87,8 @@ class Cache {
return $json['id']; return $json['id'];
} }
public static function saveJson($json) { public static function saveJson($json)
{
$array = [ $array = [
'id' => $json['id'], 'id' => $json['id'],
'name' => $json['name'], 'name' => $json['name'],

View file

@ -2,7 +2,7 @@
namespace App\Exceptions; namespace App\Exceptions;
use Exception; Use Throwable;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
@ -29,10 +29,10 @@ class Handler extends ExceptionHandler
/** /**
* Report or log an exception. * Report or log an exception.
* *
* @param \Exception $exception * @param \Throwable $exception
* @return void * @return void
*/ */
public function report(Exception $exception) public function report(Throwable $exception)
{ {
parent::report($exception); parent::report($exception);
} }
@ -41,10 +41,10 @@ class Handler extends ExceptionHandler
* Render an exception into an HTTP response. * Render an exception into an HTTP response.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Exception $exception * @param \Throwable $exception
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function render($request, Exception $exception) public function render($request, Throwable $exception)
{ {
return parent::render($request, $exception); return parent::render($request, $exception);
} }

View file

@ -41,7 +41,7 @@ class HomeController extends Controller
public function photo() { public function photo() {
$photos = DB::table('actionfotos') $photos = DB::table('actionfotos')
->join('attractions', 'attractions.id', '=', 'actionfotos.ride') ->join('attraction', 'attraction.id', '=', 'actionfotos.ride')
->where('actionfotos.uuid', '=', Auth::user()->uuid) ->where('actionfotos.uuid', '=', Auth::user()->uuid)
->select('actionfotos.base64') ->select('actionfotos.base64')
->get()->all(); ->get()->all();

View file

@ -2,7 +2,7 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Fideloper\Proxy\TrustProxies as Middleware; use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class TrustProxies extends Middleware class TrustProxies extends Middleware
@ -19,5 +19,10 @@ class TrustProxies extends Middleware
* *
* @var int * @var int
*/ */
protected $headers = Request::HEADER_X_FORWARDED_ALL; protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
} }

View file

@ -3,6 +3,7 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
class AppServiceProvider extends ServiceProvider class AppServiceProvider extends ServiceProvider
{ {
@ -23,6 +24,6 @@ class AppServiceProvider extends ServiceProvider
*/ */
public function boot() public function boot()
{ {
// Schema::defaultStringLength(191);
} }
} }

View file

@ -8,63 +8,65 @@
], ],
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^7.2", "php": "^8.0",
"ext-json": "*", "ext-json": "*",
"bacon/bacon-qr-code": "~1.0.3", "bacon/bacon-qr-code": "^2.0",
"felixkiss/uniquewith-validator": "^3.3", "mattvb91/uniquewith-validator": "^3.4",
"fideloper/proxy": "^4.0", "fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"jenssegers/agent": "^2.6", "jenssegers/agent": "^2.6",
"laravel/framework": "^6.0", "laravel/framework": "^9.0",
"laravel/tinker": "^1.0", "laravel/sanctum": "^2.11",
"pragmarx/google2fa-laravel": "^1.2", "laravel/tinker": "^2.5",
"torann/geoip": "^1.0", "laravel/ui": "^3.4",
"ext-openssl": "*", "pragmarx/google2fa-laravel": "^2.0",
"ext-http": "*" "torann/geoip": "^3.0"
}, },
"require-dev": { "require-dev": {
"facade/ignition": "^1.4", "spatie/laravel-ignition": "^1.0",
"fzaninotto/faker": "^1.4", "fakerphp/faker": "^1.9.1",
"laravel/ui": "^1.0", "laravel/sail": "^1.0.1",
"mockery/mockery": "^1.0", "mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^3.0", "nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^8.0" "phpunit/phpunit": "^9.5.10"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"App\\": "app/" "App\\": "app/",
}, "Database\\Factories\\": "database/factories/",
"classmap": [ "Database\\Seeders\\": "database/seeders/"
"database/seeds", }
"database/factories"
]
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "psr-4": {
"Tests\\": "tests/" "Tests\\": "tests/"
} }
}, },
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": { "scripts": {
"post-autoload-dump": [ "post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi" "@php artisan package:discover --ansi"
], ],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [ "post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
], ],
"post-create-project-cmd": [ "post-create-project-cmd": [
"@php artisan key:generate --ansi" "@php artisan key:generate --ansi"
] ]
},
"extra": {
"laravel": {
"dont-discover": []
} }
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
} }

7141
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -67,7 +67,7 @@ return [
'NO_ZERO_IN_DATE', 'NO_ZERO_IN_DATE',
'NO_ZERO_DATE', 'NO_ZERO_DATE',
'ERROR_FOR_DIVISION_BY_ZERO', 'ERROR_FOR_DIVISION_BY_ZERO',
'NO_AUTO_CREATE_USER', //'NO_AUTO_CREATE_USER', // Broken???
'NO_ENGINE_SUBSTITUTION' 'NO_ENGINE_SUBSTITUTION'
], ],
], ],

View file

@ -166,7 +166,7 @@ return [
| |
*/ */
'secure' => env('SESSION_SECURE_COOKIE', false), 'secure' => env('SESSION_SECURE_COOKIE', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View file

@ -0,0 +1,31 @@
<?php
use App\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
$this->call(PermissionSeeder::class);
$user = User::create([
'firstname' => 'Admin',
'surname' => '',
'email' => 'admin@localhost',
'password' => Hash::make('admin'),
]);
DB::table('users')->where('id', $user->id)->update([
'email_verified_at' => DB::raw('CURRENT_TIMESTAMP')
]);
$user->assignRole('administrator');
}
}

View file

@ -0,0 +1,42 @@
<?php
use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Permission;
use Spatie\Permission\Models\Role;
class PermissionSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$permissions = Permission::select('name')->get();
$array = [
'roles_see', 'roles_edit',
'status_see', 'status_edit',
'project_see', 'project_edit',
'user_see', 'user_edit',
'order_see', 'order_edit'
];
foreach($array as $name) {
if($permissions->contains('name', $name))
continue;
Permission::create([
'name' => $name
]);
}
$role = Role::create([
'name' => 'administrator',
'readable_name' => 'Administrator',
'color' => '#e74c3c',
'index' => 1
]);
$role->syncPermissions($array);
}
}

View file

@ -13,102 +13,108 @@ html, body {
font-family: sans-serif; font-family: sans-serif;
} }
.page {
width: 360px;
padding: 8% 0 0;
margin: auto
}
.page>div,
.page>form {
position: relative;
z-index: 1;
background: var(--color-text);
max-width: 360px;
margin: 0 auto 100px;
padding: 15px 45px 15px 45px;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, .2), 0 5px 5px 0 rgba(0, 0, 0, .24);
border-radius: 3px
}
.page>div img,
.page form img {
width: 80%;
display: block;
margin: auto;
margin-bottom: 15px!important
}
.page form .input-group {
margin-bottom: 10px
}
.login-page { .login-page {
width: 360px; background-size: cover;
padding: 8% 0 0; display: flex;
margin: auto; height: 100vh;
width: 100vw;
overflow: hidden;
background: var(--banner) no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
flex-direction: column;
} }
.login-page form { .login-text {
position: relative; width: 100%;
height: available;
min-height: 50%;
display: flex;
align-items: center;
justify-content: center;
z-index: 1; z-index: 1;
background: #FFFFFF; flex: 1;
max-width: 360px;
margin: 0 auto 100px;
padding: 15px 45px 45px 45px;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
border-radius: 3px;
} }
.login-page form h1 { .login-body {
float: right;
width: 100%;
height: fit-content;
display: flex;
align-items: center;
justify-content: center;
border-top-left-radius: 2.5rem;
border-top-right-radius: 2.5rem;
--tw-bg-opacity: 1;
background-color: #fff;
padding: 3rem 1.5rem 4rem;
overflow: hidden;
z-index: 1;
}
@media (min-width: 768px) {
.login-page {
flex-direction: row;
}
.login-text {
width: 65%;
}
.login-body {
position: relative;
height: 100%;
width: 35%;
border-top-right-radius: 0;
border-bottom-left-radius: 2.5rem;
padding: 1rem;
}
}
@media (min-width: 1024px) {
.login-body > div:not(.login-footer) {
width: 60%
}
}
.login-footer {
position: absolute;
bottom: 0;
width: 100%;
text-align: center; text-align: center;
} padding: 10px;
.login-page form input {
outline: 0;
background: #f2f2f2;
width: 100%;
border: 0;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;
border-radius: 3px;
}
.login-page form button {
outline: 0;
background: var(--color-light);
width: 100%;
border: 0;
padding: 15px;
color: var(--color-text);
font-size: 20px;
cursor: pointer;
border-radius: 3px;
}
.login-page form button:hover,.form button:active,.form button:focus {
background: var(--color-dark);
}
.login-page form .message {
margin: 15px 0 0;
color: #7f8c8d;
font-size: 14px;
}
.login-page form .message a {
color: var(--color-dark);
text-decoration: none; text-decoration: none;
z-index: 1;
} }
.login-page form .message a:hover { .login-footer span {
font-weight: 600;
}
.login-footer span a img {
height: 20px !important;
}
.form-input {
border-radius: 0.35rem;
margin-bottom: 1rem;
width: 100%;
border: 0 solid #9ca3af;
border-bottom-width: 2px;
background-color: #f9fafb;
padding: 0.5rem;
color: #333;
}
form a {
color: var(--color-light); color: var(--color-light);
} }
.login-page form .register-form { form a:hover {
display: none; color: var(--color-dark);
text-decoration: underline;
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
@ -128,6 +134,7 @@ html, body {
height: 150px; height: 150px;
} }
.login-page:after,
.banner:after { .banner:after {
content: '\A'; content: '\A';
position: absolute; position: absolute;
@ -157,7 +164,7 @@ html, body {
.footer { .footer {
margin-bottom: 0; margin-bottom: 0;
background-color: #fff; background-color: #fff;
position: absolute; position: fixed;
bottom: 0; bottom: 0;
text-align: center; text-align: center;
padding: 10px; padding: 10px;
@ -509,7 +516,7 @@ code i {
height:100%; height:100%;
top: 0; top: 0;
left: 0; left: 0;
background: rgba(0,0,0,0.3); background: rgba(0,0,0,0.4);
} }
.status-card > .card-body { .status-card > .card-body {
@ -584,6 +591,7 @@ code i {
.card-container { .card-container {
display: flex; display: flex;
justify-items: stretch; justify-items: stretch;
flex-wrap: wrap;
} }
} }
@ -620,3 +628,63 @@ code i {
font-weight: bolder; font-weight: bolder;
margin-bottom: .75rem; margin-bottom: .75rem;
} }
/* Operator Page */
.operator-item {
padding: 25px 25px 65px;
border-radius: 15px;
background-color: #fff;
text-align: center;
position: relative;
width: 100%;
transition: box-shadow 0.15s;
margin-bottom: 25px;
}
.operator-item-glow {
box-shadow: 0 0 10px 2px rgba(241,212,37,0.7);
}
.operator-item .operator-item-cover {
width: 80%;
max-width: 180px;
height: auto;
margin-bottom: 15px;
}
.operator-item .operator-badge {
display: block;
padding: 10px 35px;
border-radius: 5px;
background-color: #666;
color: #fff;
width: fit-content;
position: absolute;
bottom: 25px;
left: 50%;
transform: translate(-50%, 0);
cursor: pointer;
}
@media (max-width: 768px) {
.notifications-container {
max-width: unset;
width: 90%;
}
.notify-is-right .notify {
right: 5%;
}
}
.notifications-container {
max-width: 380px;
}
.notify__title {
font-size: 1.5rem;
}
.notify__text {
font-size: 1.25rem;
}

View file

@ -1,72 +0,0 @@
<p align="center"><img src="https://res.cloudinary.com/dtfbvvkyp/image/upload/v1566331377/laravel-logolockup-cmyk-red.svg" width="400"></p>
<p align="center">
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/d/total.svg" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/v/stable.svg" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/license.svg" 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.
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 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.
## Laravel Sponsors
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Cubet Techno Labs](https://cubettech.com)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[British Software Development](https://www.britishsoftware.co)**
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
- **[DevSquad](https://devsquad.com)**
- [UserInsights](https://userinsights.com)
- [Fragrantica](https://www.fragrantica.com)
- [SOFTonSOFA](https://softonsofa.com/)
- [User10](https://user10.com)
- [Soumettre.fr](https://soumettre.fr/)
- [CodeBrisk](https://codebrisk.com)
- [1Forge](https://1forge.com)
- [TECPRESSO](https://tecpresso.co.jp/)
- [Runtime Converter](http://runtimeconverter.com/)
- [WebL'Agence](https://weblagence.com/)
- [Invoice Ninja](https://www.invoiceninja.com)
- [iMi digital](https://www.imi-digital.de/)
- [Earthlink](https://www.earthlink.ro/)
- [Steadfast Collective](https://steadfastcollective.com/)
- [We Are The Robots Inc.](https://watr.mx/)
- [Understand.io](https://www.understand.io/)
- [Abdel Elrafa](https://abdelelrafa.com)
- [Hyper Host](https://hyper.host)
## 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).
## 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-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

View file

@ -1,26 +1,31 @@
@extends('layouts.default') @extends('layouts.form')
@section('body') @section('body')
<div class="page"> <div class="login-page">
<div class="form"> <div class="login-text">
<form method="post" action="{{ route('login') }}" action="{{ route('2fa.authenticate') }}">
@csrf
@component('components.title') @component('components.title')
@endcomponent @endcomponent
<div class="form-group @error('two_factor') has-error @enderror">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="two_factor" type="text" class="form-control" name="two_factor" required autocomplete="off" autofocus>
</div>
@error('two_factor')
<span class="help-block" style="font-size: 12px">{{ $message }}</span>
@enderror
</div> </div>
<div class="login-body">
<div>
<form method="post" action="{{ route('login') }}" action="{{ route('2fa.authenticate') }}">
@csrf
<label class="col-xs-12">
Token:
<input id="two_factor" type="text" class="form-input" name="two_factor" placeholder="123456" required autocomplete="off" autofocus>
</label>
<div class="col-xs-12">
<button class="btn btn-custom" style="width: 100%">{{ __('Authenticate') }}</button> <button class="btn btn-custom" style="width: 100%">{{ __('Authenticate') }}</button>
<a class="btn btn-link" href="{{ route('logout') }}">{{ __('Logout') }}</a> <a class="btn btn-link" style="margin-top: 1rem" href="{{ route('logout') }}">{{ __('Logout') }}</a>
</div>
</form> </form>
</div> </div>
<div class="login-footer">
<span>Copyright &copy; 2019-{{ date('Y') }} <a href="https://www.iobyte.nl/"><img src="{{ asset('assets/img/logo.png') }}" alt="IOByte"></a>. All rights reserved.</span>
</div>
</div>
</div> </div>
@endsection @endsection

View file

@ -1,12 +1,15 @@
@extends('layouts.default') @extends('layouts.form')
@section('body') @section('body')
<div class="page"> <div class="login-page">
<div class="form"> <div class="login-text">
<form method="post" action="{{ route('login') }}">
@csrf
@component('components.title') @component('components.title')
@endcomponent @endcomponent
</div>
<div class="login-body">
<div>
<form method="post" action="{{ route('login') }}">
@csrf
@if($errors->any()) @if($errors->any())
<div class="alert alert-danger" role="alert"> <div class="alert alert-danger" role="alert">
@ -15,19 +18,27 @@
</div> </div>
@endif @endif
<div class="input-group"> <label class="col-xs-12">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span> Username:
<input id="uuid" type="text" class="form-control" name="uuid" value="{{ old('username') }}" placeholder="Username" required autocomplete="username" autofocus> <input id="uuid" type="text" class="form-input" name="uuid" value="{{ old('username') }}" placeholder="IOByte" required autocomplete="username" autofocus>
</label>
<label class="col-xs-12">
Password:
<input id="password" type="password" class="form-input" name="password" placeholder="••••••••••" required autocomplete="current-password">
</label>
<div class="col-xs-12">
<button class="btn btn-custom" style="width: 100%">{{ __('Login') }}</button>
<p style="margin-top: 1rem">No account yet, <a href="{{ route('register') }}">{{ __('Register one') }} </a>or,
<br>Did you <a href="{{ route('password.request') }}">{{ __('forget your password') }}</a>?</p>
</div> </div>
<div class="input-group"> </form>
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="password" type="password" class="form-control" name="password" placeholder="Password" required autocomplete="current-password">
</div> </div>
<button class="btn btn-custom" style="width: 100%">{{ __('Login') }}</button> <div class="login-footer">
<p>No account yet, <a href="{{ route('register') }}">{{ __('Register one') }} </a>or, <span>Copyright &copy; 2019-{{ date('Y') }} <a href="https://www.iobyte.nl/"><img src="{{ asset('assets/img/logo.png') }}" alt="IOByte"></a>. All rights reserved.</span>
<br>Did you <a href="{{ route('password.request') }}">{{ __('forget your password') }}</a>?</p> </div>
</form>
</div> </div>
</div> </div>
@endsection @endsection

View file

@ -1,12 +1,15 @@
@extends('layouts.default') @extends('layouts.form')
@section('body') @section('body')
<div class="page"> <div class="login-page">
<div class="form"> <div class="login-text">
<form method="post" action="{{ route('password.email') }}">
@csrf
@component('components.title') @component('components.title')
@endcomponent @endcomponent
</div>
<div class="login-body">
<div>
<form method="post" action="{{ route('password.email') }}">
@csrf
@if(session('status')) @if(session('status'))
<div class="alert alert-success" role="alert"> <div class="alert alert-success" role="alert">
@ -15,13 +18,21 @@
</div> </div>
@endif @endif
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span> <label class="col-xs-12">
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="Email" required autocomplete="email" autofocus> Email:
<input id="email" type="email" class="form-input" name="email" value="{{ old('email') }}" placeholder="my.mail@example.com" required autocomplete="email" autofocus>
</label>
<div class="col-xs-12">
<button class="btn btn-custom" style="width: 100%">{{ __('Reset Password') }}</button>
</div>
</form>
</div> </div>
<button class="btn btn-custom" style="width: 100%">{{ __('Reset Password') }}</button> <div class="login-footer">
</form> <span>Copyright &copy; 2019-{{ date('Y') }} <a href="https://www.iobyte.nl/"><img src="{{ asset('assets/img/logo.png') }}" alt="IOByte"></a>. All rights reserved.</span>
</div>
</div> </div>
</div> </div>
@endsection @endsection

View file

@ -1,41 +1,52 @@
@extends('layouts.default') @extends('layouts.form')
@section('body') @section('body')
<div class="page"> <div class="login-page">
<div class="form"> <div class="login-text">
@component('components.title')
@endcomponent
</div>
<div class="login-body">
<div>
<form method="post" action="{{ route('password.update') }}"> <form method="post" action="{{ route('password.update') }}">
@csrf @csrf
<input type="hidden" name="token" value="{{ $token }}"> <input type="hidden" name="token" value="{{ $token }}">
@component('components.title')
@endcomponent
<div class="form-group @error('email') has-error @enderror"> <label class="col-xs-12">
<div class="input-group"> Email:
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span> <input id="email" type="email" class="form-input" name="email" value="{{ $email ?? old('email') }}" placeholder="my.mail@example.com" required autocomplete="email" autofocus>
<input id="email" type="email" class="form-control" name="email" value="{{ $email ?? old('email') }}" placeholder="Email" required autocomplete="email" autofocus> </label>
</div>
@error('email')
<span class="help-block" style="font-size: 12px">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('password') has-error @enderror"> <label class="col-xs-12">
<div class="input-group"> Password:
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span> <input type="password" class="form-input" name="password" placeholder="••••••••••" required autocomplete="new-password">
<input type="password" class="form-control" name="password" placeholder="Password" required autocomplete="new-password"> </label>
</div>
@error('password')
<span class="help-block" style="font-size: 12px">{{ $message }}</span>
@enderror
</div>
<div class="input-group"> <label class="col-xs-12">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span> Confirm Password:
<input type="password" class="form-control" name="password_confirmation" placeholder="Confirm Password" required autocomplete="new-password"> <input type="password" class="form-input" name="password_confirmation" placeholder="••••••••••" required autocomplete="new-password">
</div> </label>
<div class="col-xs-12">
<button class="btn btn-custom" style="width: 100%">{{ __('Reset Password') }}</button> <button class="btn btn-custom" style="width: 100%">{{ __('Reset Password') }}</button>
</div>
</form> </form>
</div> </div>
<div class="login-footer">
<span>Copyright &copy; 2019-{{ date('Y') }} <a href="https://www.iobyte.nl/"><img src="{{ asset('assets/img/logo.png') }}" alt="IOByte"></a>. All rights reserved.</span>
</div>
</div>
</div> </div>
@endsection @endsection
@section('javascript')
<script>
window.onload = () => {
const passInput = document.getElementById('password_confirmation');
passInput.onpaste = (e) => {
e.preventDefault();
};
};
</script>
@endsection

View file

@ -1,12 +1,25 @@
@extends('layouts.default') @extends('layouts.form')
@section('body') @section('body')
<div class="page"> <div class="login-page">
<div class="form"> <div class="login-text">
<form method="post" action="{{ route('register') }}">
@csrf
@component('components.title') @component('components.title')
@endcomponent @endcomponent
</div>
<div class="login-body">
<div>
<form method="post" action="{{ route('register') }}">
@csrf
@if(!empty(env('APP_LOGO', '')))
<div class="col-xs-12 hidden-xs">
<img src="{{ env('APP_LOGO') }}" style="max-width: 80%; max-height: 50px; height: auto; width: auto">
</div>
<div class="col-xs-12 hidden-lg hidden-md hidden-sm">
<img src="{{ env('APP_LOGO') }}" style="max-width: 80%; max-height: 50px; height: auto; width: auto; filter: brightness(0)">
</div>
@else
<h2 class="text-center">{{ env('APP_NAME', 'ThemePark') }}</h2>
@endif
@if($errors->any()) @if($errors->any())
<div class="alert alert-danger" role="alert"> <div class="alert alert-danger" role="alert">
@ -15,30 +28,37 @@
</div> </div>
@endif @endif
<div class="input-group"> <label class="col-xs-12">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span> Username:
<input id="username" type="text" class="form-control" name="username" value="{{ old('username') }}" placeholder="Username" required autocomplete="username" autofocus> <input id="username" type="text" class="form-input" name="username" value="{{ old('username') }}" placeholder="IOByte" required autocomplete="username" autofocus>
</div> </label>
<div class="input-group"> <label class="col-xs-12">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span> Email:
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="Email" required autocomplete="email" autofocus> <input id="email" type="email" class="form-input" name="email" value="{{ old('email') }}" placeholder="my.mail@example.com" required autocomplete="email" autofocus>
</div> </label>
<div class="input-group"> <label class="col-xs-12">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span> Password:
<input id="password" type="password" class="form-control" name="password" placeholder="Password" required autocomplete="off"> <input id="password" type="password" class="form-input" name="password" placeholder="••••••••••" required autocomplete="off">
</div> </label>
<div class="input-group"> <label class="col-xs-12">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span> Confirm Password:
<input id="password_confirmation" type="password" class="form-control" name="password_confirmation" placeholder="Confirm Password" required autocomplete="off"> <input id="password_confirmation" type="password" class="form-input" name="password_confirmation" placeholder="••••••••••" required autocomplete="off">
</div> </label>
<div class="col-xs-12">
<button class="btn btn-custom" style="width: 100%">{{ __('Register') }}</button> <button class="btn btn-custom" style="width: 100%">{{ __('Register') }}</button>
<p>Already have an account, <a href="{{ route('login') }}">{{ __('Login') }} </a></p> <p style="margin-top: 1rem">Already have an account, <a href="{{ route('login') }}">{{ __('Login') }} </a></p>
</div>
</form> </form>
</div> </div>
<div class="login-footer">
<span>Copyright &copy; 2019-{{ date('Y') }} <a href="https://www.iobyte.nl/"><img src="{{ asset('assets/img/logo.png') }}" alt="IOByte"></a>. All rights reserved.</span>
</div>
</div>
</div> </div>
@endsection @endsection

View file

@ -1,10 +1,16 @@
@extends('layouts.default') @extends('layouts.form')
@section('body') @section('body')
<div class="page"> <div class="login-page">
<div class="form"> <div class="login-text">
@component('components.title') @component('components.title')
@endcomponent @endcomponent
</div>
<div class="login-body">
<div>
<form method="POST" action="{{ route('verification.resend') }}">
@csrf
@if (session('resent')) @if (session('resent'))
<div class="alert alert-success" role="alert"> <div class="alert alert-success" role="alert">
@ -13,11 +19,18 @@
</div> </div>
@endif @endif
<div class="col-xs-12">
<p>{{ __('Before proceeding, please check your email for a verification link. If you did not receive an email press the button bellow to resend the email.') }}</p> <p>{{ __('Before proceeding, please check your email for a verification link. If you did not receive an email press the button bellow to resend the email.') }}</p>
<form method="POST" action="{{ route('verification.resend') }}">
@csrf <button type="submit" class="btn btn-custom" style="width: 100%; margin-top: 1rem">{{ __('Resend Email') }}</button>
<button type="submit" class="btn btn-custom" style="width: 100%">{{ __('Resend Email') }}</button> </div>
</form> </form>
</div> </div>
<div class="login-footer">
<span>Copyright &copy; 2019-{{ date('Y') }} <a href="https://www.iobyte.nl/"><img src="{{ asset('assets/img/logo.png') }}" alt="IOByte"></a>. All rights reserved.</span>
</div>
</div>
</div> </div>
@endsection @endsection

View file

@ -0,0 +1,38 @@
<html lang="en">
<head>
<!-- ==============================================
Title and Meta Tags
=============================================== -->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ env('APP_NAME', 'ThemePark') }}</title>
<!-- ==============================================
Favicon
=============================================== -->
<link rel="icon" type="image/x-icon" href="{{ asset('assets/img/favicon.ico') }}" />
<link rel="icon" type="image/png" href="{{ asset('assets/img/favicon-32x32.png') }}" sizes="32x32" />
<link rel="icon" type="image/png" href="{{ asset('assets/img/favicon-16x16.png') }}" sizes="16x16" />
<!-- ==============================================
CSS Files
=============================================== -->
<link href="{{ asset('assets/css/bootstrap.min.css') }}" rel="stylesheet">
@yield('css')
<link href="{{ asset('assets/css/style.css') }}" rel="stylesheet">
</head>
<body>
@yield('body')
<!-- ==============================================
JS Files
=============================================== -->
<script src="{{ asset('assets/js/jquery.min.js') }}"></script>
<script src="{{ asset('assets/js/bootstrap.min.js') }}"></script>
<script src="{{ asset('assets/js/core.js') }}"></script>
@yield('javascript')
</body>
</html>