first init
18
.editorconfig
Executable 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
|
||||||
|
|
||||||
|
[docker-compose.yml]
|
||||||
|
indent_size = 4
|
||||||
66
.env.example
Executable file
@@ -0,0 +1,66 @@
|
|||||||
|
APP_NAME=Laravel
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_TIMEZONE=UTC
|
||||||
|
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=sqlite
|
||||||
|
# DB_HOST=127.0.0.1
|
||||||
|
# DB_PORT=3306
|
||||||
|
# DB_DATABASE=laravel
|
||||||
|
# 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_HOST=127.0.0.1
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_FROM_ADDRESS="hello@example.com"
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||||
|
|
||||||
|
VITE_APP_NAME="${APP_NAME}"
|
||||||
11
.gitattributes
vendored
Executable 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
|
||||||
23
.gitignore
vendored
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
/.phpunit.cache
|
||||||
|
/node_modules
|
||||||
|
/public/build
|
||||||
|
/public/hot
|
||||||
|
/public/storage
|
||||||
|
/storage/*.key
|
||||||
|
/storage/pail
|
||||||
|
/vendor
|
||||||
|
.env
|
||||||
|
.env.backup
|
||||||
|
.env.production
|
||||||
|
.phpactor.json
|
||||||
|
.phpunit.result.cache
|
||||||
|
Homestead.json
|
||||||
|
Homestead.yaml
|
||||||
|
auth.json
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
/.fleet
|
||||||
|
/.idea
|
||||||
|
/.nova
|
||||||
|
/.vscode
|
||||||
|
/.zed
|
||||||
66
README.md
Executable file
@@ -0,0 +1,66 @@
|
|||||||
|
<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.
|
||||||
|
|
||||||
|
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
|
||||||
|
|
||||||
|
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts 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.
|
||||||
|
|
||||||
|
## 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 Partners program](https://partners.laravel.com).
|
||||||
|
|
||||||
|
### Premium Partners
|
||||||
|
|
||||||
|
- **[Vehikl](https://vehikl.com/)**
|
||||||
|
- **[Tighten Co.](https://tighten.co)**
|
||||||
|
- **[WebReinvent](https://webreinvent.com/)**
|
||||||
|
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
|
||||||
|
- **[64 Robots](https://64robots.com)**
|
||||||
|
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
|
||||||
|
- **[Cyber-Duck](https://cyber-duck.co.uk)**
|
||||||
|
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
|
||||||
|
- **[Jump24](https://jump24.co.uk)**
|
||||||
|
- **[Redberry](https://redberry.international/laravel/)**
|
||||||
|
- **[Active Logic](https://activelogic.com)**
|
||||||
|
- **[byte5](https://byte5.de)**
|
||||||
|
- **[OP.GG](https://op.gg)**
|
||||||
|
|
||||||
|
## 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).
|
||||||
55
app/Http/Controllers/Auth/AuthenticatedSessionController.php
Executable file
@@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Requests\Auth\LoginRequest;
|
||||||
|
use App\Providers\RouteServiceProvider;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
|
|
||||||
|
class AuthenticatedSessionController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display the login view.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\View\View
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
return view('auth.signin');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle an incoming authentication request.
|
||||||
|
*
|
||||||
|
* @param \App\Http\Requests\Auth\LoginRequest $request
|
||||||
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
|
*/
|
||||||
|
public function store(LoginRequest $request)
|
||||||
|
{
|
||||||
|
$request->authenticate();
|
||||||
|
|
||||||
|
$request->session()->regenerate();
|
||||||
|
|
||||||
|
return redirect()->intended(RouteServiceProvider::HOME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroy an authenticated session.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
|
*/
|
||||||
|
public function destroy(Request $request)
|
||||||
|
{
|
||||||
|
Auth::guard('web')->logout();
|
||||||
|
|
||||||
|
$request->session()->invalidate();
|
||||||
|
|
||||||
|
$request->session()->regenerateToken();
|
||||||
|
|
||||||
|
return redirect('/');
|
||||||
|
}
|
||||||
|
}
|
||||||
44
app/Http/Controllers/Auth/ConfirmablePasswordController.php
Executable file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Providers\RouteServiceProvider;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
|
class ConfirmablePasswordController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Show the confirm password view.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\View\View
|
||||||
|
*/
|
||||||
|
public function show()
|
||||||
|
{
|
||||||
|
return view('auth.confirm-password');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Confirm the user's password.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
if (! Auth::guard('web')->validate([
|
||||||
|
'email' => $request->user()->email,
|
||||||
|
'password' => $request->password,
|
||||||
|
])) {
|
||||||
|
throw ValidationException::withMessages([
|
||||||
|
'password' => __('auth.password'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$request->session()->put('auth.password_confirmed_at', time());
|
||||||
|
|
||||||
|
return redirect()->intended(RouteServiceProvider::HOME);
|
||||||
|
}
|
||||||
|
}
|
||||||
27
app/Http/Controllers/Auth/EmailVerificationNotificationController.php
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Providers\RouteServiceProvider;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class EmailVerificationNotificationController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Send a new email verification notification.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
if ($request->user()->hasVerifiedEmail()) {
|
||||||
|
return redirect()->intended(RouteServiceProvider::HOME);
|
||||||
|
}
|
||||||
|
|
||||||
|
$request->user()->sendEmailVerificationNotification();
|
||||||
|
|
||||||
|
return back()->with('status', 'verification-link-sent');
|
||||||
|
}
|
||||||
|
}
|
||||||
23
app/Http/Controllers/Auth/EmailVerificationPromptController.php
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Providers\RouteServiceProvider;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class EmailVerificationPromptController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display the email verification prompt.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function __invoke(Request $request)
|
||||||
|
{
|
||||||
|
return $request->user()->hasVerifiedEmail()
|
||||||
|
? redirect()->intended(RouteServiceProvider::HOME)
|
||||||
|
: view('auth.verify-email');
|
||||||
|
}
|
||||||
|
}
|
||||||
65
app/Http/Controllers/Auth/NewPasswordController.php
Executable file
@@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Auth\Events\PasswordReset;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Support\Facades\Password;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
use Illuminate\Validation\Rules;
|
||||||
|
|
||||||
|
class NewPasswordController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display the password reset view.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\View\View
|
||||||
|
*/
|
||||||
|
public function create(Request $request)
|
||||||
|
{
|
||||||
|
return view('auth.reset-password', ['request' => $request]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle an incoming new password request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
|
*
|
||||||
|
* @throws \Illuminate\Validation\ValidationException
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'token' => ['required'],
|
||||||
|
'email' => ['required', 'email'],
|
||||||
|
'password' => ['required', 'confirmed', Rules\Password::defaults()],
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Here we will attempt to reset the user's password. If it is successful we
|
||||||
|
// will update the password on an actual user model and persist it to the
|
||||||
|
// database. Otherwise we will parse the error and return the response.
|
||||||
|
$status = Password::reset(
|
||||||
|
$request->only('email', 'password', 'password_confirmation', 'token'),
|
||||||
|
function ($user) use ($request) {
|
||||||
|
$user->forceFill([
|
||||||
|
'password' => Hash::make($request->password),
|
||||||
|
'remember_token' => Str::random(60),
|
||||||
|
])->save();
|
||||||
|
|
||||||
|
event(new PasswordReset($user));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// If the password was successfully reset, we will redirect the user back to
|
||||||
|
// the application's home authenticated view. If there is an error we can
|
||||||
|
// redirect them back to where they came from with their error message.
|
||||||
|
return $status == Password::PASSWORD_RESET
|
||||||
|
? redirect()->route('login')->with('status', __($status))
|
||||||
|
: back()->withInput($request->only('email'))
|
||||||
|
->withErrors(['email' => __($status)]);
|
||||||
|
}
|
||||||
|
}
|
||||||
47
app/Http/Controllers/Auth/PasswordResetLinkController.php
Executable file
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Support\Facades\Password;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class PasswordResetLinkController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display the password reset link request view.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\View\View
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
return view('auth.forgot-password');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle an incoming password reset link request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
|
*
|
||||||
|
* @throws \Illuminate\Validation\ValidationException
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'email' => ['required', 'email'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
// We will send the password reset link to this user. Once we have attempted
|
||||||
|
// to send the link, we will examine the response then see the message we
|
||||||
|
// need to show to the user. Finally, we'll send out a proper response.
|
||||||
|
$status = Password::sendResetLink(
|
||||||
|
$request->only('email')
|
||||||
|
);
|
||||||
|
|
||||||
|
return $status == Password::RESET_LINK_SENT
|
||||||
|
? back()->with('status', __($status))
|
||||||
|
: back()->withInput($request->only('email'))
|
||||||
|
->withErrors(['email' => __($status)]);
|
||||||
|
}
|
||||||
|
}
|
||||||
54
app/Http/Controllers/Auth/RegisteredUserController.php
Executable file
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Providers\RouteServiceProvider;
|
||||||
|
use Illuminate\Auth\Events\Registered;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Validation\Rules;
|
||||||
|
|
||||||
|
class RegisteredUserController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display the registration view.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\View\View
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
return view('auth.register');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle an incoming registration request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
|
*
|
||||||
|
* @throws \Illuminate\Validation\ValidationException
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'name' => ['required', 'string', 'max:255'],
|
||||||
|
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
||||||
|
'password' => ['required', 'confirmed', Rules\Password::defaults()],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$user = User::create([
|
||||||
|
'name' => $request->name,
|
||||||
|
'email' => $request->email,
|
||||||
|
'password' => Hash::make($request->password),
|
||||||
|
]);
|
||||||
|
|
||||||
|
event(new Registered($user));
|
||||||
|
|
||||||
|
Auth::login($user);
|
||||||
|
|
||||||
|
return redirect(RouteServiceProvider::HOME);
|
||||||
|
}
|
||||||
|
}
|
||||||
30
app/Http/Controllers/Auth/VerifyEmailController.php
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Providers\RouteServiceProvider;
|
||||||
|
use Illuminate\Auth\Events\Verified;
|
||||||
|
use Illuminate\Foundation\Auth\EmailVerificationRequest;
|
||||||
|
|
||||||
|
class VerifyEmailController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Mark the authenticated user's email address as verified.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Foundation\Auth\EmailVerificationRequest $request
|
||||||
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
|
*/
|
||||||
|
public function __invoke(EmailVerificationRequest $request)
|
||||||
|
{
|
||||||
|
if ($request->user()->hasVerifiedEmail()) {
|
||||||
|
return redirect()->intended(RouteServiceProvider::HOME.'?verified=1');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->user()->markEmailAsVerified()) {
|
||||||
|
event(new Verified($request->user()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->intended(RouteServiceProvider::HOME.'?verified=1');
|
||||||
|
}
|
||||||
|
}
|
||||||
8
app/Http/Controllers/Controller.php
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
abstract class Controller
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
44
app/Http/Controllers/RoutingController.php
Executable file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class RoutingController extends Controller
|
||||||
|
{
|
||||||
|
public function index(Request $request)
|
||||||
|
{
|
||||||
|
if (Auth::user()) {
|
||||||
|
return redirect('index');
|
||||||
|
} else {
|
||||||
|
return redirect('auth.signin');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a view based on first route param
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function root(Request $request, $first)
|
||||||
|
{
|
||||||
|
return view($first);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* second level route
|
||||||
|
*/
|
||||||
|
public function secondLevel(Request $request, $first, $second)
|
||||||
|
{
|
||||||
|
return view($first . '.' . $second);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* third level route
|
||||||
|
*/
|
||||||
|
public function thirdLevel(Request $request, $first, $second, $third)
|
||||||
|
{
|
||||||
|
return view($first . '.' . $second . '.' . $third);
|
||||||
|
}
|
||||||
|
}
|
||||||
91
app/Http/Requests/Auth/LoginRequest.php
Executable file
@@ -0,0 +1,91 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Auth;
|
||||||
|
|
||||||
|
use Illuminate\Auth\Events\Lockout;
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\RateLimiter;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
|
class LoginRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*/
|
||||||
|
public function authorize(): bool
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||||
|
*/
|
||||||
|
public function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'email' => 'required|string|email',
|
||||||
|
'password' => 'required|string',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attempt to authenticate the request's credentials.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @throws \Illuminate\Validation\ValidationException
|
||||||
|
*/
|
||||||
|
public function authenticate()
|
||||||
|
{
|
||||||
|
$this->ensureIsNotRateLimited();
|
||||||
|
|
||||||
|
if (!Auth::attempt($this->only('email', 'password'), $this->filled('remember'))) {
|
||||||
|
RateLimiter::hit($this->throttleKey());
|
||||||
|
|
||||||
|
throw ValidationException::withMessages([
|
||||||
|
'email' => __('auth.failed'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
RateLimiter::clear($this->throttleKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ensure the login request is not rate limited.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @throws \Illuminate\Validation\ValidationException
|
||||||
|
*/
|
||||||
|
public function ensureIsNotRateLimited()
|
||||||
|
{
|
||||||
|
if (!RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
event(new Lockout($this));
|
||||||
|
|
||||||
|
$seconds = RateLimiter::availableIn($this->throttleKey());
|
||||||
|
|
||||||
|
throw ValidationException::withMessages([
|
||||||
|
'email' => trans('auth.throttle', [
|
||||||
|
'seconds' => $seconds,
|
||||||
|
'minutes' => ceil($seconds / 60),
|
||||||
|
]),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the rate limiting throttle key for the request.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function throttleKey()
|
||||||
|
{
|
||||||
|
return Str::lower($this->input('email')) . '|' . $this->ip();
|
||||||
|
}
|
||||||
|
}
|
||||||
48
app/Models/User.php
Executable file
@@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
|
use Illuminate\Notifications\Notifiable;
|
||||||
|
|
||||||
|
class User extends Authenticatable
|
||||||
|
{
|
||||||
|
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||||
|
use HasFactory, Notifiable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*
|
||||||
|
* @var array<int, string>
|
||||||
|
*/
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'email',
|
||||||
|
'password',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that should be hidden for serialization.
|
||||||
|
*
|
||||||
|
* @var array<int, string>
|
||||||
|
*/
|
||||||
|
protected $hidden = [
|
||||||
|
'password',
|
||||||
|
'remember_token',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the attributes that should be cast.
|
||||||
|
*
|
||||||
|
* @return array<string, string>
|
||||||
|
*/
|
||||||
|
protected function casts(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'email_verified_at' => 'datetime',
|
||||||
|
'password' => 'hashed',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
24
app/Providers/AppServiceProvider.php
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
<?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
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
26
app/Providers/AuthServiceProvider.php
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
// use Illuminate\Support\Facades\Gate;
|
||||||
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class AuthServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The model to policy mappings for the application.
|
||||||
|
*
|
||||||
|
* @var array<class-string, class-string>
|
||||||
|
*/
|
||||||
|
protected $policies = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any authentication / authorization services.
|
||||||
|
*/
|
||||||
|
public function boot(): void
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
19
app/Providers/BroadcastServiceProvider.php
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Broadcast;
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
|
class BroadcastServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Bootstrap any application services.
|
||||||
|
*/
|
||||||
|
public function boot(): void
|
||||||
|
{
|
||||||
|
Broadcast::routes();
|
||||||
|
|
||||||
|
require base_path('routes/channels.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
38
app/Providers/EventServiceProvider.php
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Auth\Events\Registered;
|
||||||
|
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||||
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
use Illuminate\Support\Facades\Event;
|
||||||
|
|
||||||
|
class EventServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The event to listener mappings for the application.
|
||||||
|
*
|
||||||
|
* @var array<class-string, array<int, class-string>>
|
||||||
|
*/
|
||||||
|
protected $listen = [
|
||||||
|
Registered::class => [
|
||||||
|
SendEmailVerificationNotification::class,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any events for your application.
|
||||||
|
*/
|
||||||
|
public function boot(): void
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine if events and listeners should be automatically discovered.
|
||||||
|
*/
|
||||||
|
public function shouldDiscoverEvents(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
40
app/Providers/RouteServiceProvider.php
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Cache\RateLimiting\Limit;
|
||||||
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\RateLimiter;
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
|
class RouteServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The path to your application's "home" route.
|
||||||
|
*
|
||||||
|
* Typically, users are redirected here after authentication.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public const HOME = '/home';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define your route model bindings, pattern filters, and other route configuration.
|
||||||
|
*/
|
||||||
|
public function boot(): void
|
||||||
|
{
|
||||||
|
RateLimiter::for('api', function (Request $request) {
|
||||||
|
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
|
||||||
|
});
|
||||||
|
|
||||||
|
$this->routes(function () {
|
||||||
|
Route::middleware('api')
|
||||||
|
->prefix('api')
|
||||||
|
->group(base_path('routes/api.php'));
|
||||||
|
|
||||||
|
Route::middleware('web')
|
||||||
|
->group(base_path('routes/web.php'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
15
artisan
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Input\ArgvInput;
|
||||||
|
|
||||||
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
|
// Register the Composer autoloader...
|
||||||
|
require __DIR__.'/vendor/autoload.php';
|
||||||
|
|
||||||
|
// Bootstrap Laravel and handle the command...
|
||||||
|
$status = (require_once __DIR__.'/bootstrap/app.php')
|
||||||
|
->handleCommand(new ArgvInput);
|
||||||
|
|
||||||
|
exit($status);
|
||||||
18
bootstrap/app.php
Executable 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) {
|
||||||
|
//
|
||||||
|
})
|
||||||
|
->withExceptions(function (Exceptions $exceptions) {
|
||||||
|
//
|
||||||
|
})->create();
|
||||||
2
bootstrap/cache/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
5
bootstrap/providers.php
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
App\Providers\AppServiceProvider::class,
|
||||||
|
];
|
||||||
71
composer.json
Executable file
@@ -0,0 +1,71 @@
|
|||||||
|
{
|
||||||
|
"$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.2",
|
||||||
|
"laravel/framework": "^11.31",
|
||||||
|
"laravel/tinker": "^2.9"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"fakerphp/faker": "^1.23",
|
||||||
|
"laravel/pail": "^1.1",
|
||||||
|
"laravel/pint": "^1.13",
|
||||||
|
"laravel/sail": "^1.26",
|
||||||
|
"mockery/mockery": "^1.6",
|
||||||
|
"nunomaduro/collision": "^8.1",
|
||||||
|
"phpunit/phpunit": "^11.0.1"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"App\\": "app/",
|
||||||
|
"Database\\Factories\\": "database/factories/",
|
||||||
|
"Database\\Seeders\\": "database/seeders/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Tests\\": "tests/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"post-autoload-dump": [
|
||||||
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||||
|
"@php artisan package:discover --ansi"
|
||||||
|
],
|
||||||
|
"post-update-cmd": [
|
||||||
|
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
|
||||||
|
],
|
||||||
|
"post-root-package-install": [
|
||||||
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||||
|
],
|
||||||
|
"post-create-project-cmd": [
|
||||||
|
"@php artisan key:generate --ansi",
|
||||||
|
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
|
||||||
|
"@php artisan migrate --graceful --ansi"
|
||||||
|
],
|
||||||
|
"dev": [
|
||||||
|
"Composer\\Config::disableProcessTimeout",
|
||||||
|
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"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
|
||||||
|
}
|
||||||
7853
composer.lock
generated
Executable file
126
config/app.php
Executable 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' => env('APP_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(',', 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'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
115
config/auth.php
Executable file
@@ -0,0 +1,115 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Defaults
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option defines the default authentication "guard" and password
|
||||||
|
| reset "broker" for your application. You may change these values
|
||||||
|
| as required, but they're a perfect start for most applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'defaults' => [
|
||||||
|
'guard' => env('AUTH_GUARD', 'web'),
|
||||||
|
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Guards
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Next, you may define every authentication guard for your application.
|
||||||
|
| Of course, a great default configuration has been defined for you
|
||||||
|
| which utilizes session storage plus the Eloquent user provider.
|
||||||
|
|
|
||||||
|
| All authentication guards have a user provider, which defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| system used by the application. Typically, Eloquent is utilized.
|
||||||
|
|
|
||||||
|
| Supported: "session"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'guards' => [
|
||||||
|
'web' => [
|
||||||
|
'driver' => 'session',
|
||||||
|
'provider' => 'users',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| User Providers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| All authentication guards have a user provider, which defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| system used by the application. Typically, Eloquent is utilized.
|
||||||
|
|
|
||||||
|
| If you have multiple user tables or models you may configure multiple
|
||||||
|
| providers to represent the model / table. These providers may then
|
||||||
|
| be assigned to any extra authentication guards you have defined.
|
||||||
|
|
|
||||||
|
| Supported: "database", "eloquent"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'providers' => [
|
||||||
|
'users' => [
|
||||||
|
'driver' => 'eloquent',
|
||||||
|
'model' => env('AUTH_MODEL', App\Models\User::class),
|
||||||
|
],
|
||||||
|
|
||||||
|
// 'users' => [
|
||||||
|
// 'driver' => 'database',
|
||||||
|
// 'table' => 'users',
|
||||||
|
// ],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Resetting Passwords
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These configuration options specify the behavior of Laravel's password
|
||||||
|
| reset functionality, including the table utilized for token storage
|
||||||
|
| and the user provider that is invoked to actually retrieve users.
|
||||||
|
|
|
||||||
|
| The expiry time is the number of minutes that each reset token will be
|
||||||
|
| considered valid. This security feature keeps tokens short-lived so
|
||||||
|
| they have less time to be guessed. You may change this as needed.
|
||||||
|
|
|
||||||
|
| The throttle setting is the number of seconds a user must wait before
|
||||||
|
| generating more password reset tokens. This prevents the user from
|
||||||
|
| quickly generating a very large amount of password reset tokens.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'passwords' => [
|
||||||
|
'users' => [
|
||||||
|
'provider' => 'users',
|
||||||
|
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
|
||||||
|
'expire' => 60,
|
||||||
|
'throttle' => 60,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Confirmation Timeout
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define the amount 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),
|
||||||
|
|
||||||
|
];
|
||||||
108
config/cache.php
Executable file
@@ -0,0 +1,108 @@
|
|||||||
|
<?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", "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',
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| 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(env('APP_NAME', 'laravel'), '_').'_cache_'),
|
||||||
|
|
||||||
|
];
|
||||||
173
config/database.php
Executable file
@@ -0,0 +1,173 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Database Connection Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify which of the database connections below you wish
|
||||||
|
| to use as your default connection for database operations. This is
|
||||||
|
| the connection which will be utilized unless another connection
|
||||||
|
| is explicitly specified when you execute a query / statement.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('DB_CONNECTION', 'sqlite'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Database Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Below are all of the database connections defined for your application.
|
||||||
|
| An example configuration is provided for each database system which
|
||||||
|
| is supported by Laravel. You're free to add / remove connections.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'sqlite' => [
|
||||||
|
'driver' => 'sqlite',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||||
|
'prefix' => '',
|
||||||
|
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||||
|
'busy_timeout' => null,
|
||||||
|
'journal_mode' => null,
|
||||||
|
'synchronous' => null,
|
||||||
|
],
|
||||||
|
|
||||||
|
'mysql' => [
|
||||||
|
'driver' => 'mysql',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '3306'),
|
||||||
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'unix_socket' => env('DB_SOCKET', ''),
|
||||||
|
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
||||||
|
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
'strict' => true,
|
||||||
|
'engine' => null,
|
||||||
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||||
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||||
|
]) : [],
|
||||||
|
],
|
||||||
|
|
||||||
|
'mariadb' => [
|
||||||
|
'driver' => 'mariadb',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '3306'),
|
||||||
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'unix_socket' => env('DB_SOCKET', ''),
|
||||||
|
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
||||||
|
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
'strict' => true,
|
||||||
|
'engine' => null,
|
||||||
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||||
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||||
|
]) : [],
|
||||||
|
],
|
||||||
|
|
||||||
|
'pgsql' => [
|
||||||
|
'driver' => 'pgsql',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '5432'),
|
||||||
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => env('DB_CHARSET', 'utf8'),
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
'search_path' => 'public',
|
||||||
|
'sslmode' => 'prefer',
|
||||||
|
],
|
||||||
|
|
||||||
|
'sqlsrv' => [
|
||||||
|
'driver' => 'sqlsrv',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'host' => env('DB_HOST', 'localhost'),
|
||||||
|
'port' => env('DB_PORT', '1433'),
|
||||||
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => env('DB_CHARSET', 'utf8'),
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
|
||||||
|
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migration Repository Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This table keeps track of all the migrations that have already run for
|
||||||
|
| your application. Using this information, we can determine which of
|
||||||
|
| the migrations on disk haven't actually been run on the database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'migrations' => [
|
||||||
|
'table' => 'migrations',
|
||||||
|
'update_date_on_publish' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Redis Databases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Redis is an open source, fast, and advanced key-value store that also
|
||||||
|
| provides a richer body of commands than a typical key-value system
|
||||||
|
| such as Memcached. You may define your connection settings here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
|
||||||
|
'client' => env('REDIS_CLIENT', 'phpredis'),
|
||||||
|
|
||||||
|
'options' => [
|
||||||
|
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||||
|
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'default' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
|
'username' => env('REDIS_USERNAME'),
|
||||||
|
'password' => env('REDIS_PASSWORD'),
|
||||||
|
'port' => env('REDIS_PORT', '6379'),
|
||||||
|
'database' => env('REDIS_DB', '0'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'cache' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
|
'username' => env('REDIS_USERNAME'),
|
||||||
|
'password' => env('REDIS_PASSWORD'),
|
||||||
|
'port' => env('REDIS_PORT', '6379'),
|
||||||
|
'database' => env('REDIS_CACHE_DB', '1'),
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
77
config/filesystems.php
Executable file
@@ -0,0 +1,77 @@
|
|||||||
|
<?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,
|
||||||
|
],
|
||||||
|
|
||||||
|
'public' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app/public'),
|
||||||
|
'url' => env('APP_URL').'/storage',
|
||||||
|
'visibility' => 'public',
|
||||||
|
'throw' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
's3' => [
|
||||||
|
'driver' => 's3',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION'),
|
||||||
|
'bucket' => env('AWS_BUCKET'),
|
||||||
|
'url' => env('AWS_URL'),
|
||||||
|
'endpoint' => env('AWS_ENDPOINT'),
|
||||||
|
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
||||||
|
'throw' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Symbolic Links
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the symbolic links that will be created when the
|
||||||
|
| `storage:link` Artisan command is executed. The array keys should be
|
||||||
|
| the locations of the links and the values should be their targets.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'links' => [
|
||||||
|
public_path('storage') => storage_path('app/public'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
132
config/logging.php
Executable 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(',', env('LOG_STACK', 'single')),
|
||||||
|
'ignore_exceptions' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'single' => [
|
||||||
|
'driver' => 'single',
|
||||||
|
'path' => storage_path('logs/laravel.log'),
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
'daily' => [
|
||||||
|
'driver' => 'daily',
|
||||||
|
'path' => storage_path('logs/laravel.log'),
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'days' => env('LOG_DAILY_DAYS', 14),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
'slack' => [
|
||||||
|
'driver' => 'slack',
|
||||||
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||||
|
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
|
||||||
|
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
|
||||||
|
'level' => env('LOG_LEVEL', 'critical'),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
'papertrail' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
||||||
|
'handler_with' => [
|
||||||
|
'host' => env('PAPERTRAIL_URL'),
|
||||||
|
'port' => env('PAPERTRAIL_PORT'),
|
||||||
|
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
|
||||||
|
],
|
||||||
|
'processors' => [PsrLogMessageProcessor::class],
|
||||||
|
],
|
||||||
|
|
||||||
|
'stderr' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'handler' => StreamHandler::class,
|
||||||
|
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||||
|
'with' => [
|
||||||
|
'stream' => 'php://stderr',
|
||||||
|
],
|
||||||
|
'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'),
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
116
config/mail.php
Executable file
@@ -0,0 +1,116 @@
|
|||||||
|
<?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',
|
||||||
|
'url' => env('MAIL_URL'),
|
||||||
|
'host' => env('MAIL_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('MAIL_PORT', 2525),
|
||||||
|
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||||
|
'username' => env('MAIL_USERNAME'),
|
||||||
|
'password' => env('MAIL_PASSWORD'),
|
||||||
|
'timeout' => null,
|
||||||
|
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(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',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'roundrobin' => [
|
||||||
|
'transport' => 'roundrobin',
|
||||||
|
'mailers' => [
|
||||||
|
'ses',
|
||||||
|
'postmark',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Global "From" Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may wish for all emails sent by your application to be sent from
|
||||||
|
| the same address. Here you may specify a name and address that is
|
||||||
|
| used globally for all emails that are sent by your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'from' => [
|
||||||
|
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||||
|
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
112
config/queue.php
Executable file
@@ -0,0 +1,112 @@
|
|||||||
|
<?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", "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,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| 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
Executable 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' => [
|
||||||
|
'token' => env('POSTMARK_TOKEN'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'ses' => [
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'resend' => [
|
||||||
|
'key' => env('RESEND_KEY'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'slack' => [
|
||||||
|
'notifications' => [
|
||||||
|
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
|
||||||
|
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
217
config/session.php
Executable file
@@ -0,0 +1,217 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Session Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option determines the default session driver that is utilized for
|
||||||
|
| incoming requests. Laravel supports a variety of storage options to
|
||||||
|
| persist session data. Database storage is a great default choice.
|
||||||
|
|
|
||||||
|
| Supported: "file", "cookie", "database", "apc",
|
||||||
|
| "memcached", "redis", "dynamodb", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => env('SESSION_DRIVER', 'database'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| 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' => 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: "apc", "dynamodb", "memcached", "redis"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'store' => env('SESSION_STORE'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Sweeping Lottery
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Some session drivers must manually sweep their storage location to get
|
||||||
|
| rid of old sessions from storage. Here are the chances that it will
|
||||||
|
| happen on a given request. By default, the odds are 2 out of 100.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lottery' => [2, 100],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may change the name of the 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(env('APP_NAME', 'laravel'), '_').'_session'
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The session cookie path determines the path for which the cookie will
|
||||||
|
| be regarded as available. Typically, this will be the root path of
|
||||||
|
| your application, but you're free to change this when necessary.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'path' => env('SESSION_PATH', '/'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Domain
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value determines the domain and subdomains the session cookie is
|
||||||
|
| available to. By default, the cookie will be available to the root
|
||||||
|
| domain and all subdomains. Typically, this shouldn't be changed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'domain' => env('SESSION_DOMAIN'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTPS Only Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By setting this option to true, session cookies will only be sent back
|
||||||
|
| to the server if the browser has a HTTPS connection. This will keep
|
||||||
|
| the cookie from being sent to you when it can't be done securely.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'secure' => env('SESSION_SECURE_COOKIE'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTP Access Only
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Setting this value to true will prevent JavaScript from accessing the
|
||||||
|
| value of the cookie and the cookie will only be accessible through
|
||||||
|
| the HTTP protocol. It's unlikely you should disable this option.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'http_only' => env('SESSION_HTTP_ONLY', true),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Same-Site Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option determines how your cookies behave when cross-site requests
|
||||||
|
| take place, and can be used to mitigate CSRF attacks. By default, we
|
||||||
|
| will set this value to "lax" to permit secure cross-site requests.
|
||||||
|
|
|
||||||
|
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
|
||||||
|
|
|
||||||
|
| Supported: "lax", "strict", "none", null
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'same_site' => env('SESSION_SAME_SITE', 'lax'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Partitioned Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Setting this value to true will tie the cookie to the top-level site for
|
||||||
|
| a cross-site context. Partitioned cookies are accepted by the browser
|
||||||
|
| when flagged "secure" and the Same-Site attribute is set to "none".
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
|
||||||
|
|
||||||
|
];
|
||||||
1
database/.gitignore
vendored
Executable file
@@ -0,0 +1 @@
|
|||||||
|
*.sqlite*
|
||||||
44
database/factories/UserFactory.php
Executable file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Factories;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||||
|
*/
|
||||||
|
class UserFactory extends Factory
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The current password being used by the factory.
|
||||||
|
*/
|
||||||
|
protected static ?string $password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the model's default state.
|
||||||
|
*
|
||||||
|
* @return array<string, mixed>
|
||||||
|
*/
|
||||||
|
public function definition(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name' => fake()->name(),
|
||||||
|
'email' => fake()->unique()->safeEmail(),
|
||||||
|
'email_verified_at' => now(),
|
||||||
|
'password' => static::$password ??= Hash::make('password'),
|
||||||
|
'remember_token' => Str::random(10),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicate that the model's email address should be unverified.
|
||||||
|
*/
|
||||||
|
public function unverified(): static
|
||||||
|
{
|
||||||
|
return $this->state(fn (array $attributes) => [
|
||||||
|
'email_verified_at' => null,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
49
database/migrations/0001_01_01_000000_create_users_table.php
Executable 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');
|
||||||
|
}
|
||||||
|
};
|
||||||
35
database/migrations/0001_01_01_000001_create_cache_table.php
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('cache', function (Blueprint $table) {
|
||||||
|
$table->string('key')->primary();
|
||||||
|
$table->mediumText('value');
|
||||||
|
$table->integer('expiration');
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create('cache_locks', function (Blueprint $table) {
|
||||||
|
$table->string('key')->primary();
|
||||||
|
$table->string('owner');
|
||||||
|
$table->integer('expiration');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('cache');
|
||||||
|
Schema::dropIfExists('cache_locks');
|
||||||
|
}
|
||||||
|
};
|
||||||
57
database/migrations/0001_01_01_000002_create_jobs_table.php
Executable 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');
|
||||||
|
}
|
||||||
|
};
|
||||||
28
database/seeders/DatabaseSeeder.php
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
class DatabaseSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Seed the application's database.
|
||||||
|
*/
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
// User::factory(10)->create();
|
||||||
|
|
||||||
|
User::factory()->create([
|
||||||
|
'name' => 'Darkone',
|
||||||
|
'email' => 'user@demo.com',
|
||||||
|
'email_verified_at' => now(),
|
||||||
|
'password' => Hash::make('password'),
|
||||||
|
'remember_token' => Str::random(10),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
2952
package-lock.json
generated
Normal file
34
package.json
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"build": "vite build",
|
||||||
|
"dev": "vite"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"autoprefixer": "^10.4.20",
|
||||||
|
"axios": "^1.7.4",
|
||||||
|
"concurrently": "^9.0.1",
|
||||||
|
"laravel-vite-plugin": "^1.0",
|
||||||
|
"postcss": "^8.4.47",
|
||||||
|
"sass": "^1.81.1",
|
||||||
|
"tailwindcss": "^3.4.13",
|
||||||
|
"vite": "^5.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"apexcharts": "^3.44.2",
|
||||||
|
"bootstrap": "^5.3.3",
|
||||||
|
"countup.js": "^2.3.2",
|
||||||
|
"dropzone": "^5.9.0",
|
||||||
|
"flatpickr": "^4.6.13",
|
||||||
|
"gmaps": "^0.4.25",
|
||||||
|
"gridjs": "^5.1.0",
|
||||||
|
"iconify-icon": "^2.1.0",
|
||||||
|
"jsvectormap": "^1.5.1",
|
||||||
|
"moment": "^2.29.4",
|
||||||
|
"node-waves": "^0.7.6",
|
||||||
|
"quill": "^1.3.7",
|
||||||
|
"simplebar": "^5.3.9",
|
||||||
|
"wnumb": "^1.2.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
33
phpunit.xml
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
<?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="CACHE_STORE" value="array"/>
|
||||||
|
<!-- <env name="DB_CONNECTION" value="sqlite"/> -->
|
||||||
|
<!-- <env name="DB_DATABASE" value=":memory:"/> -->
|
||||||
|
<env name="MAIL_MAILER" value="array"/>
|
||||||
|
<env name="PULSE_ENABLED" value="false"/>
|
||||||
|
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||||
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
|
<env name="TELESCOPE_ENABLED" value="false"/>
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
||||||
21
public/.htaccess
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
<IfModule mod_negotiation.c>
|
||||||
|
Options -MultiViews -Indexes
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# Handle Authorization Header
|
||||||
|
RewriteCond %{HTTP:Authorization} .
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
|
||||||
|
# Redirect Trailing Slashes If Not A Folder...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_URI} (.+)/$
|
||||||
|
RewriteRule ^ %1 [L,R=301]
|
||||||
|
|
||||||
|
# Send Requests To Front Controller...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^ index.php [L]
|
||||||
|
</IfModule>
|
||||||
0
public/favicon.ico
Executable file
1
public/images/404.svg
Executable file
|
After Width: | Height: | Size: 44 KiB |
BIN
public/images/bg-pattern-1.png
Executable file
|
After Width: | Height: | Size: 57 KiB |
1
public/images/bg-pattern.svg
Executable file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev/svgjs" width="300" height="300" preserveAspectRatio="none" viewBox="0 0 300 300"><g mask="url("#SvgjsMask1051")" fill="none"><path d="M19 300L319 0L421 0L121 300z" fill="url("#SvgjsLinearGradient1052")"></path><path d="M291 300L-9 0L-241.5 0L58.5 300z" fill="url("#SvgjsLinearGradient1053")"></path><path d="M81.58430290451523 300L300 81.58430290451523L300 300z" fill="url("#SvgjsLinearGradient1052")"></path><path d="M0 300L218.41569709548477 300L 0 81.58430290451523z" fill="url("#SvgjsLinearGradient1053")"></path></g><defs><mask id="SvgjsMask1051"><rect width="300" height="300" fill="#ffffff"></rect></mask><linearGradient x1="0%" y1="100%" x2="100%" y2="0%" id="SvgjsLinearGradient1052"><stop stop-color="rgba(15, 70, 185, 0.2)" offset="0"></stop><stop stop-opacity="0" stop-color="rgba(15, 70, 185, 0.2)" offset="0.66"></stop></linearGradient><linearGradient x1="100%" y1="100%" x2="0%" y2="0%" id="SvgjsLinearGradient1053"><stop stop-color="rgba(15, 70, 185, 0.2)" offset="0"></stop><stop stop-opacity="0" stop-color="rgba(15, 70, 185, 0.2)" offset="0.66"></stop></linearGradient></defs></svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
1
public/images/brands/bitbucket.svg
Executable file
@@ -0,0 +1 @@
|
|||||||
|
<svg height="231" preserveAspectRatio="xMidYMid" viewBox="0 0 256 231" width="256" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" x1="108.63338%" x2="46.926596%" y1="13.818022%" y2="78.776141%"><stop offset=".18" stop-color="#0052cc"/><stop offset="1" stop-color="#2684ff"/></linearGradient><g fill="none"><path d="m101.272088 152.561281h53.448624l12.901393-75.3195555h-80.5620266z"/><path d="m8.30813067.0006835c-2.42310093-.03125205-4.73600404 1.01057319-6.31827423 2.84600661s-2.27194244 4.2765956-1.88401252 6.66864601l34.81870728 211.37292988c.895485 5.339259 5.4953944 9.264746 10.9090413 9.309595h167.0395695c4.063354.052298 7.552433-2.878529 8.202287-6.889921l34.818707-213.75159244c.38793-2.39205042-.301742-4.83321259-1.884012-6.66864602-1.582271-1.83543342-3.895174-2.87725865-6.318275-2.84600661zm146.61587533 152.7675905h-53.314864l-14.4360243-75.4200265h80.6694903z" fill="#2684ff"/><path d="m244.610824 77.2417255h-76.917048l-12.908296 75.3598565h-53.272329l-62.9023275 74.663219c1.9937259 1.723985 4.5356374 2.682649 7.1712751 2.704595h166.9472844c4.060112.052256 7.546408-2.876232 8.195743-6.884424z" fill="url(#a)"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
1
public/images/brands/dribbble.svg
Executable file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="240px" height="240px" clip-rule="evenodd"><circle cx="24" cy="24" r="19.375" fill="#ed3675"/><path fill="#bd1949" fill-rule="evenodd" d="M24,4C12.959,4,4,12.959,4,24c0,11.041,8.959,20,20,20 c11.02,0,20-8.959,20-20C44,12.959,35.02,4,24,4z M37.21,13.219c2.386,2.907,3.818,6.616,3.861,10.629 c-0.564-0.108-6.204-1.258-11.887-0.542c-0.13-0.282-0.239-0.586-0.369-0.889c-0.347-0.824-0.738-1.67-1.128-2.473 C33.978,17.384,36.842,13.696,37.21,13.219z M24,6.95c4.338,0,8.308,1.627,11.323,4.295c-0.304,0.434-2.885,3.883-8.959,6.16 c-2.798-5.141-5.9-9.349-6.377-10C21.267,7.102,22.612,6.95,24,6.95z M16.733,8.555c0.455,0.607,3.492,4.837,6.334,9.87 c-7.983,2.126-15.033,2.083-15.792,2.083C8.382,15.215,11.961,10.811,16.733,8.555z M6.907,24.022c0-0.174,0-0.347,0-0.521 c0.738,0.022,9.024,0.13,17.549-2.43c0.499,0.954,0.954,1.931,1.388,2.907c-0.217,0.065-0.456,0.13-0.672,0.195 c-8.807,2.842-13.492,10.607-13.883,11.258C8.577,32.417,6.907,28.403,6.907,24.022z M24,41.093c-3.948,0-7.592-1.345-10.477-3.601 c0.304-0.629,3.774-7.31,13.406-10.672c0.043-0.022,0.065-0.022,0.109-0.043c2.408,6.226,3.384,11.453,3.644,12.95 C28.62,40.616,26.364,41.093,24,41.093z M33.523,38.165c-0.174-1.041-1.085-6.03-3.319-12.169 c5.358-0.846,10.043,0.542,10.629,0.738C40.096,31.484,37.362,35.583,33.523,38.165z" clip-rule="evenodd"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
1
public/images/brands/dropbox.svg
Executable file
@@ -0,0 +1 @@
|
|||||||
|
<svg height="218" preserveAspectRatio="xMidYMid" viewBox="0 0 256 218" width="256" xmlns="http://www.w3.org/2000/svg"><g fill="#0061ff"><path d="m63.9945638 0-63.9945638 40.7712563 63.9945638 40.7712562 64.0054362-40.7712562z"/><path d="m192.000442 0-64.000442 40.7750015 64.000442 40.7750016 64.000443-40.7750016z"/><path d="m0 122.321259 63.9945638 40.771257 64.0054362-40.771257-64.0054362-40.7712559z"/><path d="m192 81.5500031-64 40.7747199 64 40.774719 64-40.774719z"/><path d="m64 176.771256 64.005436 40.771257 63.994564-40.771257-63.994564-40.771256z"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 572 B |
1
public/images/brands/github.svg
Executable file
@@ -0,0 +1 @@
|
|||||||
|
<svg height="48pt" viewBox="0 0 48 48" width="48pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(47 0 0 47.058 .5 .471)" gradientUnits="userSpaceOnUse" x1=".67181" x2=".422149" y1=".02057" y2=".960165"><stop offset="0" stop-color="#1a6cff"/><stop offset="1" stop-color="#c522ff"/></linearGradient><path d="m30.003 42.269c2.832-.925 5.434-2.512 7.583-4.654 3.604-3.615 5.636-8.513 5.636-13.615s-2.032-10-5.636-13.615c-3.615-3.604-8.514-5.636-13.615-5.636-1.181 0-2.139-.958-2.139-2.139 0-1.181.958-2.139 2.139-2.139 6.235 0 12.224 2.481 16.641 6.888 4.407 4.417 6.888 10.406 6.888 16.641s-2.481 12.224-6.888 16.641c-4.417 4.407-10.406 6.888-16.641 6.888-5.936 0-11.658-2.246-16.01-6.278-4.353-4.043-7.016-9.583-7.455-15.497-.088-1.181.796-2.209 1.973-2.294 1.178-.086 2.206.798 2.294 1.973.364 4.845 2.535 9.38 6.097 12.684 2.574 2.39 5.736 4.007 9.127 4.711-.001-1.471-.003-2.749-.005-3.119-5.265 1.178-6.16-2.615-6.16-2.615-.861-2.253-2.102-2.854-2.102-2.854-1.718-1.209.129-1.185.129-1.185 1.9.137 2.901 2.011 2.901 2.011 1.688 2.98 4.191 2.121 5.269 1.622.172-1.26.501-2.123 1.041-2.61-4.203-.492-8.07-2.166-8.07-9.639 0-2.128.186-3.87 1.396-5.232-.195-.493-.847-2.476.184-5.16 1.81-.085 3.409 1.896 5.02 2.654 1.731-.504 3.772-.715 5.341-.701 1.587.014 3.699.259 5.159.701 1.218-.855 3.081-2.766 5.06-2.697l.305.043c1.033 2.684.381 4.667.187 5.16 1.213 1.362 1.348 3.104 1.348 5.232 0 7.493-4.126 9.143-8.342 9.625.679.603 1.352 1.793 1.352 3.612 0 .802-.004 2.605-.007 4.593zm-14.984-35.317c1.045-.549 1.448-1.843.899-2.888-.549-1.044-1.843-1.447-2.888-.898-4.449 2.342-8.043 6.053-10.235 10.577-.52 1.063-.079 2.345.984 2.861 1.062.517 2.347.074 2.866-.989 1.797-3.711 4.727-6.738 8.374-8.663z" fill="url(#a)" fill-rule="evenodd"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
6
public/images/brands/slack.svg
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 122.88 122.78" style="enable-background:new 0 0 122.88 122.78" xml:space="preserve"><style type="text/css"><![CDATA[
|
||||||
|
.st0{fill:#E01E5A;}
|
||||||
|
.st1{fill:#ECB22E;}
|
||||||
|
.st2{fill:#2EB67D;}
|
||||||
|
.st3{fill:#36C5F0;}
|
||||||
|
]]></style><g><path class="st0" d="M25.91,77.62c0,7.14-5.77,12.9-12.9,12.9S0.1,84.75,0.1,77.62c0-7.14,5.77-12.9,12.9-12.9h12.9V77.62 L25.91,77.62z M32.36,77.62c0-7.14,5.77-12.9,12.9-12.9s12.9,5.77,12.9,12.9v32.26c0,7.14-5.77,12.9-12.9,12.9 s-12.9-5.77-12.9-12.9V77.62L32.36,77.62z"/><path class="st3" d="M45.26,25.81c-7.14,0-12.9-5.77-12.9-12.9c0-7.14,5.77-12.9,12.9-12.9s12.9,5.77,12.9,12.9v12.9H45.26 L45.26,25.81z M45.26,32.36c7.14,0,12.9,5.77,12.9,12.9c0,7.14-5.77,12.9-12.9,12.9H12.9C5.77,58.17,0,52.4,0,45.26 c0-7.14,5.77-12.9,12.9-12.9H45.26L45.26,32.36z"/><path class="st2" d="M96.97,45.26c0-7.14,5.77-12.9,12.9-12.9c7.14,0,12.9,5.77,12.9,12.9c0,7.14-5.77,12.9-12.9,12.9h-12.9V45.26 L96.97,45.26z M90.52,45.26c0,7.14-5.77,12.9-12.9,12.9c-7.14,0-12.9-5.77-12.9-12.9V12.9c0-7.14,5.77-12.9,12.9-12.9 c7.14,0,12.9,5.77,12.9,12.9V45.26L90.52,45.26z"/><path class="st1" d="M77.62,96.97c7.14,0,12.9,5.77,12.9,12.9c0,7.14-5.77,12.9-12.9,12.9c-7.14,0-12.9-5.77-12.9-12.9v-12.9H77.62 L77.62,96.97z M77.62,90.52c-7.14,0-12.9-5.77-12.9-12.9c0-7.14,5.77-12.9,12.9-12.9h32.36c7.14,0,12.9,5.77,12.9,12.9 c0,7.14-5.77,12.9-12.9,12.9H77.62L77.62,90.52z"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/images/favicon.ico
Executable file
|
After Width: | Height: | Size: 106 KiB |
BIN
public/images/logo-dark.png
Executable file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
public/images/logo-light.png
Executable file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
public/images/logo-sm.png
Executable file
|
After Width: | Height: | Size: 3.8 KiB |
1
public/images/maintenance.svg
Executable file
|
After Width: | Height: | Size: 96 KiB |
BIN
public/images/small/img-1.jpg
Executable file
|
After Width: | Height: | Size: 573 KiB |
BIN
public/images/small/img-10.jpg
Executable file
|
After Width: | Height: | Size: 172 KiB |
BIN
public/images/small/img-2.jpg
Executable file
|
After Width: | Height: | Size: 413 KiB |
BIN
public/images/small/img-3.jpg
Executable file
|
After Width: | Height: | Size: 390 KiB |
BIN
public/images/small/img-4.jpg
Executable file
|
After Width: | Height: | Size: 556 KiB |
BIN
public/images/small/img-5.jpg
Executable file
|
After Width: | Height: | Size: 292 KiB |
BIN
public/images/small/img-6.jpg
Executable file
|
After Width: | Height: | Size: 538 KiB |
BIN
public/images/small/img-7.jpg
Executable file
|
After Width: | Height: | Size: 327 KiB |
BIN
public/images/small/img-8.jpg
Executable file
|
After Width: | Height: | Size: 230 KiB |
BIN
public/images/small/img-9.jpg
Executable file
|
After Width: | Height: | Size: 77 KiB |
BIN
public/images/users/avatar-1.jpg
Executable file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
public/images/users/avatar-10.jpg
Executable file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
public/images/users/avatar-2.jpg
Executable file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
public/images/users/avatar-3.jpg
Executable file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
public/images/users/avatar-4.jpg
Executable file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
public/images/users/avatar-5.jpg
Executable file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
public/images/users/avatar-6.jpg
Executable file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
public/images/users/avatar-7.jpg
Executable file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
public/images/users/avatar-8.jpg
Executable file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
public/images/users/avatar-9.jpg
Executable file
|
After Width: | Height: | Size: 8.1 KiB |
17
public/index.php
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
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...
|
||||||
|
(require_once __DIR__.'/../bootstrap/app.php')
|
||||||
|
->handleRequest(Request::capture());
|
||||||
2
public/robots.txt
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
User-agent: *
|
||||||
|
Disallow:
|
||||||
BIN
resources/fonts/boxicons.eot
Executable file
1653
resources/fonts/boxicons.svg
Executable file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
resources/fonts/boxicons.ttf
Executable file
BIN
resources/fonts/boxicons.woff
Executable file
BIN
resources/fonts/boxicons.woff2
Executable file
351
resources/js/app.js
Executable file
@@ -0,0 +1,351 @@
|
|||||||
|
|
||||||
|
import bootstrap from 'bootstrap/dist/js/bootstrap'
|
||||||
|
window.bootstrap = bootstrap;
|
||||||
|
import 'iconify-icon';
|
||||||
|
import 'simplebar/dist/simplebar'
|
||||||
|
|
||||||
|
class Components {
|
||||||
|
initBootstrapComponents() {
|
||||||
|
[...document.querySelectorAll('[data-bs-toggle="popover"]')].map(
|
||||||
|
(e) => new bootstrap.Popover(e)
|
||||||
|
),
|
||||||
|
[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map(
|
||||||
|
(e) => new bootstrap.Tooltip(e)
|
||||||
|
),
|
||||||
|
[...document.querySelectorAll(".offcanvas")].map(
|
||||||
|
(e) => new bootstrap.Offcanvas(e)
|
||||||
|
);
|
||||||
|
var e = document.getElementById("toastPlacement"),
|
||||||
|
t =
|
||||||
|
(e &&
|
||||||
|
document
|
||||||
|
.getElementById("selectToastPlacement")
|
||||||
|
.addEventListener("change", function () {
|
||||||
|
e.dataset.originalClass ||
|
||||||
|
(e.dataset.originalClass = e.className),
|
||||||
|
(e.className =
|
||||||
|
e.dataset.originalClass + " " + this.value);
|
||||||
|
}),
|
||||||
|
[].slice
|
||||||
|
.call(document.querySelectorAll(".toast"))
|
||||||
|
.map(function (e) {
|
||||||
|
return new bootstrap.Toast(e);
|
||||||
|
}),
|
||||||
|
document.getElementById("liveAlertBtn"));
|
||||||
|
t &&
|
||||||
|
t.addEventListener("click", () => {
|
||||||
|
alert("Nice, you triggered this alert message!", "success");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initfullScreenListener() {
|
||||||
|
var e = document.querySelector('[data-toggle="fullscreen"]');
|
||||||
|
e &&
|
||||||
|
e.addEventListener("click", function (e) {
|
||||||
|
e.preventDefault(),
|
||||||
|
document.body.classList.toggle("fullscreen-enable"),
|
||||||
|
document.fullscreenElement ||
|
||||||
|
document.mozFullScreenElement ||
|
||||||
|
document.webkitFullscreenElement
|
||||||
|
? document.cancelFullScreen
|
||||||
|
? document.cancelFullScreen()
|
||||||
|
: document.mozCancelFullScreen
|
||||||
|
? document.mozCancelFullScreen()
|
||||||
|
: document.webkitCancelFullScreen &&
|
||||||
|
document.webkitCancelFullScreen()
|
||||||
|
: document.documentElement.requestFullscreen
|
||||||
|
? document.documentElement.requestFullscreen()
|
||||||
|
: document.documentElement.mozRequestFullScreen
|
||||||
|
? document.documentElement.mozRequestFullScreen()
|
||||||
|
: document.documentElement.webkitRequestFullscreen &&
|
||||||
|
document.documentElement.webkitRequestFullscreen(
|
||||||
|
Element.ALLOW_KEYBOARD_INPUT
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initCounter() {
|
||||||
|
var e = document.querySelectorAll(".counter-value");
|
||||||
|
function a(e) {
|
||||||
|
return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
|
}
|
||||||
|
e &&
|
||||||
|
e.forEach(function (i) {
|
||||||
|
!(function e() {
|
||||||
|
var t = +i.getAttribute("data-target"),
|
||||||
|
n = +i.innerText,
|
||||||
|
o = t / 250;
|
||||||
|
o < 1 && (o = 1),
|
||||||
|
n < t
|
||||||
|
? ((i.innerText = (n + o).toFixed(0)),
|
||||||
|
setTimeout(e, 1))
|
||||||
|
: (i.innerText = a(t)),
|
||||||
|
a(i.innerText);
|
||||||
|
})();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
init() {
|
||||||
|
this.initBootstrapComponents(),
|
||||||
|
this.initfullScreenListener(),
|
||||||
|
this.initCounter();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class FormValidation {
|
||||||
|
initFormValidation() {
|
||||||
|
document.querySelectorAll(".needs-validation").forEach((t) => {
|
||||||
|
t.addEventListener(
|
||||||
|
"submit",
|
||||||
|
(e) => {
|
||||||
|
t.checkValidity() ||
|
||||||
|
(e.preventDefault(), e.stopPropagation()),
|
||||||
|
t.classList.add("was-validated");
|
||||||
|
},
|
||||||
|
!1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
init() {
|
||||||
|
this.initFormValidation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.addEventListener("DOMContentLoaded", function (e) {
|
||||||
|
new Components().init(), new FormValidation().init();
|
||||||
|
});
|
||||||
|
class ThemeLayout {
|
||||||
|
constructor() {
|
||||||
|
(this.html = document.getElementsByTagName("html")[0]),
|
||||||
|
(this.config = {}),
|
||||||
|
(this.defaultConfig = window.config);
|
||||||
|
}
|
||||||
|
initVerticalMenu() {
|
||||||
|
var e = document.querySelectorAll(".navbar-nav li .collapse");
|
||||||
|
document
|
||||||
|
.querySelectorAll(".navbar-nav li [data-bs-toggle='collapse']")
|
||||||
|
.forEach((e) => {
|
||||||
|
e.addEventListener("click", function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
e.forEach((e) => {
|
||||||
|
e.addEventListener("show.bs.collapse", function (t) {
|
||||||
|
let n = t.target.closest(".collapse.show");
|
||||||
|
document
|
||||||
|
.querySelectorAll(".navbar-nav .collapse.show")
|
||||||
|
.forEach((e) => {
|
||||||
|
e !== t.target &&
|
||||||
|
e !== n &&
|
||||||
|
new bootstrap.Collapse(e).hide();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
document.querySelector(".navbar-nav") &&
|
||||||
|
(document
|
||||||
|
.querySelectorAll(".navbar-nav a")
|
||||||
|
.forEach(function (t) {
|
||||||
|
var e = window.location.href.split(/[?#]/)[0];
|
||||||
|
if (t.href === e) {
|
||||||
|
t.classList.add("active"),
|
||||||
|
t.parentNode.classList.add("active");
|
||||||
|
let e = t.closest(".collapse");
|
||||||
|
for (; e; )
|
||||||
|
e.classList.add("show"),
|
||||||
|
e.parentElement.children[0].classList.add(
|
||||||
|
"active"
|
||||||
|
),
|
||||||
|
e.parentElement.children[0].setAttribute(
|
||||||
|
"aria-expanded",
|
||||||
|
"true"
|
||||||
|
),
|
||||||
|
(e = e.parentElement.closest(".collapse"));
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
setTimeout(function () {
|
||||||
|
var e,
|
||||||
|
n,
|
||||||
|
o,
|
||||||
|
i,
|
||||||
|
a,
|
||||||
|
t = document.querySelector(".nav-item li a.active");
|
||||||
|
null != t &&
|
||||||
|
((e = document.querySelector(
|
||||||
|
".app-sidebar .simplebar-content-wrapper"
|
||||||
|
)),
|
||||||
|
(t = t.offsetTop - 300),
|
||||||
|
e) &&
|
||||||
|
100 < t &&
|
||||||
|
((o = (n = e).scrollTop),
|
||||||
|
(i = t - o),
|
||||||
|
(a = 0),
|
||||||
|
(function e() {
|
||||||
|
var t = (a += 20),
|
||||||
|
t =
|
||||||
|
(t /= 300) < 1
|
||||||
|
? (i / 2) * t * t + o
|
||||||
|
: (-i / 2) * (--t * (t - 2) - 1) + o;
|
||||||
|
(n.scrollTop = t), a < 600 && setTimeout(e, 20);
|
||||||
|
})());
|
||||||
|
}, 200));
|
||||||
|
}
|
||||||
|
initConfig() {
|
||||||
|
(this.defaultConfig = JSON.parse(JSON.stringify(window.defaultConfig))),
|
||||||
|
(this.config = JSON.parse(JSON.stringify(window.config))),
|
||||||
|
this.setSwitchFromConfig();
|
||||||
|
}
|
||||||
|
changeMenuColor(e) {
|
||||||
|
(this.config.menu.color = e),
|
||||||
|
this.html.setAttribute("data-sidebar-color", e),
|
||||||
|
this.setSwitchFromConfig();
|
||||||
|
}
|
||||||
|
changeMenuSize(e, t = !0) {
|
||||||
|
this.html.setAttribute("data-sidebar-size", e),
|
||||||
|
t && ((this.config.menu.size = e), this.setSwitchFromConfig());
|
||||||
|
}
|
||||||
|
changeThemeMode(e) {
|
||||||
|
(this.config.theme = e),
|
||||||
|
this.html.setAttribute("data-bs-theme", e),
|
||||||
|
this.setSwitchFromConfig();
|
||||||
|
}
|
||||||
|
changeTopbarColor(e) {
|
||||||
|
(this.config.topbar.color = e),
|
||||||
|
this.html.setAttribute("data-topbar-color", e),
|
||||||
|
this.setSwitchFromConfig();
|
||||||
|
}
|
||||||
|
resetTheme() {
|
||||||
|
(this.config = JSON.parse(JSON.stringify(window.defaultConfig))),
|
||||||
|
this.changeMenuColor(this.config.menu.color),
|
||||||
|
this.changeMenuSize(this.config.menu.size),
|
||||||
|
this.changeThemeMode(this.config.theme),
|
||||||
|
this.changeTopbarColor(this.config.topbar.color),
|
||||||
|
this._adjustLayout();
|
||||||
|
}
|
||||||
|
initSwitchListener() {
|
||||||
|
var n = this,
|
||||||
|
e =
|
||||||
|
(document
|
||||||
|
.querySelectorAll("input[name=data-sidebar-color]")
|
||||||
|
.forEach(function (t) {
|
||||||
|
t.addEventListener("change", function (e) {
|
||||||
|
n.changeMenuColor(t.value);
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
document
|
||||||
|
.querySelectorAll("input[name=data-sidebar-size]")
|
||||||
|
.forEach(function (t) {
|
||||||
|
t.addEventListener("change", function (e) {
|
||||||
|
n.changeMenuSize(t.value);
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
document
|
||||||
|
.querySelectorAll("input[name=data-bs-theme]")
|
||||||
|
.forEach(function (t) {
|
||||||
|
t.addEventListener("change", function (e) {
|
||||||
|
n.changeThemeMode(t.value);
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
document
|
||||||
|
.querySelectorAll("input[name=data-topbar-color]")
|
||||||
|
.forEach(function (t) {
|
||||||
|
t.addEventListener("change", function (e) {
|
||||||
|
n.changeTopbarColor(t.value);
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
document.getElementById("light-dark-mode"));
|
||||||
|
e &&
|
||||||
|
e.addEventListener("click", function (e) {
|
||||||
|
"light" === n.config.theme
|
||||||
|
? n.changeThemeMode("dark")
|
||||||
|
: n.changeThemeMode("light");
|
||||||
|
}),
|
||||||
|
(e = document.querySelector("#reset-layout")) &&
|
||||||
|
e.addEventListener("click", function (e) {
|
||||||
|
n.resetTheme();
|
||||||
|
}),
|
||||||
|
(e = document.querySelector(".button-toggle-menu")) &&
|
||||||
|
e.addEventListener("click", function () {
|
||||||
|
var e = n.config.menu.size,
|
||||||
|
t = n.html.getAttribute("data-sidebar-size", e);
|
||||||
|
"hidden" !== t
|
||||||
|
? "condensed" === t
|
||||||
|
? n.changeMenuSize(
|
||||||
|
"condensed" == e ? "default" : e,
|
||||||
|
!1
|
||||||
|
)
|
||||||
|
: n.changeMenuSize("condensed", !1)
|
||||||
|
: n.showBackdrop(),
|
||||||
|
n.html.classList.toggle("sidebar-enable");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
showBackdrop() {
|
||||||
|
let t = document.createElement("div"),
|
||||||
|
n =
|
||||||
|
((t.classList = "offcanvas-backdrop fade show"),
|
||||||
|
document.body.appendChild(t),
|
||||||
|
(document.body.style.overflow = "hidden"),
|
||||||
|
1040 < window.innerWidth &&
|
||||||
|
(document.body.style.paddingRight = "15px"),
|
||||||
|
this);
|
||||||
|
t.addEventListener("click", function (e) {
|
||||||
|
n.html.classList.remove("sidebar-enable"),
|
||||||
|
document.body.removeChild(t),
|
||||||
|
(document.body.style.overflow = null),
|
||||||
|
(document.body.style.paddingRight = null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initWindowSize() {
|
||||||
|
var t = this;
|
||||||
|
window.addEventListener("resize", function (e) {
|
||||||
|
t._adjustLayout();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
_adjustLayout() {
|
||||||
|
window.innerWidth <= 1140
|
||||||
|
? this.changeMenuSize("hidden", !1)
|
||||||
|
: this.changeMenuSize(this.config.menu.size);
|
||||||
|
}
|
||||||
|
setSwitchFromConfig() {
|
||||||
|
sessionStorage.setItem(
|
||||||
|
"__DARKONE_CONFIG__",
|
||||||
|
JSON.stringify(this.config)
|
||||||
|
),
|
||||||
|
document
|
||||||
|
.querySelectorAll(".settings-bar input[type=radio]")
|
||||||
|
.forEach(function (e) {
|
||||||
|
e.checked = !1;
|
||||||
|
});
|
||||||
|
var e,
|
||||||
|
t,
|
||||||
|
n,
|
||||||
|
o = this.config;
|
||||||
|
o &&
|
||||||
|
((e = document.querySelector(
|
||||||
|
"input[type=radio][name=data-bs-theme][value=" + o.theme + "]"
|
||||||
|
)),
|
||||||
|
(t = document.querySelector(
|
||||||
|
"input[type=radio][name=data-topbar-color][value=" +
|
||||||
|
o.topbar.color +
|
||||||
|
"]"
|
||||||
|
)),
|
||||||
|
(n = document.querySelector(
|
||||||
|
"input[type=radio][name=data-sidebar-size][value=" +
|
||||||
|
o.menu.size +
|
||||||
|
"]"
|
||||||
|
)),
|
||||||
|
(o = document.querySelector(
|
||||||
|
"input[type=radio][name=data-sidebar-color][value=" +
|
||||||
|
o.menu.color +
|
||||||
|
"]"
|
||||||
|
)),
|
||||||
|
e && (e.checked = !0),
|
||||||
|
t && (t.checked = !0),
|
||||||
|
n && (n.checked = !0),
|
||||||
|
o) &&
|
||||||
|
(o.checked = !0);
|
||||||
|
}
|
||||||
|
init() {
|
||||||
|
this.initVerticalMenu(),
|
||||||
|
this.initConfig(),
|
||||||
|
this.initSwitchListener(),
|
||||||
|
this.initWindowSize(),
|
||||||
|
this._adjustLayout(),
|
||||||
|
this.setSwitchFromConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
new ThemeLayout().init();
|
||||||
29
resources/js/config.js
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
!(function () {
|
||||||
|
var t = sessionStorage.getItem("__DARKONE_CONFIG__"),
|
||||||
|
e = document.getElementsByTagName("html")[0],
|
||||||
|
o = {
|
||||||
|
theme: "dark",
|
||||||
|
topbar: { color: "light" },
|
||||||
|
menu: { size: "default", color: "light" },
|
||||||
|
};
|
||||||
|
var html = document.getElementsByTagName("html")[0];
|
||||||
|
var config = Object.assign(JSON.parse(JSON.stringify(o)), {});
|
||||||
|
|
||||||
|
(html),
|
||||||
|
((config = Object.assign(JSON.parse(JSON.stringify(o)), {})).theme =
|
||||||
|
e.getAttribute("data-bs-theme") || o.theme),
|
||||||
|
(config.topbar.color =
|
||||||
|
e.getAttribute("data-topbar-color") || o.topbar.color),
|
||||||
|
(config.menu.color =
|
||||||
|
e.getAttribute("data-sidebar-color") || o.menu.color),
|
||||||
|
(config.menu.size = e.getAttribute("data-sidebar-size") || o.menu.size),
|
||||||
|
(window.defaultConfig = JSON.parse(JSON.stringify(config))),
|
||||||
|
null !== t && (config = JSON.parse(t)),
|
||||||
|
(window.config = config) &&
|
||||||
|
(e.setAttribute("data-bs-theme", config.theme),
|
||||||
|
e.setAttribute("data-topbar-color", config.topbar.color),
|
||||||
|
e.setAttribute("data-sidebar-color", config.menu.color),
|
||||||
|
window.innerWidth <= 1140
|
||||||
|
? e.setAttribute("data-sidebar-size", "hidden")
|
||||||
|
: e.setAttribute("data-sidebar-size", config.menu.size));
|
||||||
|
})();
|
||||||
0
resources/js/irregular-data-series.js
Executable file
1128
resources/js/pages/chart.js
Executable file
464
resources/js/pages/dashboard.js
Executable file
@@ -0,0 +1,464 @@
|
|||||||
|
import ApexCharts from "apexcharts";
|
||||||
|
|
||||||
|
import jsVectorMap from "jsvectormap/dist/jsvectormap.js";
|
||||||
|
import 'jsvectormap/dist/maps/world-merc.js'
|
||||||
|
import 'jsvectormap/dist/maps/world.js'
|
||||||
|
|
||||||
|
var options1 = {
|
||||||
|
chart: {
|
||||||
|
type: 'area',
|
||||||
|
height: 50,
|
||||||
|
sparkline: {
|
||||||
|
enabled: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
data: [25, 28, 32, 38, 43, 55, 60, 48, 42, 51, 35]
|
||||||
|
}],
|
||||||
|
stroke: {
|
||||||
|
width: 2,
|
||||||
|
curve: 'smooth'
|
||||||
|
},
|
||||||
|
markers: {
|
||||||
|
size: 0
|
||||||
|
},
|
||||||
|
colors: ["#7e67fe"],
|
||||||
|
tooltip: {
|
||||||
|
fixed: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
x: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
y: {
|
||||||
|
title: {
|
||||||
|
formatter: function (seriesName) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
marker: {
|
||||||
|
show: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
opacity: [1],
|
||||||
|
type: ['gradient'],
|
||||||
|
gradient: {
|
||||||
|
type: "vertical",
|
||||||
|
// shadeIntensity: 1,
|
||||||
|
inverseColors: false,
|
||||||
|
opacityFrom: 0.5,
|
||||||
|
opacityTo: 0,
|
||||||
|
stops: [0, 100]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
new ApexCharts(document.querySelector("#chart01"), options1).render();
|
||||||
|
|
||||||
|
|
||||||
|
var options1 = {
|
||||||
|
chart: {
|
||||||
|
type: 'area',
|
||||||
|
height: 50,
|
||||||
|
sparkline: {
|
||||||
|
enabled: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
data: [87, 54, 4, 76, 31, 95, 70, 92, 53, 9, 6]
|
||||||
|
}],
|
||||||
|
stroke: {
|
||||||
|
width: 2,
|
||||||
|
curve: 'smooth'
|
||||||
|
},
|
||||||
|
markers: {
|
||||||
|
size: 0
|
||||||
|
},
|
||||||
|
colors: ["#7e67fe"],
|
||||||
|
tooltip: {
|
||||||
|
fixed: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
x: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
y: {
|
||||||
|
title: {
|
||||||
|
formatter: function (seriesName) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
marker: {
|
||||||
|
show: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
opacity: [1],
|
||||||
|
type: ['gradient'],
|
||||||
|
gradient: {
|
||||||
|
type: "vertical",
|
||||||
|
// shadeIntensity: 1,
|
||||||
|
inverseColors: false,
|
||||||
|
opacityFrom: 0.5,
|
||||||
|
opacityTo: 0,
|
||||||
|
stops: [0, 100]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
new ApexCharts(document.querySelector("#chart02"), options1).render();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var options1 = {
|
||||||
|
chart: {
|
||||||
|
type: 'area',
|
||||||
|
height: 50,
|
||||||
|
sparkline: {
|
||||||
|
enabled: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
data: [41, 42, 35, 42, 6, 12, 13, 22, 42, 94, 95]
|
||||||
|
}],
|
||||||
|
stroke: {
|
||||||
|
width: 2,
|
||||||
|
curve: 'smooth'
|
||||||
|
},
|
||||||
|
markers: {
|
||||||
|
size: 0
|
||||||
|
},
|
||||||
|
colors: ["#7e67fe"],
|
||||||
|
tooltip: {
|
||||||
|
fixed: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
x: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
y: {
|
||||||
|
title: {
|
||||||
|
formatter: function (seriesName) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
marker: {
|
||||||
|
show: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
opacity: [1],
|
||||||
|
type: ['gradient'],
|
||||||
|
gradient: {
|
||||||
|
type: "vertical",
|
||||||
|
// shadeIntensity: 1,
|
||||||
|
inverseColors: false,
|
||||||
|
opacityFrom: 0.5,
|
||||||
|
opacityTo: 0,
|
||||||
|
stops: [0, 100]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
new ApexCharts(document.querySelector("#chart03"), options1).render();
|
||||||
|
|
||||||
|
|
||||||
|
var options1 = {
|
||||||
|
chart: {
|
||||||
|
type: 'area',
|
||||||
|
height: 50,
|
||||||
|
sparkline: {
|
||||||
|
enabled: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
data: [8, 41, 40, 48, 77, 35, 0, 77, 63, 100, 71]
|
||||||
|
}],
|
||||||
|
stroke: {
|
||||||
|
width: 2,
|
||||||
|
curve: 'smooth'
|
||||||
|
},
|
||||||
|
markers: {
|
||||||
|
size: 0
|
||||||
|
},
|
||||||
|
colors: ["#7e67fe"],
|
||||||
|
tooltip: {
|
||||||
|
fixed: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
x: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
y: {
|
||||||
|
title: {
|
||||||
|
formatter: function (seriesName) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
marker: {
|
||||||
|
show: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
opacity: [1],
|
||||||
|
type: ['gradient'],
|
||||||
|
gradient: {
|
||||||
|
type: "vertical",
|
||||||
|
// shadeIntensity: 1,
|
||||||
|
inverseColors: false,
|
||||||
|
opacityFrom: 0.5,
|
||||||
|
opacityTo: 0,
|
||||||
|
stops: [0, 100]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
new ApexCharts(document.querySelector("#chart04"), options1).render();
|
||||||
|
|
||||||
|
// Conversions
|
||||||
|
var options = {
|
||||||
|
chart: {
|
||||||
|
height: 180,
|
||||||
|
type: 'donut',
|
||||||
|
},
|
||||||
|
series: [44.25, 52.68, 45.98],
|
||||||
|
legend: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
stroke: {
|
||||||
|
width: 0
|
||||||
|
},
|
||||||
|
plotOptions: {
|
||||||
|
pie: {
|
||||||
|
donut: {
|
||||||
|
size: '70%',
|
||||||
|
labels: {
|
||||||
|
show: false,
|
||||||
|
total: {
|
||||||
|
showAlways: true,
|
||||||
|
show: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
labels: ["Direct", "Affilliate", "Sponsored"],
|
||||||
|
colors: ["#7e67fe", "#17c553", "#7942ed"],
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
responsive: [{
|
||||||
|
breakpoint: 480,
|
||||||
|
options: {
|
||||||
|
chart: {
|
||||||
|
width: 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
fill: {
|
||||||
|
type: 'gradient'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var chart = new ApexCharts(
|
||||||
|
document.querySelector("#conversions"),
|
||||||
|
options
|
||||||
|
);
|
||||||
|
chart.render();
|
||||||
|
|
||||||
|
//Sales Report -chart
|
||||||
|
var options = {
|
||||||
|
series: [{
|
||||||
|
name: "Page Views",
|
||||||
|
type: "bar",
|
||||||
|
data: [34, 65, 46, 68, 49, 61, 42, 44, 78, 52, 63, 67],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Clicks",
|
||||||
|
type: "area",
|
||||||
|
data: [8, 12, 7, 17, 21, 11, 5, 9, 7, 29, 12, 35],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Revenue",
|
||||||
|
type: "area",
|
||||||
|
data: [12, 16, 11, 22, 28, 25, 15, 29, 35, 45, 42, 48],
|
||||||
|
}
|
||||||
|
],
|
||||||
|
chart: {
|
||||||
|
height: 330,
|
||||||
|
type: "line",
|
||||||
|
toolbar: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
stroke: {
|
||||||
|
dashArray: [0, 0, 2],
|
||||||
|
width: [0, 2, 2],
|
||||||
|
curve: 'smooth'
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
opacity: [1, 1, 1],
|
||||||
|
type: ['solid', 'gradient', 'gradient'],
|
||||||
|
gradient: {
|
||||||
|
type: "vertical",
|
||||||
|
inverseColors: false,
|
||||||
|
opacityFrom: 0.5,
|
||||||
|
opacityTo: 0,
|
||||||
|
stops: [0, 90]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
markers: {
|
||||||
|
size: [0, 0],
|
||||||
|
strokeWidth: 2,
|
||||||
|
hover: {
|
||||||
|
size: 4,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
xaxis: {
|
||||||
|
categories: [
|
||||||
|
"Jan",
|
||||||
|
"Feb",
|
||||||
|
"Mar",
|
||||||
|
"Apr",
|
||||||
|
"May",
|
||||||
|
"Jun",
|
||||||
|
"Jul",
|
||||||
|
"Aug",
|
||||||
|
"Sep",
|
||||||
|
"Oct",
|
||||||
|
"Nov",
|
||||||
|
"Dec",
|
||||||
|
],
|
||||||
|
axisTicks: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisBorder: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
yaxis: {
|
||||||
|
min: 0,
|
||||||
|
axisBorder: {
|
||||||
|
show: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
show: true,
|
||||||
|
strokeDashArray: 3,
|
||||||
|
xaxis: {
|
||||||
|
lines: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
yaxis: {
|
||||||
|
lines: {
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
padding: {
|
||||||
|
top: 0,
|
||||||
|
right: -2,
|
||||||
|
bottom: 10,
|
||||||
|
left: 10,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
show: true,
|
||||||
|
horizontalAlign: "center",
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 5,
|
||||||
|
markers: {
|
||||||
|
width: 9,
|
||||||
|
height: 9,
|
||||||
|
radius: 6,
|
||||||
|
},
|
||||||
|
itemMargin: {
|
||||||
|
horizontal: 10,
|
||||||
|
vertical: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plotOptions: {
|
||||||
|
bar: {
|
||||||
|
columnWidth: "30%",
|
||||||
|
barHeight: "70%",
|
||||||
|
borderRadius: 3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
colors: ["#7e67fe", "#17c553", "#7942ed"],
|
||||||
|
tooltip: {
|
||||||
|
shared: true,
|
||||||
|
y: [{
|
||||||
|
formatter: function (y) {
|
||||||
|
if (typeof y !== "undefined") {
|
||||||
|
return y.toFixed(1) + "k";
|
||||||
|
}
|
||||||
|
return y;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
formatter: function (y) {
|
||||||
|
if (typeof y !== "undefined") {
|
||||||
|
return y.toFixed(1) + "k";
|
||||||
|
}
|
||||||
|
return y;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
var chart = new ApexCharts(
|
||||||
|
document.querySelector("#dash-performance-chart"),
|
||||||
|
options
|
||||||
|
);
|
||||||
|
|
||||||
|
chart.render();
|
||||||
|
|
||||||
|
|
||||||
|
class VectorMap {
|
||||||
|
|
||||||
|
initWorldMapMarker() {
|
||||||
|
const map = new jsVectorMap({
|
||||||
|
map: 'world',
|
||||||
|
selector: '#world-map-markers',
|
||||||
|
zoomOnScroll: true,
|
||||||
|
zoomButtons: false,
|
||||||
|
markersSelectable: true,
|
||||||
|
markers: [
|
||||||
|
{ name: "Canada", coords: [56.1304, -106.3468] },
|
||||||
|
{ name: "Brazil", coords: [-14.2350, -51.9253] },
|
||||||
|
{ name: "Russia", coords: [61, 105] },
|
||||||
|
{ name: "China", coords: [35.8617, 104.1954] },
|
||||||
|
{ name: "United States", coords: [37.0902, -95.7129] }
|
||||||
|
],
|
||||||
|
markerStyle: {
|
||||||
|
initial: { fill: "#7f56da" },
|
||||||
|
selected: { fill: "#1bb394" }
|
||||||
|
},
|
||||||
|
labels: {
|
||||||
|
markers: {
|
||||||
|
render: marker => marker.name
|
||||||
|
}
|
||||||
|
},
|
||||||
|
regionStyle: {
|
||||||
|
initial: {
|
||||||
|
fill: 'rgba(169,183,197, 0.3)',
|
||||||
|
fillOpacity: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
init() {
|
||||||
|
this.initWorldMapMarker();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function (e) {
|
||||||
|
new VectorMap().init();
|
||||||
|
});
|
||||||
17
resources/js/pages/form-fileupload.js
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
import { Dropzone } from "dropzone";
|
||||||
|
|
||||||
|
Dropzone.autoDiscover = false;
|
||||||
|
|
||||||
|
var previewTemplate,
|
||||||
|
dropzone,
|
||||||
|
dropzonePreviewNode = document.querySelector("#dropzone-preview-list");
|
||||||
|
(dropzonePreviewNode.id = ""),
|
||||||
|
dropzonePreviewNode &&
|
||||||
|
((previewTemplate = dropzonePreviewNode.parentNode.innerHTML),
|
||||||
|
dropzonePreviewNode.parentNode.removeChild(dropzonePreviewNode),
|
||||||
|
(dropzone = new Dropzone(".dropzone", {
|
||||||
|
url: "https://httpbin.org/post",
|
||||||
|
method: "post",
|
||||||
|
previewTemplate: previewTemplate,
|
||||||
|
previewsContainer: "#dropzone-preview",
|
||||||
|
})));
|
||||||
83
resources/js/pages/form-flatepicker.js
Executable file
@@ -0,0 +1,83 @@
|
|||||||
|
import 'flatpickr/dist/flatpickr'
|
||||||
|
|
||||||
|
class FlatpickrDemo {
|
||||||
|
init() {
|
||||||
|
document.getElementById("basic-datepicker").flatpickr(),
|
||||||
|
document
|
||||||
|
.getElementById("datetime-datepicker")
|
||||||
|
.flatpickr({ enableTime: !0, dateFormat: "Y-m-d H:i" }),
|
||||||
|
document
|
||||||
|
.getElementById("humanfd-datepicker")
|
||||||
|
.flatpickr({
|
||||||
|
altInput: !0,
|
||||||
|
altFormat: "F j, Y",
|
||||||
|
dateFormat: "Y-m-d",
|
||||||
|
}),
|
||||||
|
document
|
||||||
|
.getElementById("minmax-datepicker")
|
||||||
|
.flatpickr({ minDate: "2020-01", maxDate: "2020-03" }),
|
||||||
|
document.getElementById("disable-datepicker").flatpickr({
|
||||||
|
onReady: function () {
|
||||||
|
this.jumpToDate("2025-01");
|
||||||
|
},
|
||||||
|
disable: [
|
||||||
|
"2025-01-10",
|
||||||
|
"2025-01-21",
|
||||||
|
"2025-01-30",
|
||||||
|
new Date(2025, 4, 9),
|
||||||
|
],
|
||||||
|
dateFormat: "Y-m-d",
|
||||||
|
}),
|
||||||
|
document
|
||||||
|
.getElementById("multiple-datepicker")
|
||||||
|
.flatpickr({ mode: "multiple", dateFormat: "Y-m-d" }),
|
||||||
|
document
|
||||||
|
.getElementById("conjunction-datepicker")
|
||||||
|
.flatpickr({
|
||||||
|
mode: "multiple",
|
||||||
|
dateFormat: "Y-m-d",
|
||||||
|
conjunction: " :: ",
|
||||||
|
}),
|
||||||
|
document
|
||||||
|
.getElementById("range-datepicker")
|
||||||
|
.flatpickr({ mode: "range" }),
|
||||||
|
document
|
||||||
|
.getElementById("inline-datepicker")
|
||||||
|
.flatpickr({ inline: !0 }),
|
||||||
|
document
|
||||||
|
.getElementById("basic-timepicker")
|
||||||
|
.flatpickr({
|
||||||
|
enableTime: !0,
|
||||||
|
noCalendar: !0,
|
||||||
|
dateFormat: "H:i",
|
||||||
|
}),
|
||||||
|
document
|
||||||
|
.getElementById("24hours-timepicker")
|
||||||
|
.flatpickr({
|
||||||
|
enableTime: !0,
|
||||||
|
noCalendar: !0,
|
||||||
|
dateFormat: "H:i",
|
||||||
|
time_24hr: !0,
|
||||||
|
}),
|
||||||
|
document
|
||||||
|
.getElementById("minmax-timepicker")
|
||||||
|
.flatpickr({
|
||||||
|
enableTime: !0,
|
||||||
|
noCalendar: !0,
|
||||||
|
dateFormat: "H:i",
|
||||||
|
minDate: "16:00",
|
||||||
|
maxDate: "22:30",
|
||||||
|
}),
|
||||||
|
document
|
||||||
|
.getElementById("preloading-timepicker")
|
||||||
|
.flatpickr({
|
||||||
|
enableTime: !0,
|
||||||
|
noCalendar: !0,
|
||||||
|
dateFormat: "H:i",
|
||||||
|
defaultDate: "01:45",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.addEventListener("DOMContentLoaded", function (e) {
|
||||||
|
new FlatpickrDemo().init();
|
||||||
|
});
|
||||||
27
resources/js/pages/form-quilljs.js
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
import Quill from 'quill';
|
||||||
|
var quill = new Quill("#snow-editor", {
|
||||||
|
theme: "snow",
|
||||||
|
modules: {
|
||||||
|
toolbar: [
|
||||||
|
[{ font: [] }, { size: [] }],
|
||||||
|
["bold", "italic", "underline", "strike"],
|
||||||
|
[{ color: [] }, { background: [] }],
|
||||||
|
[{ script: "super" }, { script: "sub" }],
|
||||||
|
[
|
||||||
|
{ header: [!1, 1, 2, 3, 4, 5, 6] },
|
||||||
|
"blockquote",
|
||||||
|
"code-block",
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{ list: "ordered" },
|
||||||
|
{ list: "bullet" },
|
||||||
|
{ indent: "-1" },
|
||||||
|
{ indent: "+1" },
|
||||||
|
],
|
||||||
|
["direction", { align: [] }],
|
||||||
|
["link", "image", "video"],
|
||||||
|
["clean"],
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
quill = new Quill("#bubble-editor", { theme: "bubble" });
|
||||||
1
resources/js/pages/maps-canada.js
Executable file
314
resources/js/pages/maps-google.js
Executable file
@@ -0,0 +1,314 @@
|
|||||||
|
import GMaps from 'gmaps';
|
||||||
|
|
||||||
|
class GoogleMap {
|
||||||
|
initBasicGoogleMap() {
|
||||||
|
new GMaps({ div: "#gmaps-basic", lat: -12.043333, lng: -77.028333 });
|
||||||
|
}
|
||||||
|
initMarkerGoogleMap() {
|
||||||
|
new GMaps({ div: "#gmaps-markers", lat: -12.043333, lng: -77.028333 });
|
||||||
|
}
|
||||||
|
initStreetViewGoogleMap() {
|
||||||
|
GMaps.createPanorama({ el: "#panorama", lat: 42.3455, lng: -71.0983 });
|
||||||
|
}
|
||||||
|
initMapTypes() {
|
||||||
|
var e = new GMaps({
|
||||||
|
el: "#gmaps-types",
|
||||||
|
lat: 42.3455,
|
||||||
|
lng: -71.0983,
|
||||||
|
mapTypeControlOptions: {
|
||||||
|
mapTypeIds: [
|
||||||
|
"hybrid",
|
||||||
|
"roadmap",
|
||||||
|
"satellite",
|
||||||
|
"terrain",
|
||||||
|
"osm",
|
||||||
|
"cloudmade",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return (
|
||||||
|
e.addMapType("osm", {
|
||||||
|
getTileUrl: function (e, t) {
|
||||||
|
return (
|
||||||
|
"http://tile.openstreetmap.org/" +
|
||||||
|
t +
|
||||||
|
"/" +
|
||||||
|
e.x +
|
||||||
|
"/" +
|
||||||
|
e.y +
|
||||||
|
".png"
|
||||||
|
);
|
||||||
|
},
|
||||||
|
tileSize: new google.maps.Size(256, 256),
|
||||||
|
name: "OpenStreetMap",
|
||||||
|
maxZoom: 18,
|
||||||
|
}),
|
||||||
|
e.addMapType("cloudmade", {
|
||||||
|
getTileUrl: function (e, t) {
|
||||||
|
return (
|
||||||
|
"http://b.tile.cloudmade.com/8ee2a50541944fb9bcedded5165f09d9/1/256/" +
|
||||||
|
t +
|
||||||
|
"/" +
|
||||||
|
e.x +
|
||||||
|
"/" +
|
||||||
|
e.y +
|
||||||
|
".png"
|
||||||
|
);
|
||||||
|
},
|
||||||
|
tileSize: new google.maps.Size(256, 256),
|
||||||
|
name: "CloudMade",
|
||||||
|
maxZoom: 18,
|
||||||
|
}),
|
||||||
|
e.setMapTypeId("osm"),
|
||||||
|
e
|
||||||
|
);
|
||||||
|
}
|
||||||
|
initUltraLightMap() {
|
||||||
|
new GMaps({
|
||||||
|
div: "#ultra-light",
|
||||||
|
lat: 42.3455,
|
||||||
|
lng: -71.0983,
|
||||||
|
styles: [
|
||||||
|
{
|
||||||
|
featureType: "water",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [{ color: "#e9e9e9" }, { lightness: 17 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "landscape",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [{ color: "#f5f5f5" }, { lightness: 20 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.highway",
|
||||||
|
elementType: "geometry.fill",
|
||||||
|
stylers: [{ color: "#ffffff" }, { lightness: 17 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.highway",
|
||||||
|
elementType: "geometry.stroke",
|
||||||
|
stylers: [
|
||||||
|
{ color: "#ffffff" },
|
||||||
|
{ lightness: 29 },
|
||||||
|
{ weight: 0.2 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.arterial",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [{ color: "#ffffff" }, { lightness: 18 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.local",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [{ color: "#ffffff" }, { lightness: 16 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "poi",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [{ color: "#f5f5f5" }, { lightness: 21 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "poi.park",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [{ color: "#dedede" }, { lightness: 21 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elementType: "labels.text.stroke",
|
||||||
|
stylers: [
|
||||||
|
{ visibility: "on" },
|
||||||
|
{ color: "#ffffff" },
|
||||||
|
{ lightness: 16 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elementType: "labels.text.fill",
|
||||||
|
stylers: [
|
||||||
|
{ saturation: 36 },
|
||||||
|
{ color: "#333333" },
|
||||||
|
{ lightness: 40 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elementType: "labels.icon",
|
||||||
|
stylers: [{ visibility: "off" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "transit",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [{ color: "#f2f2f2" }, { lightness: 19 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "administrative",
|
||||||
|
elementType: "geometry.fill",
|
||||||
|
stylers: [{ color: "#fefefe" }, { lightness: 20 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "administrative",
|
||||||
|
elementType: "geometry.stroke",
|
||||||
|
stylers: [
|
||||||
|
{ color: "#fefefe" },
|
||||||
|
{ lightness: 17 },
|
||||||
|
{ weight: 1.2 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initDarkMap() {
|
||||||
|
new GMaps({
|
||||||
|
div: "#dark",
|
||||||
|
lat: 42.3455,
|
||||||
|
lng: -71.0983,
|
||||||
|
styles: [
|
||||||
|
{
|
||||||
|
featureType: "all",
|
||||||
|
elementType: "labels",
|
||||||
|
stylers: [{ visibility: "on" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "all",
|
||||||
|
elementType: "labels.text.fill",
|
||||||
|
stylers: [
|
||||||
|
{ saturation: 36 },
|
||||||
|
{ color: "#000000" },
|
||||||
|
{ lightness: 40 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "all",
|
||||||
|
elementType: "labels.text.stroke",
|
||||||
|
stylers: [
|
||||||
|
{ visibility: "on" },
|
||||||
|
{ color: "#000000" },
|
||||||
|
{ lightness: 16 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "all",
|
||||||
|
elementType: "labels.icon",
|
||||||
|
stylers: [{ visibility: "off" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "administrative",
|
||||||
|
elementType: "geometry.fill",
|
||||||
|
stylers: [{ color: "#000000" }, { lightness: 20 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "administrative",
|
||||||
|
elementType: "geometry.stroke",
|
||||||
|
stylers: [
|
||||||
|
{ color: "#000000" },
|
||||||
|
{ lightness: 17 },
|
||||||
|
{ weight: 1.2 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "administrative.country",
|
||||||
|
elementType: "labels.text.fill",
|
||||||
|
stylers: [{ color: "#e5c163" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "administrative.locality",
|
||||||
|
elementType: "labels.text.fill",
|
||||||
|
stylers: [{ color: "#c4c4c4" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "administrative.neighborhood",
|
||||||
|
elementType: "labels.text.fill",
|
||||||
|
stylers: [{ color: "#e5c163" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "landscape",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [{ color: "#000000" }, { lightness: 20 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "poi",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [
|
||||||
|
{ color: "#000000" },
|
||||||
|
{ lightness: 21 },
|
||||||
|
{ visibility: "on" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "poi.business",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [{ visibility: "on" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.highway",
|
||||||
|
elementType: "geometry.fill",
|
||||||
|
stylers: [{ color: "#e5c163" }, { lightness: "0" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.highway",
|
||||||
|
elementType: "geometry.stroke",
|
||||||
|
stylers: [{ visibility: "off" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.highway",
|
||||||
|
elementType: "labels.text.fill",
|
||||||
|
stylers: [{ color: "#ffffff" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.highway",
|
||||||
|
elementType: "labels.text.stroke",
|
||||||
|
stylers: [{ color: "#e5c163" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.arterial",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [{ color: "#000000" }, { lightness: 18 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.arterial",
|
||||||
|
elementType: "geometry.fill",
|
||||||
|
stylers: [{ color: "#575757" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.arterial",
|
||||||
|
elementType: "labels.text.fill",
|
||||||
|
stylers: [{ color: "#ffffff" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.arterial",
|
||||||
|
elementType: "labels.text.stroke",
|
||||||
|
stylers: [{ color: "#2c2c2c" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.local",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [{ color: "#000000" }, { lightness: 16 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "road.local",
|
||||||
|
elementType: "labels.text.fill",
|
||||||
|
stylers: [{ color: "#999999" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "transit",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [{ color: "#000000" }, { lightness: 19 }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
featureType: "water",
|
||||||
|
elementType: "geometry",
|
||||||
|
stylers: [{ color: "#000000" }, { lightness: 17 }],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
init() {
|
||||||
|
this.initBasicGoogleMap(),
|
||||||
|
this.initMarkerGoogleMap(),
|
||||||
|
this.initStreetViewGoogleMap(),
|
||||||
|
this.initMapTypes(),
|
||||||
|
this.initUltraLightMap(),
|
||||||
|
this.initDarkMap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.addEventListener("DOMContentLoaded", function (e) {
|
||||||
|
new GoogleMap().init();
|
||||||
|
});
|
||||||