Phase One
This commit is contained in:
commit
861c2cd30c
15
.editorconfig
Executable file
15
.editorconfig
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
47
.env.example
Executable file
47
.env.example
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=laravel
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=smtp.mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS=null
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
5
.gitattributes
vendored
Executable file
5
.gitattributes
vendored
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
* text=auto
|
||||
*.css linguist-vendored
|
||||
*.scss linguist-vendored
|
||||
*.js linguist-vendored
|
||||
CHANGELOG.md export-ignore
|
||||
12
.gitignore
vendored
Executable file
12
.gitignore
vendored
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
/node_modules
|
||||
/public/hot
|
||||
/public/storage
|
||||
/storage/*.key
|
||||
/vendor
|
||||
.env
|
||||
.env.backup
|
||||
.phpunit.result.cache
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
26
.htaccess
Executable file
26
.htaccess
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
<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>
|
||||
|
||||
<Files .env>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
13
.styleci.yml
Executable file
13
.styleci.yml
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
php:
|
||||
preset: laravel
|
||||
disabled:
|
||||
- no_unused_imports
|
||||
finder:
|
||||
not-name:
|
||||
- index.php
|
||||
- server.php
|
||||
js:
|
||||
finder:
|
||||
not-name:
|
||||
- webpack.mix.js
|
||||
css: true
|
||||
61
README.md
Executable file
61
README.md
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
<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"></a></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://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.
|
||||
|
||||
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
|
||||
|
||||
## Laravel Sponsors
|
||||
|
||||
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
|
||||
|
||||
### Premium Partners
|
||||
|
||||
- **[Vehikl](https://vehikl.com/)**
|
||||
- **[Tighten Co.](https://tighten.co)**
|
||||
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
|
||||
- **[64 Robots](https://64robots.com)**
|
||||
- **[Cubet Techno Labs](https://cubettech.com)**
|
||||
- **[Cyber-Duck](https://cyber-duck.co.uk)**
|
||||
- **[Many](https://www.many.co.uk)**
|
||||
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
|
||||
- **[DevSquad](https://devsquad.com)**
|
||||
- **[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).
|
||||
41
app/Console/Kernel.php
Executable file
41
app/Console/Kernel.php
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
* @return void
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
// $schedule->command('inspire')->hourly();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the commands for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function commands()
|
||||
{
|
||||
$this->load(__DIR__.'/Commands');
|
||||
|
||||
require base_path('routes/console.php');
|
||||
}
|
||||
}
|
||||
37
app/Exceptions/Handler.php
Executable file
37
app/Exceptions/Handler.php
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
/**
|
||||
* A list of the exception types that are not reported.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dontReport = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* A list of the inputs that are never flashed for validation exceptions.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dontFlash = [
|
||||
'password',
|
||||
'password_confirmation',
|
||||
];
|
||||
|
||||
/**
|
||||
* Register the exception handling callbacks for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
134
app/Http/Controllers/AdminController.php
Executable file
134
app/Http/Controllers/AdminController.php
Executable file
|
|
@ -0,0 +1,134 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use DB;
|
||||
use Mail;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
|
||||
class AdminController extends Controller
|
||||
{
|
||||
|
||||
public function index () {
|
||||
return view('Admin.index');
|
||||
}
|
||||
|
||||
public function login (Request $request) {
|
||||
$data = $request->all();
|
||||
|
||||
if ((!isset($data['mail'])) || (!isset($data['password']))){
|
||||
$errors = '1';
|
||||
return view('Admin.index', compact('errors'));
|
||||
}
|
||||
|
||||
$credentials = [
|
||||
'mail' => $data['mail'],
|
||||
'password' => $data['password']
|
||||
];
|
||||
|
||||
try {
|
||||
if (Auth::attempt($credentials)) {
|
||||
$user = DB::table('users')->where('email', '=', $credentials['mail'])
|
||||
->get(['name']);
|
||||
|
||||
$credentials['name'] = $user[0]->name;
|
||||
Session::push('credentials', $credentials);
|
||||
|
||||
return redirect()->route('employees');
|
||||
}
|
||||
else{
|
||||
$errors = '2';
|
||||
return view('Admin.index', compact('errors'));
|
||||
}
|
||||
} catch (\Exception $ex) {
|
||||
Log::channel('error')->info('Error:'.$ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function logout (Request $request) {
|
||||
|
||||
$request->session()->flush();
|
||||
$request->session()->regenerate();
|
||||
Auth::logout();
|
||||
return redirect()->route('login');
|
||||
}
|
||||
|
||||
|
||||
public function search (Request $request) {
|
||||
$data = $request->all();
|
||||
$criteria = $data['search'];
|
||||
|
||||
$users = User::where('name', 'LIKE', '%'.$criteria.'%')
|
||||
->orWhere('department', 'LIKE', '%'.$criteria.'%')
|
||||
->get();
|
||||
|
||||
$curr_user = $request->session()->get('credentials');
|
||||
$data = [
|
||||
'users' => $users,
|
||||
'curr_user' => $curr_user[0]['name']
|
||||
];
|
||||
|
||||
return view('Admin.employees', compact('data'));
|
||||
}
|
||||
|
||||
|
||||
public function show (Request $request) {
|
||||
$users = DB::table('users')->orderBy('name')->get();
|
||||
$curr_user = $request->session()->get('credentials');
|
||||
|
||||
$data = [
|
||||
'users' => $users,
|
||||
'curr_user' => $curr_user[0]['name']
|
||||
];
|
||||
|
||||
return view('Admin.employees')->with(compact('data'));
|
||||
}
|
||||
|
||||
|
||||
public function import () {
|
||||
|
||||
try {
|
||||
Artisan::call('ldap:import user -n');
|
||||
DB::table('users')->where('description', '=', 'Test Account')->delete();
|
||||
return redirect()->route('employees');
|
||||
} catch (\Exception $ex) {
|
||||
Log::channel('error')->info('Error:'.$ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function export (Request $request) {
|
||||
$data = array('data' => json_decode($request->data));
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
public function sort (Request $request, $sortBy) {
|
||||
|
||||
$data = array('data' => json_decode($request->data));
|
||||
|
||||
if ($sortBy != 'name'){
|
||||
$sorted = collect($data['data'])->sortByDesc($sortBy);
|
||||
}
|
||||
else {
|
||||
$sorted = collect($data['data'])->sortBy($sortBy);
|
||||
}
|
||||
|
||||
$data = $sorted->values()->all();
|
||||
$curr_user = $request->session()->get('credentials');
|
||||
|
||||
$data = [
|
||||
'users' => $data,
|
||||
'curr_user' => $curr_user[0]['name']
|
||||
];
|
||||
|
||||
return view('Admin.employees', compact('data'));
|
||||
}
|
||||
}
|
||||
13
app/Http/Controllers/Controller.php
Executable file
13
app/Http/Controllers/Controller.php
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||
}
|
||||
37
app/Http/Controllers/IndexController.php
Executable file
37
app/Http/Controllers/IndexController.php
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
use DB;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\User;
|
||||
|
||||
|
||||
class IndexController extends Controller
|
||||
{
|
||||
|
||||
public function index () {
|
||||
return view('User.index');
|
||||
}
|
||||
|
||||
|
||||
public function search (Request $request) {
|
||||
$data = $request->all();
|
||||
$criteria = $data['search'];
|
||||
|
||||
$users = User::where('name', 'LIKE', '%'.$criteria.'%')
|
||||
->orWhere('department', 'LIKE', '%'.$criteria.'%')
|
||||
->get();
|
||||
|
||||
// return response()->json([$data]);
|
||||
return view('User.employees', compact('users'));
|
||||
}
|
||||
|
||||
|
||||
public function show () {
|
||||
$users = DB::table('users')->orderBy('name')->get();
|
||||
return view('User.employees')->with(compact('users'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
133
app/Http/Controllers/PBXController.php
Normal file
133
app/Http/Controllers/PBXController.php
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use DB;
|
||||
use Mail;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Mail\NotifyAdmin;
|
||||
use App\Mail\NotifyUser;
|
||||
use App\Models\ExpiredPin;
|
||||
use App\Models\PBXPin;
|
||||
use GuzzleHttp\RetryMiddleware;
|
||||
|
||||
class PBXController extends Controller
|
||||
{
|
||||
public function pbx (Request $request) {
|
||||
$pins = DB::table('pbx_pin')->orderBy('name')->get();
|
||||
$curr_user = $request->session()->get('credentials');
|
||||
|
||||
$data = [
|
||||
'pins' => $pins,
|
||||
'curr_user' => $curr_user[0]['name']
|
||||
];
|
||||
|
||||
return view('Admin.pbx', compact('data'));
|
||||
}
|
||||
|
||||
public function pbxSearch (Request $request) {
|
||||
$data = $request->all();
|
||||
$criteria = $data['search'];
|
||||
|
||||
$pins = pbx_pin::where('name', 'LIKE', '%'.$criteria.'%')
|
||||
->orWhere('pin', '=', $criteria)
|
||||
->get();
|
||||
|
||||
$curr_user = $request->session()->get('credentials');
|
||||
$data = [
|
||||
'pins' => $pins,
|
||||
'curr_user' => $curr_user[0]['name']
|
||||
];
|
||||
|
||||
return view('Admin.pbx', compact('data'));
|
||||
}
|
||||
|
||||
public function createPin (Request $request) {
|
||||
$data = $request->all();
|
||||
$curr_user = $request->session()->get('credentials');
|
||||
|
||||
try {
|
||||
$pins = DB::table('pbx_pin')->orderBy("name")->get();
|
||||
$user = DB::table('users')->where('email', '=', $data['add-pbx'])->get();
|
||||
|
||||
if (!$user->isEmpty()) {
|
||||
$user_check = DB::table('pbx_pin')->where('email', '=', $data['add-pbx'])->get();
|
||||
|
||||
if($user_check->isEmpty()){
|
||||
|
||||
$check = 0;
|
||||
while ($check == 0) {
|
||||
$pinGenerator = rand(10000,99999);
|
||||
$check_curr = DB::table('pbx_pin')->where('pin', '=', $pinGenerator)->get();
|
||||
$check_old = DB::table('expired_pins')->where('pin', '=', $pinGenerator)->get();
|
||||
|
||||
if ($check_curr->isEmpty() && $check_old->isEmpty()){
|
||||
$check = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$pbx = new PBXPin();
|
||||
|
||||
$pbx->name = $user_check[0]->name;
|
||||
$pbx->email = $user_check[0]->email;
|
||||
$pbx->updated_by = $curr_user[0]['name'];
|
||||
$pbx->pin = $pinGenerator;
|
||||
|
||||
$pbx->save();
|
||||
}
|
||||
else {
|
||||
// User already has PBX pin assigned
|
||||
$data = [
|
||||
'pins' => $pins,
|
||||
'error' => '1',
|
||||
'curr_user' => $curr_user[0]['name']
|
||||
];
|
||||
|
||||
return view('Admin.pbx', compact('data'));
|
||||
}
|
||||
}
|
||||
else {
|
||||
// User is not found
|
||||
$pins = DB::table('pbx_pin')->orderBy("name")->get();
|
||||
$data = [
|
||||
'pins' => $pins,
|
||||
'error' => '2',
|
||||
'curr_user' => $curr_user[0]['name']
|
||||
];
|
||||
|
||||
return view('Admin.pbx', compact('data'));
|
||||
}
|
||||
} catch (\Exception $ex) {
|
||||
Log::channel('error')->info('Error:'.$ex);
|
||||
}
|
||||
}
|
||||
|
||||
public function unauthorizedAccess () {
|
||||
return view('Admin.unauthorized');
|
||||
}
|
||||
|
||||
public function disable (Request $request, $id) {
|
||||
try {
|
||||
$pin = DB::table('pbx_pin')->where('id', $id)->delete();
|
||||
$curr_user = $request->session()->get('credentials');
|
||||
$pins = DB::table('pbx_pin')->orderBy("name")->get();
|
||||
$data = [
|
||||
'pins' => $pins,
|
||||
'curr_user' => $curr_user[0]['name']
|
||||
];
|
||||
|
||||
return redirect()->route('pbx');
|
||||
}
|
||||
catch (\Exception $ex) {
|
||||
Log::channel('error')->info('Error:'.$ex);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
68
app/Http/Kernel.php
Executable file
68
app/Http/Kernel.php
Executable file
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http;
|
||||
|
||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||
|
||||
class Kernel extends HttpKernel
|
||||
{
|
||||
/**
|
||||
* The application's global HTTP middleware stack.
|
||||
*
|
||||
* These middleware are run during every request to your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $middleware = [
|
||||
// \App\Http\Middleware\TrustHosts::class,
|
||||
\App\Http\Middleware\TrustProxies::class,
|
||||
\Fruitcake\Cors\HandleCors::class,
|
||||
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||
\App\Http\Middleware\TrimStrings::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware groups.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
|
||||
'api' => [
|
||||
'throttle:api',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware.
|
||||
*
|
||||
* These middleware may be assigned to groups or used individually.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $routeMiddleware = [
|
||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
||||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||
'auth.user' => \App\Http\Middleware\AuthenticateUser::class,
|
||||
'super.admin' => \App\Http\Middleware\SuperAdmin::class
|
||||
];
|
||||
}
|
||||
21
app/Http/Middleware/Authenticate.php
Executable file
21
app/Http/Middleware/Authenticate.php
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Auth\Middleware\Authenticate as Middleware;
|
||||
|
||||
class Authenticate extends Middleware
|
||||
{
|
||||
/**
|
||||
* Get the path the user should be redirected to when they are not authenticated.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return string|null
|
||||
*/
|
||||
protected function redirectTo($request)
|
||||
{
|
||||
if (! $request->expectsJson()) {
|
||||
return route('login');
|
||||
}
|
||||
}
|
||||
}
|
||||
29
app/Http/Middleware/AuthenticateUser.php
Executable file
29
app/Http/Middleware/AuthenticateUser.php
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class AuthenticateUser
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
|
||||
if (Auth::check()) {
|
||||
return $next($request);
|
||||
}
|
||||
else{
|
||||
return back();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
17
app/Http/Middleware/EncryptCookies.php
Executable file
17
app/Http/Middleware/EncryptCookies.php
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
|
||||
|
||||
class EncryptCookies extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the cookies that should not be encrypted.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
||||
17
app/Http/Middleware/PreventRequestsDuringMaintenance.php
Executable file
17
app/Http/Middleware/PreventRequestsDuringMaintenance.php
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
|
||||
|
||||
class PreventRequestsDuringMaintenance extends Middleware
|
||||
{
|
||||
/**
|
||||
* The URIs that should be reachable while maintenance mode is enabled.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
||||
32
app/Http/Middleware/RedirectIfAuthenticated.php
Executable file
32
app/Http/Middleware/RedirectIfAuthenticated.php
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class RedirectIfAuthenticated
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param string|null ...$guards
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(Request $request, Closure $next, ...$guards)
|
||||
{
|
||||
$guards = empty($guards) ? [null] : $guards;
|
||||
|
||||
foreach ($guards as $guard) {
|
||||
if (Auth::guard($guard)->check()) {
|
||||
return redirect(RouteServiceProvider::HOME);
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
31
app/Http/Middleware/SuperAdmin.php
Executable file
31
app/Http/Middleware/SuperAdmin.php
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class SuperAdmin
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
|
||||
if (Auth::user()->email === 'AgardB@gov.tt' || Auth::user()->email === 'Shaad.Sadoo@gov.tt' || Auth::user()->email === 'Amirah.Ali@gov.tt'){
|
||||
return $next($request);
|
||||
}
|
||||
// if (Auth::user()->email === 'AgardB@gov.tt' || Auth::user()->email === 'Shaad.Sadoo@gov.tt'){
|
||||
// return $next($request);
|
||||
// }
|
||||
else{
|
||||
return redirect()->route('401-Error');
|
||||
}
|
||||
}
|
||||
}
|
||||
18
app/Http/Middleware/TrimStrings.php
Executable file
18
app/Http/Middleware/TrimStrings.php
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
|
||||
|
||||
class TrimStrings extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the attributes that should not be trimmed.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
'password',
|
||||
'password_confirmation',
|
||||
];
|
||||
}
|
||||
20
app/Http/Middleware/TrustHosts.php
Executable file
20
app/Http/Middleware/TrustHosts.php
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Middleware\TrustHosts as Middleware;
|
||||
|
||||
class TrustHosts extends Middleware
|
||||
{
|
||||
/**
|
||||
* Get the host patterns that should be trusted.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function hosts()
|
||||
{
|
||||
return [
|
||||
$this->allSubdomainsOfApplicationUrl(),
|
||||
];
|
||||
}
|
||||
}
|
||||
23
app/Http/Middleware/TrustProxies.php
Executable file
23
app/Http/Middleware/TrustProxies.php
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Fideloper\Proxy\TrustProxies as Middleware;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
/**
|
||||
* The trusted proxies for this application.
|
||||
*
|
||||
* @var array|string|null
|
||||
*/
|
||||
protected $proxies;
|
||||
|
||||
/**
|
||||
* The headers that should be used to detect proxies.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $headers = Request::HEADER_X_FORWARDED_ALL;
|
||||
}
|
||||
17
app/Http/Middleware/VerifyCsrfToken.php
Executable file
17
app/Http/Middleware/VerifyCsrfToken.php
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
||||
|
||||
class VerifyCsrfToken extends Middleware
|
||||
{
|
||||
/**
|
||||
* The URIs that should be excluded from CSRF verification.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
||||
23
app/Ldap/User.php
Executable file
23
app/Ldap/User.php
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Ldap;
|
||||
|
||||
use LdapRecord\Models\Model;
|
||||
use LdapRecord\Models\Concerns\CanAuthenticate;
|
||||
use Illuminate\Contracts\Auth\Authenticatable;
|
||||
use LdapRecord\Models\ActiveDirectory\Entry;
|
||||
|
||||
class User extends Model implements Authenticatable
|
||||
{
|
||||
use CanAuthenticate;
|
||||
|
||||
public static $objectClasses = [
|
||||
'top',
|
||||
'person',
|
||||
'organizationalperson',
|
||||
'user',
|
||||
];
|
||||
|
||||
// protected $guidKey = 'uuid';
|
||||
|
||||
}
|
||||
36
app/Mail/NotifyAdmin.php
Normal file
36
app/Mail/NotifyAdmin.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
|
||||
class NotifyAdmin extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $mailData;
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($mailData)
|
||||
{
|
||||
$this->mailData = $mailData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->subject('New PBX Pin Assignment')
|
||||
->view('Mail.admin-mail');
|
||||
}
|
||||
}
|
||||
36
app/Mail/NotifyUser.php
Normal file
36
app/Mail/NotifyUser.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class NotifyUser extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $mailData;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($mailData)
|
||||
{
|
||||
$this->mailData = $mailData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->subject('New PBX Pin Assignment')
|
||||
->view('Mail.user-mail');
|
||||
}
|
||||
}
|
||||
14
app/Models/ExpiredPin.php
Executable file
14
app/Models/ExpiredPin.php
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ExpiredPin extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'expired_pins';
|
||||
protected $primaryKey = 'id';
|
||||
}
|
||||
14
app/Models/PBXPin.php
Normal file
14
app/Models/PBXPin.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PBXPin extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'pbx_pin';
|
||||
protected $primaryKey = 'id';
|
||||
}
|
||||
48
app/Models/User.php
Executable file
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;
|
||||
use LdapRecord\Laravel\Auth\LdapAuthenticatable;
|
||||
use LdapRecord\Laravel\Auth\AuthenticatesWithLdap;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use Notifiable, AuthenticatesWithLdap;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
// 'password',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for arrays.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
// 'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
|
||||
|
||||
}
|
||||
28
app/Providers/AppServiceProvider.php
Executable file
28
app/Providers/AppServiceProvider.php
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
30
app/Providers/AuthServiceProvider.php
Executable file
30
app/Providers/AuthServiceProvider.php
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The policy mappings for the application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $policies = [
|
||||
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any authentication / authorization services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerPolicies();
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
21
app/Providers/BroadcastServiceProvider.php
Executable file
21
app/Providers/BroadcastServiceProvider.php
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Broadcast::routes();
|
||||
|
||||
require base_path('routes/channels.php');
|
||||
}
|
||||
}
|
||||
32
app/Providers/EventServiceProvider.php
Executable file
32
app/Providers/EventServiceProvider.php
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
<?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 listener mappings for the application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $listen = [
|
||||
Registered::class => [
|
||||
SendEmailVerificationNotification::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any events for your application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
63
app/Providers/RouteServiceProvider.php
Executable file
63
app/Providers/RouteServiceProvider.php
Executable file
|
|
@ -0,0 +1,63 @@
|
|||
<?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 the "home" route for your application.
|
||||
*
|
||||
* This is used by Laravel authentication to redirect users after login.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public const HOME = '/home';
|
||||
|
||||
/**
|
||||
* The controller namespace for the application.
|
||||
*
|
||||
* When present, controller route declarations will automatically be prefixed with this namespace.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
// protected $namespace = 'App\\Http\\Controllers';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, etc.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->configureRateLimiting();
|
||||
|
||||
$this->routes(function () {
|
||||
Route::prefix('api')
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/api.php'));
|
||||
|
||||
Route::middleware('web')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/web.php'));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the rate limiters for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function configureRateLimiting()
|
||||
{
|
||||
RateLimiter::for('api', function (Request $request) {
|
||||
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
|
||||
});
|
||||
}
|
||||
}
|
||||
53
artisan
Executable file
53
artisan
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
define('LARAVEL_START', microtime(true));
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register The Auto Loader
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Composer provides a convenient, automatically generated class loader
|
||||
| for our application. We just need to utilize it! We'll require it
|
||||
| into the script here so that we do not have to worry about the
|
||||
| loading of any our classes "manually". Feels great to relax.
|
||||
|
|
||||
*/
|
||||
|
||||
require __DIR__.'/vendor/autoload.php';
|
||||
|
||||
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run The Artisan Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When we run the console application, the current CLI command will be
|
||||
| executed in this console and the response sent back to a terminal
|
||||
| or another output device for the developers. Here goes nothing!
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||
|
||||
$status = $kernel->handle(
|
||||
$input = new Symfony\Component\Console\Input\ArgvInput,
|
||||
new Symfony\Component\Console\Output\ConsoleOutput
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Shutdown The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Once Artisan has finished running, we will fire off the shutdown events
|
||||
| so that any final work may be done by the application before we shut
|
||||
| down the process. This is the last thing to happen to the request.
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel->terminate($input, $status);
|
||||
|
||||
exit($status);
|
||||
55
bootstrap/app.php
Executable file
55
bootstrap/app.php
Executable file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Create The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The first thing we will do is create a new Laravel application instance
|
||||
| which serves as the "glue" for all the components of Laravel, and is
|
||||
| the IoC container for the system binding all of the various parts.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = new Illuminate\Foundation\Application(
|
||||
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bind Important Interfaces
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next, we need to bind some important interfaces into the container so
|
||||
| we will be able to resolve them when needed. The kernels serve the
|
||||
| incoming requests to this application from both the web and CLI.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Http\Kernel::class,
|
||||
App\Http\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Console\Kernel::class,
|
||||
App\Console\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||
App\Exceptions\Handler::class
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Return The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This script returns the application instance. The instance is given to
|
||||
| the calling script so we can separate the building of the instances
|
||||
| from the actual running of the application and sending responses.
|
||||
|
|
||||
*/
|
||||
|
||||
return $app;
|
||||
2
bootstrap/cache/.gitignore
vendored
Executable file
2
bootstrap/cache/.gitignore
vendored
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
||||
66
composer.json
Executable file
66
composer.json
Executable file
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"name": "laravel/laravel",
|
||||
"type": "project",
|
||||
"description": "The Laravel Framework.",
|
||||
"keywords": [
|
||||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^7.3|^8.0",
|
||||
"barryvdh/laravel-dompdf": "^2.0",
|
||||
"directorytree/ldaprecord": "^2.20",
|
||||
"directorytree/ldaprecord-laravel": "^2.7",
|
||||
"fideloper/proxy": "^4.2",
|
||||
"fruitcake/laravel-cors": "^2.0",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
"laravel/framework": "^8.12",
|
||||
"laravel/tinker": "^2.0",
|
||||
"predis/predis": "^2.1",
|
||||
"twbs/bootstrap": "5.3.0-alpha3"
|
||||
},
|
||||
"require-dev": {
|
||||
"facade/ignition": "^2.3.6",
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
"mockery/mockery": "^1.3.1",
|
||||
"nunomaduro/collision": "^5.0",
|
||||
"phpunit/phpunit": "^9.3"
|
||||
},
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"dont-discover": []
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "app/",
|
||||
"Database\\Factories\\": "database/factories/",
|
||||
"Database\\Seeders\\": "database/seeders/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"scripts": {
|
||||
"post-autoload-dump": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
"@php artisan package:discover --ansi"
|
||||
],
|
||||
"post-root-package-install": [
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
],
|
||||
"post-create-project-cmd": [
|
||||
"@php artisan key:generate --ansi"
|
||||
]
|
||||
}
|
||||
}
|
||||
7982
composer.lock
generated
Executable file
7982
composer.lock
generated
Executable file
File diff suppressed because it is too large
Load diff
232
config/app.php
Executable file
232
config/app.php
Executable file
|
|
@ -0,0 +1,232 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value is the name of your application. This value is used when the
|
||||
| framework needs to place the application's name in a notification or
|
||||
| any other location as required by the application or its packages.
|
||||
|
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'Laravel'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Environment
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value determines the "environment" your application is currently
|
||||
| running in. This may determine how you prefer to configure various
|
||||
| services the application utilizes. Set this in your ".env" file.
|
||||
|
|
||||
*/
|
||||
|
||||
'env' => env('APP_ENV', 'production'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Debug Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When your application is in debug mode, detailed error messages with
|
||||
| stack traces will be shown on every error that occurs within your
|
||||
| application. If disabled, a simple generic error page is shown.
|
||||
|
|
||||
*/
|
||||
|
||||
'debug' => (bool) env('APP_DEBUG', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This URL is used by the console to properly generate URLs when using
|
||||
| the Artisan command line tool. You should set this to the root of
|
||||
| your application so that it is used when running Artisan tasks.
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
|
||||
'asset_url' => env('ASSET_URL', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Timezone
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default timezone for your application, which
|
||||
| will be used by the PHP date and date-time functions. We have gone
|
||||
| ahead and set this to a sensible default for you out of the box.
|
||||
|
|
||||
*/
|
||||
|
||||
'timezone' => 'America/Port_of_Spain',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Locale Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The application locale determines the default locale that will be used
|
||||
| by the translation service provider. You are free to set this value
|
||||
| to any of the locales which will be supported by the application.
|
||||
|
|
||||
*/
|
||||
|
||||
'locale' => 'en',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Fallback Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The fallback locale determines the locale to use when the current one
|
||||
| is not available. You may change the value to correspond to any of
|
||||
| the language folders that are provided through your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'fallback_locale' => 'en',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Faker Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This locale will be used by the Faker PHP library when generating fake
|
||||
| data for your database seeds. For example, this will be used to get
|
||||
| localized telephone numbers, street address information and more.
|
||||
|
|
||||
*/
|
||||
|
||||
'faker_locale' => 'en_US',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This key is used by the Illuminate encrypter service and should be set
|
||||
| to a random, 32 character string, otherwise these encrypted strings
|
||||
| will not be safe. Please do this before deploying an application!
|
||||
|
|
||||
*/
|
||||
|
||||
'key' => env('APP_KEY'),
|
||||
|
||||
'cipher' => 'AES-256-CBC',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Service Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The service providers listed here will be automatically loaded on the
|
||||
| request to your application. Feel free to add your own services to
|
||||
| this array to grant expanded functionality to your applications.
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
|
||||
/*
|
||||
* Laravel Framework Service Providers...
|
||||
*/
|
||||
Illuminate\Auth\AuthServiceProvider::class,
|
||||
Illuminate\Broadcasting\BroadcastServiceProvider::class,
|
||||
Illuminate\Bus\BusServiceProvider::class,
|
||||
Illuminate\Cache\CacheServiceProvider::class,
|
||||
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
|
||||
Illuminate\Cookie\CookieServiceProvider::class,
|
||||
Illuminate\Database\DatabaseServiceProvider::class,
|
||||
Illuminate\Encryption\EncryptionServiceProvider::class,
|
||||
Illuminate\Filesystem\FilesystemServiceProvider::class,
|
||||
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
||||
Illuminate\Hashing\HashServiceProvider::class,
|
||||
Illuminate\Mail\MailServiceProvider::class,
|
||||
Illuminate\Notifications\NotificationServiceProvider::class,
|
||||
Illuminate\Pagination\PaginationServiceProvider::class,
|
||||
Illuminate\Pipeline\PipelineServiceProvider::class,
|
||||
Illuminate\Queue\QueueServiceProvider::class,
|
||||
Illuminate\Redis\RedisServiceProvider::class,
|
||||
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
|
||||
Illuminate\Session\SessionServiceProvider::class,
|
||||
Illuminate\Translation\TranslationServiceProvider::class,
|
||||
Illuminate\Validation\ValidationServiceProvider::class,
|
||||
Illuminate\View\ViewServiceProvider::class,
|
||||
|
||||
/*
|
||||
* Package Service Providers...
|
||||
*/
|
||||
|
||||
/*
|
||||
* Application Service Providers...
|
||||
*/
|
||||
App\Providers\AppServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Aliases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This array of class aliases will be registered when this application
|
||||
| is started. However, feel free to register as many as you wish as
|
||||
| the aliases are "lazy" loaded so they don't hinder performance.
|
||||
|
|
||||
*/
|
||||
|
||||
'aliases' => [
|
||||
|
||||
'App' => Illuminate\Support\Facades\App::class,
|
||||
'Arr' => Illuminate\Support\Arr::class,
|
||||
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||
'Auth' => Illuminate\Support\Facades\Auth::class,
|
||||
'Blade' => Illuminate\Support\Facades\Blade::class,
|
||||
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
|
||||
'Bus' => Illuminate\Support\Facades\Bus::class,
|
||||
'Cache' => Illuminate\Support\Facades\Cache::class,
|
||||
'Config' => Illuminate\Support\Facades\Config::class,
|
||||
'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
||||
'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
||||
'DB' => Illuminate\Support\Facades\DB::class,
|
||||
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
||||
'Event' => Illuminate\Support\Facades\Event::class,
|
||||
'File' => Illuminate\Support\Facades\File::class,
|
||||
'Gate' => Illuminate\Support\Facades\Gate::class,
|
||||
'Hash' => Illuminate\Support\Facades\Hash::class,
|
||||
'Http' => Illuminate\Support\Facades\Http::class,
|
||||
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||
'Log' => Illuminate\Support\Facades\Log::class,
|
||||
'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||
'Notification' => Illuminate\Support\Facades\Notification::class,
|
||||
'Password' => Illuminate\Support\Facades\Password::class,
|
||||
'Queue' => Illuminate\Support\Facades\Queue::class,
|
||||
'Redirect' => Illuminate\Support\Facades\Redirect::class,
|
||||
'Redis' => Illuminate\Support\Facades\Redis::class,
|
||||
'Request' => Illuminate\Support\Facades\Request::class,
|
||||
'Response' => Illuminate\Support\Facades\Response::class,
|
||||
'Route' => Illuminate\Support\Facades\Route::class,
|
||||
'Schema' => Illuminate\Support\Facades\Schema::class,
|
||||
'Session' => Illuminate\Support\Facades\Session::class,
|
||||
'Storage' => Illuminate\Support\Facades\Storage::class,
|
||||
'Str' => Illuminate\Support\Str::class,
|
||||
'URL' => Illuminate\Support\Facades\URL::class,
|
||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
136
config/auth.php
Executable file
136
config/auth.php
Executable file
|
|
@ -0,0 +1,136 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Defaults
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default authentication "guard" and password
|
||||
| reset options for your application. You may change these defaults
|
||||
| as required, but they're a perfect start for most applications.
|
||||
|
|
||||
*/
|
||||
|
||||
'defaults' => [
|
||||
'guard' => 'web',
|
||||
'passwords' => 'users',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Guards
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next, you may define every authentication guard for your application.
|
||||
| Of course, a great default configuration has been defined for you
|
||||
| here which uses session storage and the Eloquent user provider.
|
||||
|
|
||||
| All authentication drivers have a user provider. This defines how the
|
||||
| users are actually retrieved out of your database or other storage
|
||||
| mechanisms used by this application to persist your user's data.
|
||||
|
|
||||
| Supported: "session", "token"
|
||||
|
|
||||
*/
|
||||
|
||||
'guards' => [
|
||||
'web' => [
|
||||
'driver' => 'session',
|
||||
'provider' => 'user',
|
||||
],
|
||||
|
||||
'api' => [
|
||||
'driver' => 'token',
|
||||
'provider' => 'user',
|
||||
'hash' => false,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| User Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| All authentication drivers have a user provider. This defines how the
|
||||
| users are actually retrieved out of your database or other storage
|
||||
| mechanisms used by this application to persist your user's data.
|
||||
|
|
||||
| If you have multiple user tables or models you may configure multiple
|
||||
| sources which represent each model / table. These sources may then
|
||||
| be assigned to any extra authentication guards you have defined.
|
||||
|
|
||||
| Supported: "database", "eloquent"
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
'providers' => [
|
||||
|
||||
'user' => [
|
||||
'driver' => 'ldap',
|
||||
'model' => App\Ldap\User::class,
|
||||
'rules' => [],
|
||||
'database' => [
|
||||
'model' => App\Models\User::class,
|
||||
'sync_passwords' => false,
|
||||
'sync_attributes' => [
|
||||
'name' => 'cn',
|
||||
'department' => 'department',
|
||||
'position' => 'title',
|
||||
'location' => 'physicalDeliveryOfficeName',
|
||||
'email' => 'mail',
|
||||
'ext' => 'telephoneNumber',
|
||||
'description' => 'description',
|
||||
'active' => 'userAccountControl'
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
Barryvdh\DomPDF\ServiceProvider::class,
|
||||
],
|
||||
|
||||
|
||||
'aliases' => [
|
||||
'PDF' => Barryvdh\DomPDF\Facade::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Resetting Passwords
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify multiple password reset configurations if you have more
|
||||
| than one user table or model in the application and you want to have
|
||||
| separate password reset settings based on the specific user types.
|
||||
|
|
||||
| The expire time is the number of minutes that the reset token should be
|
||||
| considered valid. This security feature keeps tokens short-lived so
|
||||
| they have less time to be guessed. You may change this as needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'passwords' => [
|
||||
'users' => [
|
||||
'provider' => 'users',
|
||||
'table' => 'password_resets',
|
||||
'expire' => 60,
|
||||
'throttle' => 60,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Confirmation Timeout
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define the amount of seconds before a password confirmation
|
||||
| times out and the user is prompted to re-enter their password via the
|
||||
| confirmation screen. By default, the timeout lasts for three hours.
|
||||
|
|
||||
*/
|
||||
|
||||
'password_timeout' => 10800,
|
||||
|
||||
];
|
||||
59
config/broadcasting.php
Executable file
59
config/broadcasting.php
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Broadcaster
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default broadcaster that will be used by the
|
||||
| framework when an event needs to be broadcast. You may set this to
|
||||
| any of the connections defined in the "connections" array below.
|
||||
|
|
||||
| Supported: "pusher", "redis", "log", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('BROADCAST_DRIVER', 'null'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Broadcast Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the broadcast connections that will be used
|
||||
| to broadcast events to other systems or over websockets. Samples of
|
||||
| each available type of connection are provided inside this array.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
||||
'pusher' => [
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_APP_KEY'),
|
||||
'secret' => env('PUSHER_APP_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'options' => [
|
||||
'cluster' => env('PUSHER_APP_CLUSTER'),
|
||||
'useTLS' => true,
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
|
||||
'log' => [
|
||||
'driver' => 'log',
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'null',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
104
config/cache.php
Executable file
104
config/cache.php
Executable file
|
|
@ -0,0 +1,104 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default cache connection that gets used while
|
||||
| using this caching library. This connection is used when another is
|
||||
| not explicitly specified when executing a given caching function.
|
||||
|
|
||||
| Supported: "apc", "array", "database", "file",
|
||||
| "memcached", "redis", "dynamodb"
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('CACHE_DRIVER', 'file'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Stores
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the cache "stores" for your application as
|
||||
| well as their drivers. You may even define multiple stores for the
|
||||
| same cache driver to group types of items stored in your caches.
|
||||
|
|
||||
*/
|
||||
|
||||
'stores' => [
|
||||
|
||||
'apc' => [
|
||||
'driver' => 'apc',
|
||||
],
|
||||
|
||||
'array' => [
|
||||
'driver' => 'array',
|
||||
'serialize' => false,
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'cache',
|
||||
'connection' => null,
|
||||
],
|
||||
|
||||
'file' => [
|
||||
'driver' => 'file',
|
||||
'path' => storage_path('framework/cache/data'),
|
||||
],
|
||||
|
||||
'memcached' => [
|
||||
'driver' => 'memcached',
|
||||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||
'sasl' => [
|
||||
env('MEMCACHED_USERNAME'),
|
||||
env('MEMCACHED_PASSWORD'),
|
||||
],
|
||||
'options' => [
|
||||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||
],
|
||||
'servers' => [
|
||||
[
|
||||
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||
'port' => env('MEMCACHED_PORT', 11211),
|
||||
'weight' => 100,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'cache',
|
||||
],
|
||||
|
||||
'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'),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Key Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When utilizing a RAM based store such as APC or Memcached, there might
|
||||
| be other applications utilizing the same cache. So, we'll specify a
|
||||
| value to get prefixed to all our keys so we can avoid collisions.
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
|
||||
|
||||
];
|
||||
34
config/cors.php
Executable file
34
config/cors.php
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cross-Origin Resource Sharing (CORS) Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure your settings for cross-origin resource sharing
|
||||
| or "CORS". This determines what cross-origin operations may execute
|
||||
| in web browsers. You are free to adjust these settings as needed.
|
||||
|
|
||||
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => ['api/*'],
|
||||
|
||||
'allowed_methods' => ['*'],
|
||||
|
||||
'allowed_origins' => ['*'],
|
||||
|
||||
'allowed_origins_patterns' => [],
|
||||
|
||||
'allowed_headers' => ['*'],
|
||||
|
||||
'exposed_headers' => [],
|
||||
|
||||
'max_age' => 0,
|
||||
|
||||
'supports_credentials' => false,
|
||||
|
||||
];
|
||||
147
config/database.php
Executable file
147
config/database.php
Executable file
|
|
@ -0,0 +1,147 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Database Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which of the database connections below you wish
|
||||
| to use as your default connection for all database work. Of course
|
||||
| you may use many connections at once using the Database library.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('DB_CONNECTION', 'mysql'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here are each of the database connections setup for your application.
|
||||
| Of course, examples of configuring each database platform that is
|
||||
| supported by Laravel is shown below to make development simple.
|
||||
|
|
||||
|
|
||||
| All database work in Laravel is done through the PHP PDO facilities
|
||||
| so make sure you have the driver for your particular database of
|
||||
| choice installed on your machine before you begin development.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
||||
'sqlite' => [
|
||||
'driver' => 'sqlite',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||
'prefix' => '',
|
||||
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||
],
|
||||
|
||||
'mysql' => [
|
||||
'driver' => 'mysql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
|
||||
'pgsql' => [
|
||||
'driver' => 'pgsql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '5432'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'schema' => 'public',
|
||||
'sslmode' => 'prefer',
|
||||
],
|
||||
|
||||
'sqlsrv' => [
|
||||
'driver' => 'sqlsrv',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '1433'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Repository Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This table keeps track of all the migrations that have already run for
|
||||
| your application. Using this information, we can determine which of
|
||||
| the migrations on disk haven't actually been run in the database.
|
||||
|
|
||||
*/
|
||||
|
||||
'migrations' => 'migrations',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis Databases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Redis is an open source, fast, and advanced key-value store that also
|
||||
| provides a richer body of commands than a typical key-value system
|
||||
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||
|
|
||||
*/
|
||||
|
||||
'redis' => [
|
||||
|
||||
'client' => env('REDIS_CLIENT', 'phpredis'),
|
||||
|
||||
'options' => [
|
||||
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
|
||||
],
|
||||
|
||||
'default' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_DB', '0'),
|
||||
],
|
||||
|
||||
'cache' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_CACHE_DB', '1'),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
284
config/dompdf.php
Executable file
284
config/dompdf.php
Executable file
|
|
@ -0,0 +1,284 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set some default values. It is possible to add all defines that can be set
|
||||
| in dompdf_config.inc.php. You can also override the entire config file.
|
||||
|
|
||||
*/
|
||||
'show_warnings' => false, // Throw an Exception on warnings from dompdf
|
||||
|
||||
'public_path' => null, // Override the public path if needed
|
||||
|
||||
/*
|
||||
* Dejavu Sans font is missing glyphs for converted entities, turn it off if you need to show € and £.
|
||||
*/
|
||||
'convert_entities' => true,
|
||||
|
||||
'options' => array(
|
||||
/**
|
||||
* The location of the DOMPDF font directory
|
||||
*
|
||||
* The location of the directory where DOMPDF will store fonts and font metrics
|
||||
* Note: This directory must exist and be writable by the webserver process.
|
||||
* *Please note the trailing slash.*
|
||||
*
|
||||
* Notes regarding fonts:
|
||||
* Additional .afm font metrics can be added by executing load_font.php from command line.
|
||||
*
|
||||
* Only the original "Base 14 fonts" are present on all pdf viewers. Additional fonts must
|
||||
* be embedded in the pdf file or the PDF may not display correctly. This can significantly
|
||||
* increase file size unless font subsetting is enabled. Before embedding a font please
|
||||
* review your rights under the font license.
|
||||
*
|
||||
* Any font specification in the source HTML is translated to the closest font available
|
||||
* in the font directory.
|
||||
*
|
||||
* The pdf standard "Base 14 fonts" are:
|
||||
* Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique,
|
||||
* Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique,
|
||||
* Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic,
|
||||
* Symbol, ZapfDingbats.
|
||||
*/
|
||||
"font_dir" => storage_path('fonts'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782)
|
||||
|
||||
/**
|
||||
* The location of the DOMPDF font cache directory
|
||||
*
|
||||
* This directory contains the cached font metrics for the fonts used by DOMPDF.
|
||||
* This directory can be the same as DOMPDF_FONT_DIR
|
||||
*
|
||||
* Note: This directory must exist and be writable by the webserver process.
|
||||
*/
|
||||
"font_cache" => storage_path('fonts'),
|
||||
|
||||
/**
|
||||
* The location of a temporary directory.
|
||||
*
|
||||
* The directory specified must be writeable by the webserver process.
|
||||
* The temporary directory is required to download remote images and when
|
||||
* using the PFDLib back end.
|
||||
*/
|
||||
"temp_dir" => sys_get_temp_dir(),
|
||||
|
||||
/**
|
||||
* ==== IMPORTANT ====
|
||||
*
|
||||
* dompdf's "chroot": Prevents dompdf from accessing system files or other
|
||||
* files on the webserver. All local files opened by dompdf must be in a
|
||||
* subdirectory of this directory. DO NOT set it to '/' since this could
|
||||
* allow an attacker to use dompdf to read any files on the server. This
|
||||
* should be an absolute path.
|
||||
* This is only checked on command line call by dompdf.php, but not by
|
||||
* direct class use like:
|
||||
* $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output();
|
||||
*/
|
||||
"chroot" => realpath(base_path()),
|
||||
|
||||
/**
|
||||
* Protocol whitelist
|
||||
*
|
||||
* Protocols and PHP wrappers allowed in URIs, and the validation rules
|
||||
* that determine if a resouce may be loaded. Full support is not guaranteed
|
||||
* for the protocols/wrappers specified
|
||||
* by this array.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
'allowed_protocols' => [
|
||||
"file://" => ["rules" => []],
|
||||
"http://" => ["rules" => []],
|
||||
"https://" => ["rules" => []]
|
||||
],
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
'log_output_file' => null,
|
||||
|
||||
/**
|
||||
* Whether to enable font subsetting or not.
|
||||
*/
|
||||
"enable_font_subsetting" => false,
|
||||
|
||||
/**
|
||||
* The PDF rendering backend to use
|
||||
*
|
||||
* Valid settings are 'PDFLib', 'CPDF' (the bundled R&OS PDF class), 'GD' and
|
||||
* 'auto'. 'auto' will look for PDFLib and use it if found, or if not it will
|
||||
* fall back on CPDF. 'GD' renders PDFs to graphic files. {@link
|
||||
* Canvas_Factory} ultimately determines which rendering class to instantiate
|
||||
* based on this setting.
|
||||
*
|
||||
* Both PDFLib & CPDF rendering backends provide sufficient rendering
|
||||
* capabilities for dompdf, however additional features (e.g. object,
|
||||
* image and font support, etc.) differ between backends. Please see
|
||||
* {@link PDFLib_Adapter} for more information on the PDFLib backend
|
||||
* and {@link CPDF_Adapter} and lib/class.pdf.php for more information
|
||||
* on CPDF. Also see the documentation for each backend at the links
|
||||
* below.
|
||||
*
|
||||
* The GD rendering backend is a little different than PDFLib and
|
||||
* CPDF. Several features of CPDF and PDFLib are not supported or do
|
||||
* not make any sense when creating image files. For example,
|
||||
* multiple pages are not supported, nor are PDF 'objects'. Have a
|
||||
* look at {@link GD_Adapter} for more information. GD support is
|
||||
* experimental, so use it at your own risk.
|
||||
*
|
||||
* @link http://www.pdflib.com
|
||||
* @link http://www.ros.co.nz/pdf
|
||||
* @link http://www.php.net/image
|
||||
*/
|
||||
"pdf_backend" => "CPDF",
|
||||
|
||||
/**
|
||||
* PDFlib license key
|
||||
*
|
||||
* If you are using a licensed, commercial version of PDFlib, specify
|
||||
* your license key here. If you are using PDFlib-Lite or are evaluating
|
||||
* the commercial version of PDFlib, comment out this setting.
|
||||
*
|
||||
* @link http://www.pdflib.com
|
||||
*
|
||||
* If pdflib present in web server and auto or selected explicitely above,
|
||||
* a real license code must exist!
|
||||
*/
|
||||
//"DOMPDF_PDFLIB_LICENSE" => "your license key here",
|
||||
|
||||
/**
|
||||
* html target media view which should be rendered into pdf.
|
||||
* List of types and parsing rules for future extensions:
|
||||
* http://www.w3.org/TR/REC-html40/types.html
|
||||
* screen, tty, tv, projection, handheld, print, braille, aural, all
|
||||
* Note: aural is deprecated in CSS 2.1 because it is replaced by speech in CSS 3.
|
||||
* Note, even though the generated pdf file is intended for print output,
|
||||
* the desired content might be different (e.g. screen or projection view of html file).
|
||||
* Therefore allow specification of content here.
|
||||
*/
|
||||
"default_media_type" => "screen",
|
||||
|
||||
/**
|
||||
* The default paper size.
|
||||
*
|
||||
* North America standard is "letter"; other countries generally "a4"
|
||||
*
|
||||
* @see CPDF_Adapter::PAPER_SIZES for valid sizes ('letter', 'legal', 'A4', etc.)
|
||||
*/
|
||||
"default_paper_size" => "a4",
|
||||
|
||||
/**
|
||||
* The default paper orientation.
|
||||
*
|
||||
* The orientation of the page (portrait or landscape).
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
'default_paper_orientation' => "portrait",
|
||||
|
||||
/**
|
||||
* The default font family
|
||||
*
|
||||
* Used if no suitable fonts can be found. This must exist in the font folder.
|
||||
* @var string
|
||||
*/
|
||||
"default_font" => "serif",
|
||||
|
||||
/**
|
||||
* Image DPI setting
|
||||
*
|
||||
* This setting determines the default DPI setting for images and fonts. The
|
||||
* DPI may be overridden for inline images by explictly setting the
|
||||
* image's width & height style attributes (i.e. if the image's native
|
||||
* width is 600 pixels and you specify the image's width as 72 points,
|
||||
* the image will have a DPI of 600 in the rendered PDF. The DPI of
|
||||
* background images can not be overridden and is controlled entirely
|
||||
* via this parameter.
|
||||
*
|
||||
* For the purposes of DOMPDF, pixels per inch (PPI) = dots per inch (DPI).
|
||||
* If a size in html is given as px (or without unit as image size),
|
||||
* this tells the corresponding size in pt.
|
||||
* This adjusts the relative sizes to be similar to the rendering of the
|
||||
* html page in a reference browser.
|
||||
*
|
||||
* In pdf, always 1 pt = 1/72 inch
|
||||
*
|
||||
* Rendering resolution of various browsers in px per inch:
|
||||
* Windows Firefox and Internet Explorer:
|
||||
* SystemControl->Display properties->FontResolution: Default:96, largefonts:120, custom:?
|
||||
* Linux Firefox:
|
||||
* about:config *resolution: Default:96
|
||||
* (xorg screen dimension in mm and Desktop font dpi settings are ignored)
|
||||
*
|
||||
* Take care about extra font/image zoom factor of browser.
|
||||
*
|
||||
* In images, <img> size in pixel attribute, img css style, are overriding
|
||||
* the real image dimension in px for rendering.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
"dpi" => 96,
|
||||
|
||||
/**
|
||||
* Enable inline PHP
|
||||
*
|
||||
* If this setting is set to true then DOMPDF will automatically evaluate
|
||||
* inline PHP contained within <script type="text/php"> ... </script> tags.
|
||||
*
|
||||
* Enabling this for documents you do not trust (e.g. arbitrary remote html
|
||||
* pages) is a security risk. Set this option to false if you wish to process
|
||||
* untrusted documents.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
"enable_php" => false,
|
||||
|
||||
/**
|
||||
* Enable inline Javascript
|
||||
*
|
||||
* If this setting is set to true then DOMPDF will automatically insert
|
||||
* JavaScript code contained within <script type="text/javascript"> ... </script> tags.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
"enable_javascript" => true,
|
||||
|
||||
/**
|
||||
* Enable remote file access
|
||||
*
|
||||
* If this setting is set to true, DOMPDF will access remote sites for
|
||||
* images and CSS files as required.
|
||||
* This is required for part of test case www/test/image_variants.html through www/examples.php
|
||||
*
|
||||
* Attention!
|
||||
* This can be a security risk, in particular in combination with DOMPDF_ENABLE_PHP and
|
||||
* allowing remote access to dompdf.php or on allowing remote html code to be passed to
|
||||
* $dompdf = new DOMPDF(, $dompdf->load_html(...,
|
||||
* This allows anonymous users to download legally doubtful internet content which on
|
||||
* tracing back appears to being downloaded by your server, or allows malicious php code
|
||||
* in remote html pages to be executed by your server with your account privileges.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
"enable_remote" => true,
|
||||
|
||||
/**
|
||||
* A ratio applied to the fonts height to be more like browsers' line height
|
||||
*/
|
||||
"font_height_ratio" => 1.1,
|
||||
|
||||
/**
|
||||
* Use the HTML5 Lib parser
|
||||
*
|
||||
* @deprecated This feature is now always on in dompdf 2.x
|
||||
* @var bool
|
||||
*/
|
||||
"enable_html5_parser" => true,
|
||||
),
|
||||
|
||||
|
||||
);
|
||||
85
config/filesystems.php
Executable file
85
config/filesystems.php
Executable file
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default filesystem disk that should be used
|
||||
| by the framework. The "local" disk, as well as a variety of cloud
|
||||
| based disks are available to your application. Just store away!
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('FILESYSTEM_DRIVER', 'local'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cloud Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Many applications store files both locally and in the cloud. For this
|
||||
| reason, you may specify a default "cloud" driver here. This driver
|
||||
| will be bound as the Cloud disk implementation in the container.
|
||||
|
|
||||
*/
|
||||
|
||||
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filesystem Disks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure as many filesystem "disks" as you wish, and you
|
||||
| may even configure multiple disks of the same driver. Defaults have
|
||||
| been setup for each driver as an example of the required options.
|
||||
|
|
||||
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
||||
|
|
||||
*/
|
||||
|
||||
'disks' => [
|
||||
|
||||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app'),
|
||||
],
|
||||
|
||||
'public' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public'),
|
||||
'url' => env('APP_URL').'/storage',
|
||||
'visibility' => 'public',
|
||||
],
|
||||
|
||||
'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'),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Symbolic Links
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the symbolic links that will be created when the
|
||||
| `storage:link` Artisan command is executed. The array keys should be
|
||||
| the locations of the links and the values should be their targets.
|
||||
|
|
||||
*/
|
||||
|
||||
'links' => [
|
||||
public_path('storage') => storage_path('app/public'),
|
||||
],
|
||||
|
||||
];
|
||||
52
config/hashing.php
Executable file
52
config/hashing.php
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Hash Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default hash driver that will be used to hash
|
||||
| passwords for your application. By default, the bcrypt algorithm is
|
||||
| used; however, you remain free to modify this option if you wish.
|
||||
|
|
||||
| Supported: "bcrypt", "argon", "argon2id"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'bcrypt',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bcrypt Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Bcrypt algorithm. This will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
*/
|
||||
|
||||
'bcrypt' => [
|
||||
'rounds' => env('BCRYPT_ROUNDS', 10),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Argon Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Argon algorithm. These will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
*/
|
||||
|
||||
'argon' => [
|
||||
'memory' => 1024,
|
||||
'threads' => 2,
|
||||
'time' => 2,
|
||||
],
|
||||
|
||||
];
|
||||
110
config/logging.php
Executable file
110
config/logging.php
Executable file
|
|
@ -0,0 +1,110 @@
|
|||
<?php
|
||||
|
||||
use Monolog\Handler\NullHandler;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Handler\SyslogUdpHandler;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option defines the default log channel that gets used when writing
|
||||
| messages to the logs. The name specified in this option should match
|
||||
| one of the channels defined in the "channels" configuration array.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the log channels for your application. Out of
|
||||
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||
| you a variety of powerful log handlers / formatters to utilize.
|
||||
|
|
||||
| Available Drivers: "single", "daily", "slack", "syslog",
|
||||
| "errorlog", "monolog",
|
||||
| "custom", "stack"
|
||||
|
|
||||
*/
|
||||
|
||||
'channels' => [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
|
||||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'days' => 14,
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'level' => env('LOG_LEVEL', 'critical'),
|
||||
],
|
||||
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => SyslogUdpHandler::class,
|
||||
'handler_with' => [
|
||||
'host' => env('PAPERTRAIL_URL'),
|
||||
'port' => env('PAPERTRAIL_PORT'),
|
||||
],
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
],
|
||||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => NullHandler::class,
|
||||
],
|
||||
|
||||
'emergency' => [
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
],
|
||||
|
||||
'error' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/error.log'),
|
||||
'level' => 'debug'
|
||||
]
|
||||
],
|
||||
|
||||
];
|
||||
110
config/mail.php
Executable file
110
config/mail.php
Executable file
|
|
@ -0,0 +1,110 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Mailer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default mailer that is used to send any email
|
||||
| messages sent by your application. Alternative mailers may be setup
|
||||
| and used as needed; however, this mailer will be used by default.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('MAIL_MAILER', 'smtp'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mailer Configurations
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure all of the mailers used by your application plus
|
||||
| their respective settings. Several examples have been configured for
|
||||
| you and you are free to add your own as your application requires.
|
||||
|
|
||||
| Laravel supports a variety of mail "transport" drivers to be used while
|
||||
| sending an e-mail. You will specify which one you are using for your
|
||||
| mailers below. You are free to add additional mailers as required.
|
||||
|
|
||||
| Supported: "smtp", "sendmail", "mailgun", "ses",
|
||||
| "postmark", "log", "array"
|
||||
|
|
||||
*/
|
||||
|
||||
'mailers' => [
|
||||
'smtp' => [
|
||||
'transport' => 'smtp',
|
||||
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
||||
'port' => env('MAIL_PORT', 587),
|
||||
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||
'username' => env('MAIL_USERNAME'),
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
'timeout' => null,
|
||||
'auth_mode' => null,
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
'transport' => 'ses',
|
||||
],
|
||||
|
||||
'mailgun' => [
|
||||
'transport' => 'mailgun',
|
||||
],
|
||||
|
||||
'postmark' => [
|
||||
'transport' => 'postmark',
|
||||
],
|
||||
|
||||
'sendmail' => [
|
||||
'transport' => 'sendmail',
|
||||
'path' => '/usr/sbin/sendmail -bs',
|
||||
],
|
||||
|
||||
'log' => [
|
||||
'transport' => 'log',
|
||||
'channel' => env('MAIL_LOG_CHANNEL'),
|
||||
],
|
||||
|
||||
'array' => [
|
||||
'transport' => 'array',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "From" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may wish for all e-mails sent by your application to be sent from
|
||||
| the same address. Here, you may specify a name and address that is
|
||||
| used globally for all e-mails that are sent by your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'from' => [
|
||||
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Markdown Mail Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you are using Markdown based email rendering, you may configure your
|
||||
| theme and component paths here, allowing you to customize the design
|
||||
| of the emails. Or, you may simply stick with the Laravel defaults!
|
||||
|
|
||||
*/
|
||||
|
||||
'markdown' => [
|
||||
'theme' => 'default',
|
||||
|
||||
'paths' => [
|
||||
resource_path('views/vendor/mail'),
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
89
config/queue.php
Executable file
89
config/queue.php
Executable file
|
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Queue Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel's queue API supports an assortment of back-ends via a single
|
||||
| API, giving you convenient access to each back-end using the same
|
||||
| syntax for every one. Here you may define a default connection.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('QUEUE_CONNECTION', 'sync'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queue Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the connection information for each server that
|
||||
| is used by your application. A default configuration has been added
|
||||
| for each back-end shipped with Laravel. You are free to add more.
|
||||
|
|
||||
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
||||
'sync' => [
|
||||
'driver' => 'sync',
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'jobs',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
],
|
||||
|
||||
'beanstalkd' => [
|
||||
'driver' => 'beanstalkd',
|
||||
'host' => 'localhost',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
'block_for' => 0,
|
||||
],
|
||||
|
||||
'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', 'your-queue-name'),
|
||||
'suffix' => env('SQS_SUFFIX'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
'queue' => env('REDIS_QUEUE', 'default'),
|
||||
'retry_after' => 90,
|
||||
'block_for' => null,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Failed Queue Jobs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options configure the behavior of failed queue job logging so you
|
||||
| can control which database and table are used to store the jobs that
|
||||
| have failed. You may change them to any database / table you wish.
|
||||
|
|
||||
*/
|
||||
|
||||
'failed' => [
|
||||
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
|
||||
'database' => env('DB_CONNECTION', 'mysql'),
|
||||
'table' => 'failed_jobs',
|
||||
],
|
||||
|
||||
];
|
||||
33
config/services.php
Executable file
33
config/services.php
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Third Party Services
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is for storing the credentials for third party services such
|
||||
| as Mailgun, Postmark, AWS and more. This file provides the de facto
|
||||
| location for this type of information, allowing packages to have
|
||||
| a conventional file to locate the various service credentials.
|
||||
|
|
||||
*/
|
||||
|
||||
'mailgun' => [
|
||||
'domain' => env('MAILGUN_DOMAIN'),
|
||||
'secret' => env('MAILGUN_SECRET'),
|
||||
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
|
||||
],
|
||||
|
||||
'postmark' => [
|
||||
'token' => env('POSTMARK_TOKEN'),
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
],
|
||||
|
||||
];
|
||||
201
config/session.php
Executable file
201
config/session.php
Executable file
|
|
@ -0,0 +1,201 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Session Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default session "driver" that will be used on
|
||||
| requests. By default, we will use the lightweight native driver but
|
||||
| you may specify any of the other wonderful drivers provided here.
|
||||
|
|
||||
| Supported: "file", "cookie", "database", "apc",
|
||||
| "memcached", "redis", "dynamodb", "array"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => env('SESSION_DRIVER', 'file'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Lifetime
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the number of minutes that you wish the session
|
||||
| to be allowed to remain idle before it expires. If you want them
|
||||
| to immediately expire on the browser closing, set that option.
|
||||
|
|
||||
*/
|
||||
|
||||
'lifetime' => env('SESSION_LIFETIME', 120),
|
||||
|
||||
'expire_on_close' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Encryption
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to easily specify that all of your session data
|
||||
| should be encrypted before it is stored. All encryption will be run
|
||||
| automatically by Laravel and you can use the Session like normal.
|
||||
|
|
||||
*/
|
||||
|
||||
'encrypt' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session File Location
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the native session driver, we need a location where session
|
||||
| files may be stored. A default has been set for you but a different
|
||||
| location may be specified. This is only needed for file sessions.
|
||||
|
|
||||
*/
|
||||
|
||||
'files' => storage_path('framework/sessions'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Connection
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" or "redis" session drivers, you may specify a
|
||||
| connection that should be used to manage these sessions. This should
|
||||
| correspond to a connection in your database configuration options.
|
||||
|
|
||||
*/
|
||||
|
||||
'connection' => env('SESSION_CONNECTION', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" session driver, you may specify the table we
|
||||
| should use to manage the sessions. Of course, a sensible default is
|
||||
| provided for you; however, you are free to change this as needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'table' => 'sessions',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| While using one of the framework's cache driven session backends you may
|
||||
| list a cache store that should be used for these sessions. This value
|
||||
| must match with one of the application's configured cache "stores".
|
||||
|
|
||||
| Affects: "apc", "dynamodb", "memcached", "redis"
|
||||
|
|
||||
*/
|
||||
|
||||
'store' => env('SESSION_STORE', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Sweeping Lottery
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Some session drivers must manually sweep their storage location to get
|
||||
| rid of old sessions from storage. Here are the chances that it will
|
||||
| happen on a given request. By default, the odds are 2 out of 100.
|
||||
|
|
||||
*/
|
||||
|
||||
'lottery' => [2, 100],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the name of the cookie used to identify a session
|
||||
| instance by ID. The name specified here will get used every time a
|
||||
| new session cookie is created by the framework for every driver.
|
||||
|
|
||||
*/
|
||||
|
||||
'cookie' => env(
|
||||
'SESSION_COOKIE',
|
||||
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The session cookie path determines the path for which the cookie will
|
||||
| be regarded as available. Typically, this will be the root path of
|
||||
| your application but you are free to change this when necessary.
|
||||
|
|
||||
*/
|
||||
|
||||
'path' => '/',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Domain
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the domain of the cookie used to identify a session
|
||||
| in your application. This will determine which domains the cookie is
|
||||
| available to in your application. A sensible default has been set.
|
||||
|
|
||||
*/
|
||||
|
||||
'domain' => env('SESSION_DOMAIN', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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 if it can not be done securely.
|
||||
|
|
||||
*/
|
||||
|
||||
'secure' => env('SESSION_SECURE_COOKIE'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTP Access Only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Setting this value to true will prevent JavaScript from accessing the
|
||||
| value of the cookie and the cookie will only be accessible through
|
||||
| the HTTP protocol. You are free to modify this option if needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'http_only' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Same-Site Cookies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines how your cookies behave when cross-site requests
|
||||
| take place, and can be used to mitigate CSRF attacks. By default, we
|
||||
| will set this value to "lax" since this is a secure default value.
|
||||
|
|
||||
| Supported: "lax", "strict", "none", null
|
||||
|
|
||||
*/
|
||||
|
||||
'same_site' => 'lax',
|
||||
|
||||
];
|
||||
36
config/view.php
Executable file
36
config/view.php
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| View Storage Paths
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Most templating systems load templates from disk. Here you may specify
|
||||
| an array of paths that should be checked for your views. Of course
|
||||
| the usual Laravel view path has already been registered for you.
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => [
|
||||
resource_path('views'),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Compiled View Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines where all the compiled Blade templates will be
|
||||
| stored for your application. Typically, this is within the storage
|
||||
| directory. However, as usual, you are free to change this value.
|
||||
|
|
||||
*/
|
||||
|
||||
'compiled' => env(
|
||||
'VIEW_COMPILED_PATH',
|
||||
realpath(storage_path('framework/views'))
|
||||
),
|
||||
|
||||
];
|
||||
2
database/.gitignore
vendored
Executable file
2
database/.gitignore
vendored
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
*.sqlite
|
||||
*.sqlite-journal
|
||||
33
database/factories/UserFactory.php
Executable file
33
database/factories/UserFactory.php
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = User::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'email' => $this->faker->unique()->safeEmail,
|
||||
'email_verified_at' => now(),
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
}
|
||||
42
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
42
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->string('department')->nullable();
|
||||
$table->string('position')->nullable();
|
||||
$table->integer('ext')->nullable();
|
||||
$table->string('location')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->string('active')->nullable();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
||||
32
database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
32
database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('password_resets');
|
||||
}
|
||||
}
|
||||
36
database/migrations/2019_08_19_000000_create_failed_jobs_table.php
Executable file
36
database/migrations/2019_08_19_000000_create_failed_jobs_table.php
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFailedJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
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.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
}
|
||||
35
database/migrations/2023_05_01_190256_create_sessions_table.php
Executable file
35
database/migrations/2023_05_01_190256_create_sessions_table.php
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSessionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
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->text('payload');
|
||||
$table->integer('last_activity')->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('sessions');
|
||||
}
|
||||
}
|
||||
34
database/migrations/2023_05_04_164158_create_p_b_x_pins_table.php
Executable file
34
database/migrations/2023_05_04_164158_create_p_b_x_pins_table.php
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePBXPinsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pbx_pins', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer("pin");
|
||||
$table->string("owner");
|
||||
$table->string("updated_by");
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pbx_pins');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDirectoryTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('directory', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->references('email')->on('users');
|
||||
$table->string('extension');
|
||||
$table->integer('pbxpin');
|
||||
$table->string('updated_by');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('directory');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddLdapColumnsToUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$driver = Schema::getConnection()->getDriverName();
|
||||
|
||||
Schema::table('users', function (Blueprint $table) use ($driver) {
|
||||
$table->string('guid')->nullable();
|
||||
$table->string('domain')->nullable();
|
||||
|
||||
if ($driver !== 'sqlsrv') {
|
||||
$table->unique('guid');
|
||||
}
|
||||
});
|
||||
|
||||
if ($driver === 'sqlsrv') {
|
||||
DB::statement(
|
||||
$this->compileUniqueSqlServerIndexStatement('users', 'guid')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn(['guid', 'domain']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile a compatible "unique" SQL Server index constraint.
|
||||
*
|
||||
* @param string $table
|
||||
* @param string $column
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function compileUniqueSqlServerIndexStatement($table, $column)
|
||||
{
|
||||
return sprintf('create unique index %s on %s (%s) where %s is not null',
|
||||
implode('_', [$table, $column, 'unique']),
|
||||
$table,
|
||||
$column,
|
||||
$column
|
||||
);
|
||||
}
|
||||
}
|
||||
18
database/seeders/DatabaseSeeder.php
Executable file
18
database/seeders/DatabaseSeeder.php
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// \App\Models\User::factory(10)->create();
|
||||
}
|
||||
}
|
||||
21
index.php
Executable file
21
index.php
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Laravel - A PHP Framework For Web Artisans
|
||||
*
|
||||
* @package Laravel
|
||||
* @author Taylor Otwell <taylor@laravel.com>
|
||||
*/
|
||||
|
||||
$uri = urldecode(
|
||||
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
|
||||
);
|
||||
|
||||
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
|
||||
// built-in PHP web server. This provides a convenient way to test a Laravel
|
||||
// application without having installed a "real" web server software here.
|
||||
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
require_once __DIR__.'/public/index.php';
|
||||
17515
package-lock.json
generated
Executable file
17515
package-lock.json
generated
Executable file
File diff suppressed because it is too large
Load diff
31
package.json
Executable file
31
package.json
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "npm run development",
|
||||
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||
"watch": "npm run development -- --watch",
|
||||
"watch-poll": "npm run watch -- --watch-poll",
|
||||
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||
"prod": "npm run production",
|
||||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios": "^1.2.2",
|
||||
"cross-env": "^7.0",
|
||||
"laravel-mix": "^6.0.49",
|
||||
"lodash": "^4.17.19",
|
||||
"prettier": "2.8.4",
|
||||
"resolve-url-loader": "^3.1.0",
|
||||
"vue-template-compiler": "^2.7.14"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.10.5",
|
||||
"@emotion/styled": "^11.10.5",
|
||||
"@mui/material": "^5.11.4",
|
||||
"bootstrap": "^5.3.0-alpha1",
|
||||
"bootstrap-icons": "^1.10.3",
|
||||
"materialize-css": "^1.0.0-rc.2",
|
||||
"mdbootstrap": "^4.20.0",
|
||||
"popper.js": "^1.16.1"
|
||||
}
|
||||
}
|
||||
31
phpunit.xml
Executable file
31
phpunit.xml
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
|
||||
bootstrap="vendor/autoload.php"
|
||||
colors="true"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Unit">
|
||||
<directory suffix="Test.php">./tests/Unit</directory>
|
||||
</testsuite>
|
||||
<testsuite name="Feature">
|
||||
<directory suffix="Test.php">./tests/Feature</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<coverage processUncoveredFiles="true">
|
||||
<include>
|
||||
<directory suffix=".php">./app</directory>
|
||||
</include>
|
||||
</coverage>
|
||||
<php>
|
||||
<server name="APP_ENV" value="testing"/>
|
||||
<server name="BCRYPT_ROUNDS" value="4"/>
|
||||
<server name="CACHE_DRIVER" value="array"/>
|
||||
<!-- <server name="DB_CONNECTION" value="sqlite"/> -->
|
||||
<!-- <server name="DB_DATABASE" value=":memory:"/> -->
|
||||
<server name="MAIL_MAILER" value="array"/>
|
||||
<server name="QUEUE_CONNECTION" value="sync"/>
|
||||
<server name="SESSION_DRIVER" value="array"/>
|
||||
<server name="TELESCOPE_ENABLED" value="false"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
26
public/.htaccess
Executable file
26
public/.htaccess
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
<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>
|
||||
|
||||
<Files .env>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
3
public/assets/Vector.svg
Executable file
3
public/assets/Vector.svg
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="48" height="38" viewBox="0 0 48 38" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M45.9167 37.6666C45.9167 37.6666 49 37.6666 49 34.5555C49 31.4444 45.9167 22.1111 33.5833 22.1111C21.25 22.1111 18.1667 31.4444 18.1667 34.5555C18.1667 37.6666 21.25 37.6666 21.25 37.6666H45.9167ZM21.3178 34.5555H45.8488C45.8633 34.5538 45.8777 34.5518 45.892 34.5493L45.9167 34.5431C45.9105 33.7218 45.4017 31.3386 43.5733 29.192C41.8713 27.1791 38.8805 25.2222 33.5833 25.2222C28.2892 25.2222 25.2984 27.1822 23.5933 29.192C21.7649 31.3386 21.2531 33.7249 21.25 34.5431C21.2726 34.5475 21.2952 34.5516 21.3178 34.5555ZM33.5833 15.8889C35.2188 15.8889 36.7873 15.2333 37.9438 14.0664C39.1003 12.8995 39.75 11.3169 39.75 9.66665C39.75 8.01641 39.1003 6.43376 37.9438 5.26687C36.7873 4.09998 35.2188 3.44442 33.5833 3.44442C31.9478 3.44442 30.3793 4.09998 29.2228 5.26687C28.0664 6.43376 27.4167 8.01641 27.4167 9.66665C27.4167 11.3169 28.0664 12.8995 29.2228 14.0664C30.3793 15.2333 31.9478 15.8889 33.5833 15.8889ZM42.8333 9.66665C42.8333 10.8923 42.5941 12.106 42.1292 13.2384C41.6644 14.3707 40.983 15.3996 40.1241 16.2663C39.2651 17.133 38.2454 17.8205 37.1231 18.2895C36.0009 18.7586 34.798 19 33.5833 19C32.3686 19 31.1658 18.7586 30.0435 18.2895C28.9212 17.8205 27.9015 17.133 27.0426 16.2663C26.1836 15.3996 25.5023 14.3707 25.0374 13.2384C24.5726 12.106 24.3333 10.8923 24.3333 9.66665C24.3333 7.19129 25.3079 4.81732 27.0426 3.06698C28.7773 1.31664 31.1301 0.333313 33.5833 0.333313C36.0366 0.333313 38.3894 1.31664 40.1241 3.06698C41.8588 4.81732 42.8333 7.19129 42.8333 9.66665ZM21.0527 22.9822C19.8193 22.5903 18.5479 22.3327 17.2602 22.2138C16.5366 22.1443 15.8101 22.1101 15.0833 22.1111C2.74999 22.1111 -0.333344 31.4444 -0.333344 34.5555C-0.333344 36.6306 0.693406 37.6666 2.74999 37.6666H15.7493C15.2922 36.6954 15.0643 35.6305 15.0833 34.5555C15.0833 31.4133 16.2457 28.2026 18.4442 25.5209C19.1934 24.6062 20.066 23.7506 21.0527 22.9822ZM14.8367 25.2222C9.69366 25.2844 6.77374 27.2133 5.09332 29.192C3.25257 31.3511 2.74999 33.7435 2.74999 34.5555H12C12 31.3044 12.9959 28.0658 14.8367 25.2222ZM4.29166 11.2222C4.29166 8.74685 5.26621 6.37288 7.00092 4.62254C8.73563 2.8722 11.0884 1.88887 13.5417 1.88887C15.9949 1.88887 18.3477 2.8722 20.0824 4.62254C21.8171 6.37288 22.7917 8.74685 22.7917 11.2222C22.7917 13.6976 21.8171 16.0715 20.0824 17.8219C18.3477 19.5722 15.9949 20.5555 13.5417 20.5555C11.0884 20.5555 8.73563 19.5722 7.00092 17.8219C5.26621 16.0715 4.29166 13.6976 4.29166 11.2222ZM13.5417 4.99998C11.9062 4.99998 10.3376 5.65553 9.18116 6.82243C8.02469 7.98932 7.37499 9.57197 7.37499 11.2222C7.37499 12.8724 8.02469 14.4551 9.18116 15.622C10.3376 16.7889 11.9062 17.4444 13.5417 17.4444C15.1772 17.4444 16.7457 16.7889 17.9021 15.622C19.0586 14.4551 19.7083 12.8724 19.7083 11.2222C19.7083 9.57197 19.0586 7.98932 17.9021 6.82243C16.7457 5.65553 15.1772 4.99998 13.5417 4.99998Z" fill="#E74040"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
BIN
public/assets/admin-logo.png
Executable file
BIN
public/assets/admin-logo.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
BIN
public/assets/teamU.png
Executable file
BIN
public/assets/teamU.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 71 KiB |
BIN
public/assets/unauthorized.png
Normal file
BIN
public/assets/unauthorized.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
BIN
public/assets/user-logo.png
Executable file
BIN
public/assets/user-logo.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
166
public/css/admin-employees.css
vendored
Executable file
166
public/css/admin-employees.css
vendored
Executable file
|
|
@ -0,0 +1,166 @@
|
|||
#loading {
|
||||
/* background-color:#ffffff; */
|
||||
position:absolute;
|
||||
top:0px;
|
||||
left:0px;
|
||||
width:100%;
|
||||
min-height:100%;
|
||||
z-index:2000;
|
||||
backdrop-filter: blur(8px);
|
||||
display: none;
|
||||
}
|
||||
.spinner-border {
|
||||
z-index: 2000;
|
||||
position: fixed;
|
||||
top: 50vh;
|
||||
color: #23A6F0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#logged-user {
|
||||
display: flex;
|
||||
float: right;
|
||||
margin-top: -79px;
|
||||
margin-right: 55px;
|
||||
font-family: 'Manrope';
|
||||
font-weight: 100;
|
||||
font-size: large;
|
||||
}
|
||||
#user {
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
#logout {
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.action-bar{
|
||||
margin-top: 4rem;
|
||||
}
|
||||
|
||||
.input-group .btn {
|
||||
height: -webkit-fill-available;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
width: 20rem;
|
||||
float: left;
|
||||
margin-top: 0%;
|
||||
margin-left: 14px;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
max-width: max-content;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
a#dropdownMenuLink {
|
||||
background: #F9F9F9;
|
||||
color: #565e64;
|
||||
border-color: #e6e6e6;
|
||||
border-radius: 1px;
|
||||
}
|
||||
|
||||
.dropdown-item:active {
|
||||
background-color: #23A6F0;
|
||||
}
|
||||
|
||||
.none {
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
color: transparent;
|
||||
background: transparent;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
.btn-primary{
|
||||
max-height: 37px;
|
||||
float: right;
|
||||
display: flex;
|
||||
margin-top: -35px;
|
||||
margin-right: 60px;
|
||||
background-color: #23A6F0;
|
||||
border-color: #237cae;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #237cae;
|
||||
}
|
||||
|
||||
.btn-link {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-link:hover {
|
||||
color: white;
|
||||
}
|
||||
.table-container {
|
||||
display: flex;
|
||||
margin-top: 3rem;
|
||||
justify-content: center;
|
||||
padding-bottom: 3rem;
|
||||
}
|
||||
|
||||
|
||||
table {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
min-width: 90%;
|
||||
max-width: 90%;
|
||||
}
|
||||
|
||||
table tr th,
|
||||
table tr td {
|
||||
border-right: 1px solid #bbb;
|
||||
border-bottom: 1px solid #bbb;
|
||||
padding: 9px;
|
||||
/* min-width: 15rem; */
|
||||
}
|
||||
table tr th:first-child,
|
||||
table tr td:first-child {
|
||||
border-left: 1px solid #bbb;
|
||||
}
|
||||
table tr th {
|
||||
border-top: 1px solid #bbb;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* top-left border-radius */
|
||||
table tr:first-child th:first-child {
|
||||
border-top-left-radius: 6px;
|
||||
}
|
||||
|
||||
/* top-right border-radius */
|
||||
table tr:first-child th:last-child {
|
||||
border-top-right-radius: 6px;
|
||||
}
|
||||
|
||||
/* bottom-left border-radius */
|
||||
table tr:last-child td:first-child {
|
||||
border-bottom-left-radius: 6px;
|
||||
}
|
||||
|
||||
/* bottom-right border-radius */
|
||||
table tr:last-child td:last-child {
|
||||
border-bottom-right-radius: 6px;
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
background-color: #EDEDED;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1280px) and (min-height: 913px){
|
||||
#logout {
|
||||
margin-top: 29rem;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#loadOverlay{
|
||||
display: none;
|
||||
}
|
||||
171
public/css/employees.css
vendored
Executable file
171
public/css/employees.css
vendored
Executable file
|
|
@ -0,0 +1,171 @@
|
|||
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;700&display=swap");
|
||||
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;1,200;1,400;1,600&display=swap");
|
||||
body {
|
||||
font-family: "Lato", sans-serif;
|
||||
}
|
||||
.sidenav {
|
||||
height: 100vh;
|
||||
width: 13rem;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #d2d2d2;
|
||||
overflow-x: hidden;
|
||||
padding-top: 1%;
|
||||
}
|
||||
.sidenav a {
|
||||
padding: 6px 8px 6px 45px;
|
||||
text-decoration: none;
|
||||
font-size: 25px;
|
||||
color: #5a5a5a;
|
||||
display: block;
|
||||
font-size: 100%;
|
||||
}
|
||||
.sidenav a:hover {
|
||||
color: #333333;
|
||||
}
|
||||
.main {
|
||||
margin-left: 13rem;
|
||||
font-size: 28px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
#logo-image {
|
||||
width: 60%;
|
||||
height: auto;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
#nav-items {
|
||||
margin-top: 5rem;
|
||||
}
|
||||
.nav-item {
|
||||
display: block;
|
||||
margin-left: 1.5rem;
|
||||
margin-right: 0.5rem;
|
||||
border-radius: 5px;
|
||||
padding-top: 1rem;
|
||||
}
|
||||
.icon {
|
||||
float: left;
|
||||
margin-top: 3px;
|
||||
}
|
||||
.nav-text {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.grid-container {
|
||||
padding: 1rem;
|
||||
display: grid;
|
||||
grid-gap: 2rem;
|
||||
grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
|
||||
justify-items: center;
|
||||
}
|
||||
.card {
|
||||
width: 20rem;
|
||||
min-height: 10rem;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
padding: 1.5rem;
|
||||
gap: 1px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.card-header {
|
||||
display: flex;
|
||||
min-width: 15rem;
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
.card-name {
|
||||
margin-left: 5%;
|
||||
font-size: 18px;
|
||||
font-family: "Montserrat";
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
color: #252b42;
|
||||
}
|
||||
.card-image {
|
||||
height: 22px;
|
||||
width: auto;
|
||||
}
|
||||
.card-position {
|
||||
font-family: "Montserrat";
|
||||
font-size: 52%;
|
||||
margin-top: -1rem;
|
||||
padding-bottom: 0.5rem;
|
||||
padding-left: 36px;
|
||||
}
|
||||
.card-details {
|
||||
font-family: "Montserrat";
|
||||
font-size: 16px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.header {
|
||||
display: block;
|
||||
}
|
||||
.bi-chevron-down {
|
||||
stroke: #000000;
|
||||
fill: #000000;
|
||||
}
|
||||
.bi-chevron-down:hover {
|
||||
stroke: #bd3b3b;
|
||||
fill: #bd3b3b;
|
||||
}
|
||||
.input-group-sm {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
background-color: #c12426;
|
||||
left: 40rem;
|
||||
width: 37rem;
|
||||
top: 45px;
|
||||
border-radius: 0;
|
||||
}
|
||||
#title {
|
||||
font-family: "Manrope";
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-size: 34px;
|
||||
line-height: 7rem;
|
||||
margin-left: 1rem;
|
||||
color: rgba(76, 76, 76, 0.62);
|
||||
opacity: 0.8;
|
||||
}
|
||||
.input-group .btn {
|
||||
height: -webkit-fill-available;
|
||||
}
|
||||
.input-group {
|
||||
width: 40%;
|
||||
float: right;
|
||||
margin-top: -6%;
|
||||
margin-right: 3%;
|
||||
}
|
||||
@media screen and (max-height: 450px) {
|
||||
.sidenav {
|
||||
padding-top: 15px;
|
||||
}
|
||||
.sidenav a {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1025px) {
|
||||
.grid-container {
|
||||
grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
|
||||
}
|
||||
.card {
|
||||
min-width: 23rem;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1280px) and (min-height: 913px) {
|
||||
.card {
|
||||
min-width: 17rem;
|
||||
}
|
||||
}
|
||||
#loadOverlay {
|
||||
display: none;
|
||||
}
|
||||
133
public/css/index.css
vendored
Executable file
133
public/css/index.css
vendored
Executable file
|
|
@ -0,0 +1,133 @@
|
|||
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;700&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;1,200;1,400;1,600&display=swap');
|
||||
|
||||
/* Landing Page */
|
||||
|
||||
body {
|
||||
margin: 0 auto;
|
||||
padding: .5rem;
|
||||
/* background-color: #0c0d10; */
|
||||
|
||||
}
|
||||
|
||||
/* body:active{
|
||||
background-color: #0f1113;
|
||||
} */
|
||||
|
||||
#logo {
|
||||
margin-top: 5rem;
|
||||
padding-bottom: 4rem;
|
||||
margin-bottom: 3.5rem;
|
||||
}
|
||||
|
||||
#logo-image {
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
width: 20rem;
|
||||
}
|
||||
|
||||
.icon{
|
||||
left: 3.5rem;
|
||||
top: 22.25rem;
|
||||
}
|
||||
|
||||
.search{
|
||||
display:flex;
|
||||
margin: 0 auto;
|
||||
height: 2.5rem;
|
||||
width: 80%;
|
||||
top: 7rem;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
padding: 0px 12px 0px 23px;
|
||||
gap: 10px;
|
||||
|
||||
background: rgb(207, 207, 207);
|
||||
border: 1px solid #717171;
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.search:active {
|
||||
background: rgb(207, 207, 207);
|
||||
border: 1px solid #717171;
|
||||
border-radius: 50px;
|
||||
}
|
||||
input:autofill, -webkit-autofill, :focus, :active {
|
||||
-webkit-background-clip: text;
|
||||
}
|
||||
|
||||
.form-control, :active{
|
||||
position: absolute;
|
||||
margin: .25rem 2rem auto;
|
||||
height: 1.75rem;
|
||||
width: 64%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
border: none;
|
||||
outline: none;
|
||||
border-radius: 50px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.form-control:focus{
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
|
||||
#search-icon{
|
||||
margin-top: .5rem;
|
||||
}
|
||||
|
||||
.button-group {
|
||||
display: flex;
|
||||
column-gap: 1rem;
|
||||
justify-content: center;
|
||||
gap: 7rem;
|
||||
}
|
||||
|
||||
.btn-sm{
|
||||
color: white;
|
||||
width: 10rem;
|
||||
height: 2rem;
|
||||
border-radius: 30rem;
|
||||
border: transparent;
|
||||
}
|
||||
.btn-sm:hover{
|
||||
color: white;
|
||||
}
|
||||
|
||||
#search-btn{
|
||||
background-color: #c82424;
|
||||
}
|
||||
|
||||
#search-btn:hover {
|
||||
background-color: #dd3d3d;
|
||||
}
|
||||
|
||||
#view-btn {
|
||||
background-color: #212529;
|
||||
}
|
||||
|
||||
#view-btn:hover {
|
||||
background-color: #30363b;
|
||||
}
|
||||
|
||||
#button-row {
|
||||
padding-top: 1.5rem;
|
||||
}
|
||||
|
||||
#disclaimer-row {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
color: rgb(0, 0, 0);
|
||||
font-size: .8rem;
|
||||
}
|
||||
|
||||
#loadOverlay{
|
||||
display: none;
|
||||
}
|
||||
72
public/css/login.css
vendored
Executable file
72
public/css/login.css
vendored
Executable file
|
|
@ -0,0 +1,72 @@
|
|||
#logo-image {
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
width: 14rem;
|
||||
padding-bottom: 10px;
|
||||
|
||||
}
|
||||
|
||||
#logo {
|
||||
margin: 4% auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.form-label{
|
||||
top: 1.25rem;
|
||||
position: relative;
|
||||
background: white;
|
||||
width: max-content;
|
||||
left: 1rem
|
||||
}
|
||||
#warning {
|
||||
color: var(--bs-red);
|
||||
}
|
||||
|
||||
.form-row {
|
||||
width: max-content;
|
||||
margin: 0 auto
|
||||
}
|
||||
|
||||
input {
|
||||
height: 3rem;
|
||||
width: 30rem;
|
||||
padding-top: 14px;
|
||||
padding-left: 1rem;
|
||||
border: solid 1px #6c757d;
|
||||
border-radius: 10px;
|
||||
align-content: center;
|
||||
|
||||
|
||||
}
|
||||
|
||||
input:focus {
|
||||
outline: 1px solid rgb(112,174,199);
|
||||
/* color: rgb(112,174,199); */
|
||||
}
|
||||
|
||||
.form-row:focus-within {
|
||||
color: rgb(112,174,199)
|
||||
}
|
||||
|
||||
.btn-sm {
|
||||
background-color: #0685b9;
|
||||
width: 10rem;
|
||||
height: 2rem;
|
||||
border-radius: 6px;
|
||||
border: transparent;
|
||||
}
|
||||
|
||||
.btn-sm:hover {
|
||||
background-color: rgb(112,174,199);
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1025px){
|
||||
#logo {
|
||||
margin: 5% auto;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#loadOverlay{
|
||||
display: none;
|
||||
}
|
||||
330
public/css/pbx.css
vendored
Executable file
330
public/css/pbx.css
vendored
Executable file
|
|
@ -0,0 +1,330 @@
|
|||
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;700&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;1,200;1,400;1,600&display=swap');
|
||||
|
||||
|
||||
body {
|
||||
font-family: "Lato", sans-serif;
|
||||
}
|
||||
|
||||
#overlay {
|
||||
position:absolute;
|
||||
top:0px;
|
||||
left:0px;
|
||||
width:100%;
|
||||
min-height:10000vh;
|
||||
z-index:2000;
|
||||
backdrop-filter: blur(8px);
|
||||
display: none;
|
||||
z-index: 999; /* Higher than anything else in the document */
|
||||
}
|
||||
|
||||
#modal {
|
||||
position: fixed;
|
||||
left: 43%;
|
||||
top: 40%;
|
||||
z-index: 999;
|
||||
min-width: 27rem;
|
||||
min-height: 15rem;
|
||||
z-index: 9999;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.btn-link {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
.btn-link:hover{
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.del {
|
||||
margin: 0 auto;
|
||||
width: fit-content;
|
||||
display: contents;
|
||||
}
|
||||
|
||||
#cancel, #delete {
|
||||
min-width: 10rem;
|
||||
margin-left: 1.5rem;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.warning {
|
||||
color: var(--bs-red);
|
||||
font-size: small;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 4%;
|
||||
}
|
||||
|
||||
#logged-user {
|
||||
display: flex;
|
||||
float: right;
|
||||
margin-top: -79px;
|
||||
margin-right: 55px;
|
||||
font-family: 'Manrope';
|
||||
font-weight: 100;
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
#user {
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.sidenav {
|
||||
height: 100vh;
|
||||
width: 13rem;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #D2D2D2;
|
||||
overflow-x: hidden;
|
||||
padding-top: 1%;
|
||||
}
|
||||
|
||||
.sidenav a {
|
||||
padding: 6px 8px 6px 45px;
|
||||
text-decoration: none;
|
||||
font-size: 25px;
|
||||
color: #5a5a5a;
|
||||
display: block;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.sidenav a:hover {
|
||||
color: #333333;
|
||||
}
|
||||
#logout {
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
width: 32%;
|
||||
/* float: right; */
|
||||
margin-top: 0%;
|
||||
/* margin-right: -28%; */
|
||||
float: left;
|
||||
display: flex;
|
||||
margin-left: 3%;
|
||||
}
|
||||
|
||||
#email-pins {
|
||||
margin-left: 29%;
|
||||
}
|
||||
|
||||
.main {
|
||||
margin-left: 13rem; /* Same as the width of the sidenav */
|
||||
font-size: 28px; /* Increased text to enable scrolling */
|
||||
padding: 0px 10px;
|
||||
}
|
||||
|
||||
#logo-image {
|
||||
width: 60%;
|
||||
height: auto;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#nav-items {
|
||||
margin-top: 5rem;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
display: block;
|
||||
margin-left: 1.5rem;
|
||||
margin-right: .5rem;
|
||||
border-radius: 5px;
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.icon {
|
||||
float: left;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.nav-text {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#new-pbx {
|
||||
float: right;
|
||||
right: 41px;
|
||||
}
|
||||
|
||||
.grid-container{
|
||||
/* margin: 0 auto; */
|
||||
padding: 1rem;
|
||||
display: grid;
|
||||
grid-gap: 2rem;
|
||||
grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
|
||||
justify-items: center;
|
||||
/* margin-top: 6rem; */
|
||||
}
|
||||
|
||||
svg.bi.bi-dash-circle:hover {
|
||||
fill: #23A6F0;
|
||||
|
||||
}
|
||||
|
||||
svg.bi.bi-dash-circle {
|
||||
position: relative;
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
.confirm-icon {
|
||||
fill: #dc3545;
|
||||
position: relative;
|
||||
left: 45%;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.card {
|
||||
min-height: 10rem;
|
||||
min-width: 20rem;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
margin: 0 auto;
|
||||
height:8rem;
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
min-width: 15rem;
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0rem;
|
||||
}
|
||||
|
||||
.card-name {
|
||||
font-family: 'Montserrat';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
color: #252B42;
|
||||
margin-left: 18px;
|
||||
margin-top: 2px;
|
||||
font-size: 18px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.card-image {
|
||||
height: 30px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.card-position {
|
||||
font-family: 'Montserrat';
|
||||
/* font-style: italic; */
|
||||
font-size: 52%;
|
||||
margin-top: -1rem;
|
||||
padding-bottom: .5rem;
|
||||
padding-left: 36px;
|
||||
}
|
||||
|
||||
.card-details {
|
||||
font-family: 'Montserrat';
|
||||
font-size: 25px;
|
||||
margin-bottom: 0rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.bi-chevron-down {
|
||||
stroke: #000000;
|
||||
fill: #000000;
|
||||
}
|
||||
|
||||
.bi-chevron-down:hover {
|
||||
stroke: #bd3b3b;
|
||||
fill: #bd3b3b;
|
||||
}
|
||||
|
||||
.action-bar {
|
||||
display: list-item;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
.action-icon {
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.input-group-sm {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
background-color: #C12426;
|
||||
left: 40rem;
|
||||
width: 37rem;
|
||||
top: 45px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#title {
|
||||
|
||||
font-family: 'Manrope';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-size: 34px;
|
||||
line-height: 7rem;
|
||||
margin-left: 1rem;
|
||||
color: rgba(76, 76, 76, 0.62);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.input-group .btn {
|
||||
height: -webkit-fill-available;
|
||||
}
|
||||
|
||||
.card-actions {
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.select-pin {
|
||||
align-self: flex-end;
|
||||
}
|
||||
@media screen and (min-width: 1025px){
|
||||
.card {
|
||||
min-width: 22rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1280px) and (min-height: 913px){
|
||||
.grid-container {
|
||||
grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
min-width: 20rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#loadOverlay{
|
||||
display: none;
|
||||
}
|
||||
43
public/css/unauthorizedAccess.css
vendored
Normal file
43
public/css/unauthorizedAccess.css
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
body {
|
||||
margin: 0 auto;
|
||||
min-width: 100vh;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.main {
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 75%;
|
||||
min-height: 30rem;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
padding: 1.5rem;
|
||||
gap: 1px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.unauthorized {
|
||||
margin: 0 auto;
|
||||
width: 7%;
|
||||
}
|
||||
|
||||
.card-details {
|
||||
text-align: center;
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
padding-top: 3rem;
|
||||
/* margin-top: 6%; */
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 6.5rem;
|
||||
}
|
||||
0
public/favicon.ico
Executable file
0
public/favicon.ico
Executable file
55
public/index.php
Executable file
55
public/index.php
Executable file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Contracts\Http\Kernel;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
define('LARAVEL_START', microtime(true));
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Check If Application Is Under Maintenance
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If the application is maintenance / demo mode via the "down" command we
|
||||
| will require this file so that any prerendered template can be shown
|
||||
| instead of starting the framework, which could cause an exception.
|
||||
|
|
||||
*/
|
||||
|
||||
if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
|
||||
require __DIR__.'/../storage/framework/maintenance.php';
|
||||
}
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register The Auto Loader
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Composer provides a convenient, automatically generated class loader for
|
||||
| this application. We just need to utilize it! We'll simply require it
|
||||
| into the script here so we don't need to manually load our classes.
|
||||
|
|
||||
*/
|
||||
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Once we have the application, we can handle the incoming request using
|
||||
| the application's HTTP kernel. Then, we will send the response back
|
||||
| to this client's browser, allowing them to enjoy our application.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = require_once __DIR__.'/../bootstrap/app.php';
|
||||
|
||||
$kernel = $app->make(Kernel::class);
|
||||
|
||||
$response = tap($kernel->handle(
|
||||
$request = Request::capture()
|
||||
))->send();
|
||||
|
||||
$kernel->terminate($request, $response);
|
||||
1
public/js/app.js
vendored
Executable file
1
public/js/app.js
vendored
Executable file
|
|
@ -0,0 +1 @@
|
|||
require('./bootstrap');
|
||||
28
public/js/bootstrap.js
vendored
Executable file
28
public/js/bootstrap.js
vendored
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
window._ = require('lodash');
|
||||
|
||||
/**
|
||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||
* to our Laravel back-end. This library automatically handles sending the
|
||||
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
||||
*/
|
||||
|
||||
window.axios = require('axios');
|
||||
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
/**
|
||||
* Echo exposes an expressive API for subscribing to channels and listening
|
||||
* for events that are broadcast by Laravel. Echo and event broadcasting
|
||||
* allows your team to easily build robust real-time web applications.
|
||||
*/
|
||||
|
||||
// import Echo from 'laravel-echo';
|
||||
|
||||
// window.Pusher = require('pusher-js');
|
||||
|
||||
// window.Echo = new Echo({
|
||||
// broadcaster: 'pusher',
|
||||
// key: process.env.MIX_PUSHER_APP_KEY,
|
||||
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
|
||||
// forceTLS: true
|
||||
// });
|
||||
4
public/mix-manifest.json
Executable file
4
public/mix-manifest.json
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"/js/app.js": "/js/app.js",
|
||||
"/css/app.css": "/css/app.css"
|
||||
}
|
||||
2
public/robots.txt
Executable file
2
public/robots.txt
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
User-agent: *
|
||||
Disallow:
|
||||
28
public/web.config
Executable file
28
public/web.config
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
<!--
|
||||
Rewrites requires Microsoft URL Rewrite Module for IIS
|
||||
Download: https://www.microsoft.com/en-us/download/details.aspx?id=47337
|
||||
Debug Help: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules
|
||||
-->
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<rewrite>
|
||||
<rules>
|
||||
<rule name="Imported Rule 1" stopProcessing="true">
|
||||
<match url="^(.*)/$" ignoreCase="false" />
|
||||
<conditions>
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
|
||||
</conditions>
|
||||
<action type="Redirect" redirectType="Permanent" url="/{R:1}" />
|
||||
</rule>
|
||||
<rule name="Imported Rule 2" stopProcessing="true">
|
||||
<match url="^" ignoreCase="false" />
|
||||
<conditions>
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="index.php" />
|
||||
</rule>
|
||||
</rules>
|
||||
</rewrite>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
19
resources/lang/en/auth.php
Executable file
19
resources/lang/en/auth.php
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used during authentication for various
|
||||
| messages that we need to display to the user. You are free to modify
|
||||
| these language lines according to your application's requirements.
|
||||
|
|
||||
*/
|
||||
|
||||
'failed' => 'These credentials do not match our records.',
|
||||
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
|
||||
|
||||
];
|
||||
19
resources/lang/en/pagination.php
Executable file
19
resources/lang/en/pagination.php
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used by the paginator library to build
|
||||
| the simple pagination links. You are free to change them to anything
|
||||
| you want to customize your views to better match your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'previous' => '« Previous',
|
||||
'next' => 'Next »',
|
||||
|
||||
];
|
||||
22
resources/lang/en/passwords.php
Executable file
22
resources/lang/en/passwords.php
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are the default lines which match reasons
|
||||
| that are given by the password broker for a password update attempt
|
||||
| has failed, such as for an invalid token or invalid new password.
|
||||
|
|
||||
*/
|
||||
|
||||
'reset' => 'Your password has been reset!',
|
||||
'sent' => 'We have emailed your password reset link!',
|
||||
'throttled' => 'Please wait before retrying.',
|
||||
'token' => 'This password reset token is invalid.',
|
||||
'user' => "We can't find a user with that email address.",
|
||||
|
||||
];
|
||||
152
resources/lang/en/validation.php
Executable file
152
resources/lang/en/validation.php
Executable file
|
|
@ -0,0 +1,152 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| as the size rules. Feel free to tweak each of these messages here.
|
||||
|
|
||||
*/
|
||||
|
||||
'accepted' => 'The :attribute must be accepted.',
|
||||
'active_url' => 'The :attribute is not a valid URL.',
|
||||
'after' => 'The :attribute must be a date after :date.',
|
||||
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
||||
'alpha' => 'The :attribute may only contain letters.',
|
||||
'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
|
||||
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
||||
'array' => 'The :attribute must be an array.',
|
||||
'before' => 'The :attribute must be a date before :date.',
|
||||
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||
'between' => [
|
||||
'numeric' => 'The :attribute must be between :min and :max.',
|
||||
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
||||
'string' => 'The :attribute must be between :min and :max characters.',
|
||||
'array' => 'The :attribute must have between :min and :max items.',
|
||||
],
|
||||
'boolean' => 'The :attribute field must be true or false.',
|
||||
'confirmed' => 'The :attribute confirmation does not match.',
|
||||
'date' => 'The :attribute is not a valid date.',
|
||||
'date_equals' => 'The :attribute must be a date equal to :date.',
|
||||
'date_format' => 'The :attribute does not match the format :format.',
|
||||
'different' => 'The :attribute and :other must be different.',
|
||||
'digits' => 'The :attribute must be :digits digits.',
|
||||
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
||||
'dimensions' => 'The :attribute has invalid image dimensions.',
|
||||
'distinct' => 'The :attribute field has a duplicate value.',
|
||||
'email' => 'The :attribute must be a valid email address.',
|
||||
'ends_with' => 'The :attribute must end with one of the following: :values.',
|
||||
'exists' => 'The selected :attribute is invalid.',
|
||||
'file' => 'The :attribute must be a file.',
|
||||
'filled' => 'The :attribute field must have a value.',
|
||||
'gt' => [
|
||||
'numeric' => 'The :attribute must be greater than :value.',
|
||||
'file' => 'The :attribute must be greater than :value kilobytes.',
|
||||
'string' => 'The :attribute must be greater than :value characters.',
|
||||
'array' => 'The :attribute must have more than :value items.',
|
||||
],
|
||||
'gte' => [
|
||||
'numeric' => 'The :attribute must be greater than or equal :value.',
|
||||
'file' => 'The :attribute must be greater than or equal :value kilobytes.',
|
||||
'string' => 'The :attribute must be greater than or equal :value characters.',
|
||||
'array' => 'The :attribute must have :value items or more.',
|
||||
],
|
||||
'image' => 'The :attribute must be an image.',
|
||||
'in' => 'The selected :attribute is invalid.',
|
||||
'in_array' => 'The :attribute field does not exist in :other.',
|
||||
'integer' => 'The :attribute must be an integer.',
|
||||
'ip' => 'The :attribute must be a valid IP address.',
|
||||
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
||||
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
||||
'json' => 'The :attribute must be a valid JSON string.',
|
||||
'lt' => [
|
||||
'numeric' => 'The :attribute must be less than :value.',
|
||||
'file' => 'The :attribute must be less than :value kilobytes.',
|
||||
'string' => 'The :attribute must be less than :value characters.',
|
||||
'array' => 'The :attribute must have less than :value items.',
|
||||
],
|
||||
'lte' => [
|
||||
'numeric' => 'The :attribute must be less than or equal :value.',
|
||||
'file' => 'The :attribute must be less than or equal :value kilobytes.',
|
||||
'string' => 'The :attribute must be less than or equal :value characters.',
|
||||
'array' => 'The :attribute must not have more than :value items.',
|
||||
],
|
||||
'max' => [
|
||||
'numeric' => 'The :attribute may not be greater than :max.',
|
||||
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
||||
'string' => 'The :attribute may not be greater than :max characters.',
|
||||
'array' => 'The :attribute may not have more than :max items.',
|
||||
],
|
||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
||||
'min' => [
|
||||
'numeric' => 'The :attribute must be at least :min.',
|
||||
'file' => 'The :attribute must be at least :min kilobytes.',
|
||||
'string' => 'The :attribute must be at least :min characters.',
|
||||
'array' => 'The :attribute must have at least :min items.',
|
||||
],
|
||||
'multiple_of' => 'The :attribute must be a multiple of :value',
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'not_regex' => 'The :attribute format is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'password' => 'The password is incorrect.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||
'required_with' => 'The :attribute field is required when :values is present.',
|
||||
'required_with_all' => 'The :attribute field is required when :values are present.',
|
||||
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||
'same' => 'The :attribute and :other must match.',
|
||||
'size' => [
|
||||
'numeric' => 'The :attribute must be :size.',
|
||||
'file' => 'The :attribute must be :size kilobytes.',
|
||||
'string' => 'The :attribute must be :size characters.',
|
||||
'array' => 'The :attribute must contain :size items.',
|
||||
],
|
||||
'starts_with' => 'The :attribute must start with one of the following: :values.',
|
||||
'string' => 'The :attribute must be a string.',
|
||||
'timezone' => 'The :attribute must be a valid zone.',
|
||||
'unique' => 'The :attribute has already been taken.',
|
||||
'uploaded' => 'The :attribute failed to upload.',
|
||||
'url' => 'The :attribute format is invalid.',
|
||||
'uuid' => 'The :attribute must be a valid UUID.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'custom-message',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap our attribute placeholder
|
||||
| with something more reader friendly such as "E-Mail Address" instead
|
||||
| of "email". This simply helps us make our message more expressive.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [],
|
||||
|
||||
];
|
||||
130
resources/views/Admin/employees.blade.php
Executable file
130
resources/views/Admin/employees.blade.php
Executable file
|
|
@ -0,0 +1,130 @@
|
|||
@extends('Layouts.layout')
|
||||
@section('Title', 'Employees')
|
||||
@section('css')
|
||||
|
||||
<link href="{{ asset('/css/employees.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('/css/admin-employees.css') }}" rel="stylesheet">
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.3/dist/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
@stop
|
||||
@section('Content')
|
||||
|
||||
<body>
|
||||
<div id="loadOverlay" style="background-color:#ffffff; position:absolute; top:0px; left:0px; width:100%; min-height:1500vh; z-index:2000;"></div>
|
||||
|
||||
<div id="loading"></div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<div class="spinner-border" id="spinner" role="status">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('Components.sidenav', ['state' => 'Admin'])
|
||||
<div class="main">
|
||||
|
||||
<div class="header">
|
||||
<p id="title">Employees</p>
|
||||
<p id="logged-user"><svg id="user"width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.16 10.87C12.06 10.86 11.94 10.86 11.83 10.87C9.45 10.79 7.56 8.84 7.56 6.44C7.56 3.99 9.54 2 12 2C14.45 2 16.44 3.99 16.44 6.44C16.43 8.84 14.54 10.79 12.16 10.87Z" stroke="#808080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M7.15997 14.56C4.73997 16.18 4.73997 18.82 7.15997 20.43C9.90997 22.27 14.42 22.27 17.17 20.43C19.59 18.81 19.59 16.17 17.17 14.56C14.43 12.73 9.91997 12.73 7.15997 14.56Z" stroke="#808080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
{{$data['curr_user']}}</p>
|
||||
</div>
|
||||
|
||||
<div class="action-bar">
|
||||
<form method="POST" action={{ action('App\Http\Controllers\AdminController@search') }} enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('post')
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="search" name="search" placeholder="Search..."/>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-secondary" type="submit" style="background: #23A6F0; border-radius: 0px 5px 5px 0px;"><svg id="search-icon" xmlns="http://www.w3.org/2000/svg" width="17.49" height="17.49" fill="rgba(255, 255, 255)" class="bi bi-search" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Sort by
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
|
||||
|
||||
<form method="POST" action={{ route('sort', ['sortBy' => 'name']) }} enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('post')
|
||||
<input type="hidden" class="form-control" id="data" name="data" value="{{ json_encode($data['users'],TRUE)}}"/>
|
||||
<button class="dropdown-item" type="submit">Name</a></button>
|
||||
</form>
|
||||
|
||||
<form method="POST" action={{ route('sort', ['sortBy' => 'position']) }} enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('post')
|
||||
<input type="hidden" class="form-control" id="data" name="data" value="{{ json_encode($data['users'],TRUE)}}"/>
|
||||
<button class="dropdown-item" type="submit">Position</a></button>
|
||||
</form>
|
||||
|
||||
<form method="POST" action={{ route('sort', ['sortBy' => 'department']) }} enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('post')
|
||||
<input type="hidden" class="form-control" id="data" name="data" value="{{ json_encode($data['users'],TRUE)}}"/>
|
||||
<button class="dropdown-item" type="submit">Department</a></button>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<button class="btn btn-primary"><a class="btn-link" href=" {{route('import')}}" onclick="spinner()">Import Users</a></button>
|
||||
|
||||
{{-- <form method="POST" action={{ action('App\Http\Controllers\AdminController@export') }} enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('post')
|
||||
|
||||
|
||||
|
||||
<input type="hidden" class="form-control" id="data" name="data" value="{{ json_encode($data['users'],TRUE)}}"/>
|
||||
|
||||
<button class="btn btn-primary" type="submit">Export Data</a></button>
|
||||
</form> --}}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-container">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Full Name</th>
|
||||
<th>Email</th>
|
||||
<th>Extension</th>
|
||||
<th>Position</th>
|
||||
<th>Department</th>
|
||||
</tr>
|
||||
|
||||
@foreach ($data['users'] as $user)
|
||||
|
||||
<tr>
|
||||
<td>{{$user->name}}</td>
|
||||
<td>{{$user->email}}</td>
|
||||
<td>{{$user->ext}}</td>
|
||||
<td>{{$user->position}}</td>
|
||||
<td>{{$user->department}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function spinner() {
|
||||
let spinnner = document.getElementById("spinner").style.display="block";
|
||||
let backdrop = document.getElementById("loading").style.display="block";
|
||||
document.body.style.overflow="hidden";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
73
resources/views/Admin/index.blade.php
Executable file
73
resources/views/Admin/index.blade.php
Executable file
|
|
@ -0,0 +1,73 @@
|
|||
@extends('Layouts.layout')
|
||||
@section('Title', 'Login')
|
||||
@section('css')
|
||||
<link href="{{ asset('/css/index.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('/css/login.css') }}" rel="stylesheet">
|
||||
@stop
|
||||
|
||||
@section('Content')
|
||||
|
||||
<body>
|
||||
<div id="loadOverlay" style="background-color:#ffffff; position:absolute; top:0px; left:0px; width:100%; min-height:1500vh; z-index:2000;"></div>
|
||||
<div class="container text-center">
|
||||
<div class="row align-items-start">
|
||||
|
||||
<div class="row" id="logo">
|
||||
<img id="logo-image" src="{{asset('/assets/admin-logo.png')}}" alt="Teams logo">
|
||||
</div>
|
||||
|
||||
|
||||
<div id="login-form">
|
||||
|
||||
<form method="POST" action={{ action('App\Http\Controllers\AdminController@login') }} enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('post')
|
||||
|
||||
<h4>MYDNS Internal Directory</h4>
|
||||
<div class="form-row">
|
||||
<p class="form-label">Email</p>
|
||||
<input class="form-input" type="email" id="mail" name="mail">
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<p class="form-label">Password</p>
|
||||
<input class="form-input" type="password" id="password" name="password">
|
||||
</div>
|
||||
|
||||
@if (!empty($errors))
|
||||
@if ($errors == '1')
|
||||
<div class="form-row">
|
||||
<p id="warning">Email or password cannot be empty!</p>
|
||||
</div>
|
||||
|
||||
@elseif ($errors == '2')
|
||||
<div class="form-row">
|
||||
<p id="warning">Incorrect email or password!</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endif
|
||||
|
||||
<div class="form-row" id="button-row">
|
||||
<div class="button-group">
|
||||
<button type="submit" class="btn-sm" id="login-btn">Login</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="disclaimer-row">
|
||||
<div class="disclaimer-group">
|
||||
<h6 id="title">DISCLAIMER</h6>
|
||||
<p id="disclaimer">For Official Use Only</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
190
resources/views/Admin/pbx.blade.php
Executable file
190
resources/views/Admin/pbx.blade.php
Executable file
|
|
@ -0,0 +1,190 @@
|
|||
@extends('Layouts.layout')
|
||||
@section('Title', 'PBX Pins')
|
||||
@section('css')
|
||||
<link href="{{ asset('/css/pbx.css') }}" rel="stylesheet">
|
||||
@stop
|
||||
@section('Content')
|
||||
|
||||
<body>
|
||||
<div id="loadOverlay"
|
||||
style="background-color:#ffffff; position:absolute; top:0px; left:0px; width:100%; min-height:10000vh; z-index:3000;">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="overlay"></div>
|
||||
@include('Components.sidenav', ['state' => 'Admin'])
|
||||
<div class="main">
|
||||
|
||||
<div class="header">
|
||||
<p id="title">PBX Pins</p>
|
||||
<p id="logged-user"><svg id="user"width="24" height="24" viewBox="0 0 24 24" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M12.16 10.87C12.06 10.86 11.94 10.86 11.83 10.87C9.45 10.79 7.56 8.84 7.56 6.44C7.56 3.99 9.54 2 12 2C14.45 2 16.44 3.99 16.44 6.44C16.43 8.84 14.54 10.79 12.16 10.87Z"
|
||||
stroke="#808080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path
|
||||
d="M7.15997 14.56C4.73997 16.18 4.73997 18.82 7.15997 20.43C9.90997 22.27 14.42 22.27 17.17 20.43C19.59 18.81 19.59 16.17 17.17 14.56C14.43 12.73 9.91997 12.73 7.15997 14.56Z"
|
||||
stroke="#808080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
{{ $data['curr_user'] }}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="action-bar">
|
||||
{{-- Search for PBX User --}}
|
||||
<form method="POST" action={{ action('App\Http\Controllers\PBXController@pbxSearch') }}
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('post')
|
||||
|
||||
<div class="input-group" id="search-pbx">
|
||||
<input type="text" class="form-control" id="search" name="search" placeholder="Search..." />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-secondary" type="submit"
|
||||
style="background: #23A6F0; border-radius: 0px 5px 5px 0px;"><svg id="search-icon"
|
||||
xmlns="http://www.w3.org/2000/svg" width="17.49" height="17.49"
|
||||
fill="rgba(255, 255, 255)" class="bi bi-search" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z" />
|
||||
</svg></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form method="POST" action={{ action('App\Http\Controllers\PBXController@createPin') }}
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('post')
|
||||
|
||||
<div class="input-group" id="new-pbx">
|
||||
<input type="text" class="form-control" id="add-pbx" name="add-pbx" placeholder="Email..." />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-secondary" type="submit"
|
||||
style="background: #23A6F0; border-radius: 0px 5px 5px 0px;"><svg
|
||||
xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
|
||||
class="bi bi-person-fill-add" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M12.5 16a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm.5-5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0Zm-2-6a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
||||
<path
|
||||
d="M2 13c0 1 1 1 1 1h5.256A4.493 4.493 0 0 1 8 12.5a4.49 4.49 0 0 1 1.544-3.393C9.077 9.038 8.564 9 8 9c-5 0-6 3-6 4Z" />
|
||||
</svg></button>
|
||||
</div>
|
||||
@if (!empty($data['error']))
|
||||
@if ($data['error'] == '1')
|
||||
<p class="warning">User already has an assigned pin</p>
|
||||
@elseif ($data['error'] == '2')
|
||||
<p class="warning">Please enter a valid email</p>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="grid-container">
|
||||
|
||||
@foreach ($data['pins'] as $pin)
|
||||
@if ($pin->pin !== 0)
|
||||
<div class="card" id="pbx-id{{ $pin->id }}">
|
||||
|
||||
<div class='card' id='modal' data-id="{{ $pin->id }}">
|
||||
<div class='card-details' id='modal-details'>
|
||||
<svg class="confirm-icon" xmlns="http://www.w3.org/2000/svg" width="32"
|
||||
height="32" fill="currentColor" class="bi bi-x-circle" viewBox="0 0 16 16">
|
||||
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" />
|
||||
<path
|
||||
d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" />
|
||||
</svg>
|
||||
<h1>Disable PBX Pin</h1>
|
||||
<h3>Are you sure you want to disable this PBX Pin?</h3>
|
||||
</div>
|
||||
<div class="options">
|
||||
<button type="button" id="cancel" class="btn btn-secondary"
|
||||
onclick="hideModal({{ $pin->id }})">Cancel</button>
|
||||
{{-- <button type="button" id="delete" class="btn btn-danger" value={{ $pin->id }} href="{{route('pbx.disable', $pin->id)}}">Delete</button> --}}
|
||||
<button class="btn btn-danger" id="delete"><a class="btn-link" href=" {{route('pbx.disable', $pin->id)}}">Disable</a></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-actions">
|
||||
|
||||
<button class="action-icon" id="disable" type="button"
|
||||
onclick="showModal({{ $pin->id }})" value={{ $pin->id }}>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
|
||||
fill="currentColor" class="bi bi-dash-circle" viewBox="0 0 16 16">
|
||||
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" />
|
||||
<path d="M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
{{-- <form method="POST" action={{ action('App\Http\Controllers\PBXController@disable') }} enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('post')
|
||||
|
||||
<div class="input-group" id="disable-pbx">
|
||||
<input type="hidden" class="form-control" id="disable" name="disable" value="{{$pin->email}}"/>
|
||||
<div class="input-group-append">
|
||||
<button class="hidden-button" type="submit">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-dash-circle" viewBox="0 0 16 16">
|
||||
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
|
||||
<path d="M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form> --}}
|
||||
|
||||
</div>
|
||||
|
||||
<span class="card-header">
|
||||
<svg class="card-image" viewBox="0 0 50 47" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M46.5833 45.3333C46.5833 45.3333 49.6666 45.3333 49.6666 42.2222C49.6666 39.1111 46.5832 29.7778 34.2499 29.7778C21.9166 29.7778 18.8333 39.1111 18.8333 42.2222C18.8333 45.3333 21.9166 45.3333 21.9166 45.3333H46.5833ZM21.9844 42.2222H46.5154C46.5299 42.2205 46.5442 42.2184 46.5586 42.216L46.5833 42.2098C46.5771 41.3884 46.0683 39.0053 44.2399 36.8587C42.5379 34.8458 39.5471 32.8889 34.2499 32.8889C28.9558 32.8889 25.965 34.8489 24.2599 36.8587C22.4315 39.0053 21.9197 41.3916 21.9166 42.2098C21.9392 42.2142 21.9618 42.2183 21.9844 42.2222V42.2222ZM34.2499 23.5556C35.8854 23.5556 37.4539 22.9 38.6104 21.7331C39.7669 20.5662 40.4166 18.9836 40.4166 17.3333C40.4166 15.6831 39.7669 14.1004 38.6104 12.9336C37.4539 11.7667 35.8854 11.1111 34.2499 11.1111C32.6144 11.1111 31.0459 11.7667 29.8894 12.9336C28.733 14.1004 28.0833 15.6831 28.0833 17.3333C28.0833 18.9836 28.733 20.5662 29.8894 21.7331C31.0459 22.9 32.6144 23.5556 34.2499 23.5556ZM43.4999 17.3333C43.4999 18.559 43.2607 19.7727 42.7958 20.905C42.3309 22.0374 41.6496 23.0663 40.7907 23.933C39.9317 24.7997 38.912 25.4872 37.7897 25.9562C36.6675 26.4253 35.4646 26.6667 34.2499 26.6667C33.0352 26.6667 31.8324 26.4253 30.7101 25.9562C29.5878 25.4872 28.5681 24.7997 27.7092 23.933C26.8502 23.0663 26.1689 22.0374 25.704 20.905C25.2392 19.7727 24.9999 18.559 24.9999 17.3333C24.9999 14.858 25.9745 12.484 27.7092 10.7337C29.4439 8.98333 31.7967 8 34.2499 8C36.7032 8 39.0559 8.98333 40.7907 10.7337C42.5254 12.484 43.4999 14.858 43.4999 17.3333V17.3333ZM21.7193 30.6489C20.4859 30.257 19.2145 29.9994 17.9268 29.8804C17.2032 29.811 16.4767 29.7768 15.7499 29.7778C3.41658 29.7778 0.333252 39.1111 0.333252 42.2222C0.333252 44.2973 1.36 45.3333 3.41659 45.3333H16.4159C15.9588 44.3621 15.7309 43.2972 15.7499 42.2222C15.7499 39.08 16.9123 35.8693 19.1108 33.1876C19.86 32.2729 20.7326 31.4173 21.7193 30.6489ZM15.5033 32.8889C10.3603 32.9511 7.44033 34.88 5.75992 36.8587C3.91917 39.0178 3.41659 41.4102 3.41659 42.2222H12.6666C12.6666 38.9711 13.6625 35.7324 15.5033 32.8889ZM4.95825 18.8889C4.95825 16.4135 5.9328 14.0396 7.66751 12.2892C9.40223 10.5389 11.755 9.55556 14.2083 9.55556C16.6615 9.55556 19.0143 10.5389 20.749 12.2892C22.4837 14.0396 23.4583 16.4135 23.4583 18.8889C23.4583 21.3642 22.4837 23.7382 20.749 25.4886C19.0143 27.2389 16.6615 28.2222 14.2083 28.2222C11.755 28.2222 9.40223 27.2389 7.66751 25.4886C5.9328 23.7382 4.95825 21.3642 4.95825 18.8889V18.8889ZM14.2083 12.6667C12.5728 12.6667 11.0042 13.3222 9.84776 14.4891C8.69129 15.656 8.04158 17.2387 8.04158 18.8889C8.04158 20.5391 8.69129 22.1218 9.84776 23.2887C11.0042 24.4556 12.5728 25.1111 14.2083 25.1111C15.8438 25.1111 17.4123 24.4556 18.5687 23.2887C19.7252 22.1218 20.3749 20.5391 20.3749 18.8889C20.3749 17.2387 19.7252 15.656 18.5687 14.4891C17.4123 13.3222 15.8438 12.6667 14.2083 12.6667Z"
|
||||
fill="#23A6F0" />
|
||||
</svg>
|
||||
<p class="card-name">{{ $pin->name }}</p>
|
||||
</span>
|
||||
|
||||
@if (is_null($pin->pin))
|
||||
<p class="card-details">N/A</p>
|
||||
@else
|
||||
<p class="card-details">{{ $pin->pin }}</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
const modals = document.querySelectorAll("[id=modal]");
|
||||
console.log(modals);
|
||||
|
||||
function showModal(id) {
|
||||
for (let i = 0; i < modals.length; i++) {
|
||||
if (modals[i].getAttribute('data-id') == id){
|
||||
modals[i].style.display="block";
|
||||
let backdrop = document.getElementById("overlay").style.display="block";
|
||||
document.body.style.overflow="hidden";
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function hideModal(id) {
|
||||
for (let i = 0; i < modals.length; i++) {
|
||||
if (modals[i].getAttribute('data-id') == id){
|
||||
modals[i].style.display="none";
|
||||
let backdrop = document.getElementById("overlay").style.display="none";
|
||||
document.body.style.overflow="unset";
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
22
resources/views/Admin/unauthorized.blade.php
Normal file
22
resources/views/Admin/unauthorized.blade.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
@extends('Layouts.layout')
|
||||
@section('Title', '401 - Unauthorized Access')
|
||||
@section('css')
|
||||
<link href="{{ asset('/css/unauthorizedAccess.css') }}" rel="stylesheet">
|
||||
@stop
|
||||
@section('Content')
|
||||
|
||||
<div class="main">
|
||||
<div class='card'>
|
||||
<img class="unauthorized" src="{{asset('assets/unauthorized.png')}}" alt="Teams logo">
|
||||
<div class='card-details'>
|
||||
<h1>401</h1>
|
||||
<h3>You do not have authorization to access this page.</h3>
|
||||
<h6>If you need assistance, please contact your supervisor.</h6>
|
||||
<p> Return to <a href="{{ url()->previous() }}">previous page</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
||||
|
||||
3
resources/views/Components/confirm.blade.php
Normal file
3
resources/views/Components/confirm.blade.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<div class="confirm-delete">
|
||||
|
||||
</div>
|
||||
53
resources/views/Components/sidenav.blade.php
Executable file
53
resources/views/Components/sidenav.blade.php
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
<div class="sidenav">
|
||||
@if ($state === 'Admin')
|
||||
<img id="logo-image" src="{{asset('/assets/admin-logo.png')}}" alt="Teams logo">
|
||||
@else
|
||||
<img id="logo-image" src="{{asset('/assets/user-logo.png')}}" alt="Teams logo">
|
||||
@endif
|
||||
|
||||
<div id="nav-items">
|
||||
<div class="nav-item">
|
||||
<svg class="icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.75 1.5H4.5C3.90326 1.5 3.33097 1.73705 2.90901 2.15901C2.48705 2.58097 2.25 3.15326 2.25 3.75V20.25C2.25 20.8467 2.48705 21.419 2.90901 21.841C3.33097 22.2629 3.90326 22.5 4.5 22.5H19.5C20.0967 22.5 20.669 22.2629 21.091 21.841C21.5129 21.419 21.75 20.8467 21.75 20.25V12C21.75 11.4033 21.5129 10.831 21.091 10.409C20.669 9.98705 20.0967 9.75 19.5 9.75H15V3.75C15 3.15326 14.7629 2.58097 14.341 2.15901C13.919 1.73705 13.3467 1.5 12.75 1.5ZM3 20.25V3.75C3 3.35218 3.15804 2.97064 3.43934 2.68934C3.72064 2.40804 4.10218 2.25 4.5 2.25H12.75C13.1478 2.25 13.5294 2.40804 13.8107 2.68934C14.092 2.97064 14.25 3.35218 14.25 3.75V21.75H11.25V16.875C11.25 16.7755 11.2105 16.6802 11.1402 16.6098C11.0698 16.5395 10.9745 16.5 10.875 16.5H6.375C6.27554 16.5 6.18016 16.5395 6.10983 16.6098C6.03951 16.6802 6 16.7755 6 16.875V21.75H4.5C4.10218 21.75 3.72064 21.592 3.43934 21.3107C3.15804 21.0294 3 20.6478 3 20.25V20.25ZM6.75 21.75V17.25H10.5V21.75H6.75ZM19.5 10.5C19.8978 10.5 20.2794 10.658 20.5607 10.9393C20.842 11.2206 21 11.6022 21 12V20.25C21 20.6478 20.842 21.0294 20.5607 21.3107C20.2794 21.592 19.8978 21.75 19.5 21.75H15V10.5H19.5Z" fill="#4C4C4C"/><path d="M4.875 6H6.375C6.47446 6 6.56984 5.96049 6.64017 5.89016C6.71049 5.81984 6.75 5.72446 6.75 5.625V4.125C6.75 4.02554 6.71049 3.93016 6.64017 3.85984C6.56984 3.78951 6.47446 3.75 6.375 3.75H4.875C4.77554 3.75 4.68016 3.78951 4.60984 3.85984C4.53951 3.93016 4.5 4.02554 4.5 4.125V5.625C4.5 5.72446 4.53951 5.81984 4.60984 5.89016C4.68016 5.96049 4.77554 6 4.875 6ZM5.25 4.5H6V5.25H5.25V4.5ZM4.875 9.75H6.375C6.47446 9.75 6.56984 9.71049 6.64017 9.64017C6.71049 9.56984 6.75 9.47446 6.75 9.375V7.875C6.75 7.77554 6.71049 7.68016 6.64017 7.60983C6.56984 7.53951 6.47446 7.5 6.375 7.5H4.875C4.77554 7.5 4.68016 7.53951 4.60984 7.60983C4.53951 7.68016 4.5 7.77554 4.5 7.875V9.375C4.5 9.47446 4.53951 9.56984 4.60984 9.64017C4.68016 9.71049 4.77554 9.75 4.875 9.75ZM5.25 8.25H6V9H5.25V8.25ZM6.375 13.5C6.47446 13.5 6.56984 13.4605 6.64017 13.3902C6.71049 13.3198 6.75 13.2245 6.75 13.125V11.625C6.75 11.5255 6.71049 11.4302 6.64017 11.3598C6.56984 11.2895 6.47446 11.25 6.375 11.25H4.875C4.77554 11.25 4.68016 11.2895 4.60984 11.3598C4.53951 11.4302 4.5 11.5255 4.5 11.625V13.125C4.5 13.2245 4.53951 13.3198 4.60984 13.3902C4.68016 13.4605 4.77554 13.5 4.875 13.5H6.375ZM5.25 12H6V12.75H5.25V12ZM10.875 6H12.375C12.4745 6 12.5698 5.96049 12.6402 5.89016C12.7105 5.81984 12.75 5.72446 12.75 5.625V4.125C12.75 4.02554 12.7105 3.93016 12.6402 3.85984C12.5698 3.78951 12.4745 3.75 12.375 3.75H10.875C10.7755 3.75 10.6802 3.78951 10.6098 3.85984C10.5395 3.93016 10.5 4.02554 10.5 4.125V5.625C10.5 5.72446 10.5395 5.81984 10.6098 5.89016C10.6802 5.96049 10.7755 6 10.875 6ZM11.25 4.5H12V5.25H11.25V4.5ZM10.875 9.75H12.375C12.4745 9.75 12.5698 9.71049 12.6402 9.64017C12.7105 9.56984 12.75 9.47446 12.75 9.375V7.875C12.75 7.77554 12.7105 7.68016 12.6402 7.60983C12.5698 7.53951 12.4745 7.5 12.375 7.5H10.875C10.7755 7.5 10.6802 7.53951 10.6098 7.60983C10.5395 7.68016 10.5 7.77554 10.5 7.875V9.375C10.5 9.47446 10.5395 9.56984 10.6098 9.64017C10.6802 9.71049 10.7755 9.75 10.875 9.75ZM11.25 8.25H12V9H11.25V8.25ZM10.875 13.5H12.375C12.4745 13.5 12.5698 13.4605 12.6402 13.3902C12.7105 13.3198 12.75 13.2245 12.75 13.125V11.625C12.75 11.5255 12.7105 11.4302 12.6402 11.3598C12.5698 11.2895 12.4745 11.25 12.375 11.25H10.875C10.7755 11.25 10.6802 11.2895 10.6098 11.3598C10.5395 11.4302 10.5 11.5255 10.5 11.625V13.125C10.5 13.2245 10.5395 13.3198 10.6098 13.3902C10.6802 13.4605 10.7755 13.5 10.875 13.5ZM11.25 12H12V12.75H11.25V12ZM17.625 14.25H19.125C19.2245 14.25 19.3198 14.2105 19.3902 14.1402C19.4605 14.0698 19.5 13.9745 19.5 13.875V12.375C19.5 12.2755 19.4605 12.1802 19.3902 12.1098C19.3198 12.0395 19.2245 12 19.125 12H17.625C17.5255 12 17.4302 12.0395 17.3598 12.1098C17.2895 12.1802 17.25 12.2755 17.25 12.375V13.875C17.25 13.9745 17.2895 14.0698 17.3598 14.1402C17.4302 14.2105 17.5255 14.25 17.625 14.25ZM18 12.75H18.75V13.5H18V12.75ZM17.625 18H19.125C19.2245 18 19.3198 17.9605 19.3902 17.8902C19.4605 17.8198 19.5 17.7245 19.5 17.625V16.125C19.5 16.0255 19.4605 15.9302 19.3902 15.8598C19.3198 15.7895 19.2245 15.75 19.125 15.75H17.625C17.5255 15.75 17.4302 15.7895 17.3598 15.8598C17.2895 15.9302 17.25 16.0255 17.25 16.125V17.625C17.25 17.7245 17.2895 17.8198 17.3598 17.8902C17.4302 17.9605 17.5255 18 17.625 18ZM18 16.5H18.75V17.25H18V16.5Z" fill="#4C4C4C"/></svg>
|
||||
<a class="nav-text" href="{{route('user.index')}}">Home</a>
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
<svg class="icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.16 10.87C12.06 10.86 11.94 10.86 11.83 10.87C9.45 10.79 7.56 8.84 7.56 6.44C7.56 3.99 9.54 2 12 2C14.45 2 16.44 3.99 16.44 6.44C16.43 8.84 14.54 10.79 12.16 10.87Z" stroke="#808080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M7.15997 14.56C4.73997 16.18 4.73997 18.82 7.15997 20.43C9.90997 22.27 14.42 22.27 17.17 20.43C19.59 18.81 19.59 16.17 17.17 14.56C14.43 12.73 9.91997 12.73 7.15997 14.56Z" stroke="#808080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
|
||||
@if ($state === 'Admin')
|
||||
<a class="nav-text" href="{{route('employees')}}">Directory</a>
|
||||
@else
|
||||
<a class="nav-text" href="{{route('user.employees')}}">Directory</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($state === 'Admin')
|
||||
<div class="nav-item">
|
||||
|
||||
<svg class="icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.52632 22.7368H2.64C2.7703 23.1054 3.01141 23.4246 3.33027 23.6508C3.64914 23.8769 4.03014 23.9989 4.42105 24H9.47368C9.8646 23.9989 10.2456 23.8769 10.5645 23.6508C10.8833 23.4246 11.1244 23.1054 11.2547 22.7368H21.4737C22.1437 22.7368 22.7863 22.4707 23.2601 21.9969C23.7338 21.5231 24 20.8805 24 20.2105V3.78947C24 3.11945 23.7338 2.47687 23.2601 2.0031C22.7863 1.52932 22.1437 1.26316 21.4737 1.26316H11.2547C11.1244 0.8946 10.8833 0.575367 10.5645 0.349224C10.2456 0.123081 9.8646 0.00109864 9.47368 0H4.42105C4.03014 0.00109864 3.64914 0.123081 3.33027 0.349224C3.01141 0.575367 2.7703 0.8946 2.64 1.26316H2.52632C1.8563 1.26316 1.21372 1.52932 0.739941 2.0031C0.266165 2.47687 0 3.11945 0 3.78947V20.2105C0 20.8805 0.266165 21.5231 0.739941 21.9969C1.21372 22.4707 1.8563 22.7368 2.52632 22.7368ZM22.7368 3.78947V20.2105C22.7368 20.5455 22.6038 20.8668 22.3669 21.1037C22.13 21.3406 21.8087 21.4737 21.4737 21.4737H11.3684V20.2105H20.8421C21.0096 20.2105 21.1703 20.144 21.2887 20.0255C21.4071 19.9071 21.4737 19.7465 21.4737 19.5789C21.4737 19.4114 21.4071 19.2508 21.2887 19.1324C21.1703 19.0139 21.0096 18.9474 20.8421 18.9474H11.3684V2.52632H21.4737C21.8087 2.52632 22.13 2.6594 22.3669 2.89629C22.6038 3.13317 22.7368 3.45446 22.7368 3.78947ZM4.42105 1.26316H9.47368C9.64119 1.26316 9.80183 1.3297 9.92028 1.44814C10.0387 1.56659 10.1053 1.72723 10.1053 1.89474V22.1053C10.1053 22.2728 10.0387 22.4334 9.92028 22.5519C9.80183 22.6703 9.64119 22.7368 9.47368 22.7368H4.42105C4.25355 22.7368 4.0929 22.6703 3.97446 22.5519C3.85601 22.4334 3.78947 22.2728 3.78947 22.1053V1.89474C3.78947 1.72723 3.85601 1.56659 3.97446 1.44814C4.0929 1.3297 4.25355 1.26316 4.42105 1.26316ZM1.26316 3.78947C1.26316 3.45446 1.39624 3.13317 1.63313 2.89629C1.87002 2.6594 2.19131 2.52632 2.52632 2.52632V21.4737C2.19131 21.4737 1.87002 21.3406 1.63313 21.1037C1.39624 20.8668 1.26316 20.5455 1.26316 20.2105V3.78947Z" fill="#808080"/>
|
||||
<path d="M2.52632 22.7368H2.64C2.7703 23.1054 3.01141 23.4246 3.33027 23.6508C3.64914 23.8769 4.03014 23.9989 4.42105 24H9.47368C9.8646 23.9989 10.2456 23.8769 10.5645 23.6508C10.8833 23.4246 11.1244 23.1054 11.2547 22.7368H21.4737C22.1437 22.7368 22.7863 22.4707 23.2601 21.9969C23.7338 21.5231 24 20.8805 24 20.2105V3.78947C24 3.11945 23.7338 2.47687 23.2601 2.0031C22.7863 1.52932 22.1437 1.26316 21.4737 1.26316H11.2547C11.1244 0.8946 10.8833 0.575367 10.5645 0.349224C10.2456 0.123081 9.8646 0.00109864 9.47368 0H4.42105C4.03014 0.00109864 3.64914 0.123081 3.33027 0.349224C3.01141 0.575367 2.7703 0.8946 2.64 1.26316H2.52632C1.8563 1.26316 1.21372 1.52932 0.739941 2.0031C0.266165 2.47687 0 3.11945 0 3.78947V20.2105C0 20.8805 0.266165 21.5231 0.739941 21.9969C1.21372 22.4707 1.8563 22.7368 2.52632 22.7368ZM22.7368 3.78947V20.2105C22.7368 20.5455 22.6038 20.8668 22.3669 21.1037C22.13 21.3406 21.8087 21.4737 21.4737 21.4737H11.3684V20.2105H20.8421C21.0096 20.2105 21.1703 20.144 21.2887 20.0255C21.4071 19.9071 21.4737 19.7465 21.4737 19.5789C21.4737 19.4114 21.4071 19.2508 21.2887 19.1324C21.1703 19.0139 21.0096 18.9474 20.8421 18.9474H11.3684V2.52632H21.4737C21.8087 2.52632 22.13 2.6594 22.3669 2.89629C22.6038 3.13317 22.7368 3.45446 22.7368 3.78947ZM4.42105 1.26316H9.47368C9.64119 1.26316 9.80183 1.3297 9.92028 1.44814C10.0387 1.56659 10.1053 1.72723 10.1053 1.89474V22.1053C10.1053 22.2728 10.0387 22.4334 9.92028 22.5519C9.80183 22.6703 9.64119 22.7368 9.47368 22.7368H4.42105C4.25355 22.7368 4.0929 22.6703 3.97446 22.5519C3.85601 22.4334 3.78947 22.2728 3.78947 22.1053V1.89474C3.78947 1.72723 3.85601 1.56659 3.97446 1.44814C4.0929 1.3297 4.25355 1.26316 4.42105 1.26316ZM1.26316 3.78947C1.26316 3.45446 1.39624 3.13317 1.63313 2.89629C1.87002 2.6594 2.19131 2.52632 2.52632 2.52632V21.4737C2.19131 21.4737 1.87002 21.3406 1.63313 21.1037C1.39624 20.8668 1.26316 20.5455 1.26316 20.2105V3.78947Z" stroke="#808080"/>
|
||||
<path d="M13.2631 8.2106H20.8421C21.0096 8.2106 21.1702 8.14406 21.2887 8.02562C21.4071 7.90717 21.4736 7.74653 21.4736 7.57902V4.42113C21.4736 4.25362 21.4071 4.09298 21.2887 3.97454C21.1702 3.85609 21.0096 3.78955 20.8421 3.78955H13.2631C13.0956 3.78955 12.935 3.85609 12.8165 3.97454C12.6981 4.09298 12.6315 4.25362 12.6315 4.42113V7.57902C12.6315 7.74653 12.6981 7.90717 12.8165 8.02562C12.935 8.14406 13.0956 8.2106 13.2631 8.2106ZM13.8947 5.05271H20.2105V6.94745H13.8947V5.05271ZM13.2631 10.7369H14.5263C14.6938 10.7369 14.8544 10.6704 14.9729 10.5519C15.0913 10.4335 15.1578 10.2728 15.1578 10.1053C15.1578 9.93784 15.0913 9.77719 14.9729 9.65875C14.8544 9.5403 14.6938 9.47376 14.5263 9.47376H13.2631C13.0956 9.47376 12.935 9.5403 12.8165 9.65875C12.6981 9.77719 12.6315 9.93784 12.6315 10.1053C12.6315 10.2728 12.6981 10.4335 12.8165 10.5519C12.935 10.6704 13.0956 10.7369 13.2631 10.7369ZM17.6842 9.47376H16.421C16.2535 9.47376 16.0929 9.5403 15.9744 9.65875C15.856 9.77719 15.7894 9.93784 15.7894 10.1053C15.7894 10.2728 15.856 10.4335 15.9744 10.5519C16.0929 10.6704 16.2535 10.7369 16.421 10.7369H17.6842C17.8517 10.7369 18.0123 10.6704 18.1308 10.5519C18.2492 10.4335 18.3157 10.2728 18.3157 10.1053C18.3157 9.93784 18.2492 9.77719 18.1308 9.65875C18.0123 9.5403 17.8517 9.47376 17.6842 9.47376ZM20.8421 9.47376H19.5789C19.4114 9.47376 19.2507 9.5403 19.1323 9.65875C19.0139 9.77719 18.9473 9.93784 18.9473 10.1053C18.9473 10.2728 19.0139 10.4335 19.1323 10.5519C19.2507 10.6704 19.4114 10.7369 19.5789 10.7369H20.8421C21.0096 10.7369 21.1702 10.6704 21.2887 10.5519C21.4071 10.4335 21.4736 10.2728 21.4736 10.1053C21.4736 9.93784 21.4071 9.77719 21.2887 9.65875C21.1702 9.5403 21.0096 9.47376 20.8421 9.47376ZM13.2631 12.6317H14.5263C14.6938 12.6317 14.8544 12.5651 14.9729 12.4467C15.0913 12.3282 15.1578 12.1676 15.1578 12.0001C15.1578 11.8326 15.0913 11.6719 14.9729 11.5535C14.8544 11.435 14.6938 11.3685 14.5263 11.3685H13.2631C13.0956 11.3685 12.935 11.435 12.8165 11.5535C12.6981 11.6719 12.6315 11.8326 12.6315 12.0001C12.6315 12.1676 12.6981 12.3282 12.8165 12.4467C12.935 12.5651 13.0956 12.6317 13.2631 12.6317ZM17.6842 11.3685H16.421C16.2535 11.3685 16.0929 11.435 15.9744 11.5535C15.856 11.6719 15.7894 11.8326 15.7894 12.0001C15.7894 12.1676 15.856 12.3282 15.9744 12.4467C16.0929 12.5651 16.2535 12.6317 16.421 12.6317H17.6842C17.8517 12.6317 18.0123 12.5651 18.1308 12.4467C18.2492 12.3282 18.3157 12.1676 18.3157 12.0001C18.3157 11.8326 18.2492 11.6719 18.1308 11.5535C18.0123 11.435 17.8517 11.3685 17.6842 11.3685ZM20.8421 11.3685H19.5789C19.4114 11.3685 19.2507 11.435 19.1323 11.5535C19.0139 11.6719 18.9473 11.8326 18.9473 12.0001C18.9473 12.1676 19.0139 12.3282 19.1323 12.4467C19.2507 12.5651 19.4114 12.6317 19.5789 12.6317H20.8421C21.0096 12.6317 21.1702 12.5651 21.2887 12.4467C21.4071 12.3282 21.4736 12.1676 21.4736 12.0001C21.4736 11.8326 21.4071 11.6719 21.2887 11.5535C21.1702 11.435 21.0096 11.3685 20.8421 11.3685ZM13.2631 14.5264H14.5263C14.6938 14.5264 14.8544 14.4599 14.9729 14.3414C15.0913 14.223 15.1578 14.0623 15.1578 13.8948C15.1578 13.7273 15.0913 13.5667 14.9729 13.4482C14.8544 13.3298 14.6938 13.2632 14.5263 13.2632H13.2631C13.0956 13.2632 12.935 13.3298 12.8165 13.4482C12.6981 13.5667 12.6315 13.7273 12.6315 13.8948C12.6315 14.0623 12.6981 14.223 12.8165 14.3414C12.935 14.4599 13.0956 14.5264 13.2631 14.5264ZM17.6842 13.2632H16.421C16.2535 13.2632 16.0929 13.3298 15.9744 13.4482C15.856 13.5667 15.7894 13.7273 15.7894 13.8948C15.7894 14.0623 15.856 14.223 15.9744 14.3414C16.0929 14.4599 16.2535 14.5264 16.421 14.5264H17.6842C17.8517 14.5264 18.0123 14.4599 18.1308 14.3414C18.2492 14.223 18.3157 14.0623 18.3157 13.8948C18.3157 13.7273 18.2492 13.5667 18.1308 13.4482C18.0123 13.3298 17.8517 13.2632 17.6842 13.2632ZM17.6842 15.158H16.421C16.2535 15.158 16.0929 15.2245 15.9744 15.343C15.856 15.4614 15.7894 15.622 15.7894 15.7896C15.7894 15.9571 15.856 16.1177 15.9744 16.2361C16.0929 16.3546 16.2535 16.4211 16.421 16.4211H17.6842C17.8517 16.4211 18.0123 16.3546 18.1308 16.2361C18.2492 16.1177 18.3157 15.9571 18.3157 15.7896C18.3157 15.622 18.2492 15.4614 18.1308 15.343C18.0123 15.2245 17.8517 15.158 17.6842 15.158ZM20.8421 13.2632H19.5789C19.4114 13.2632 19.2507 13.3298 19.1323 13.4482C19.0139 13.5667 18.9473 13.7273 18.9473 13.8948C18.9473 14.0623 19.0139 14.223 19.1323 14.3414C19.2507 14.4599 19.4114 14.5264 19.5789 14.5264H20.8421C21.0096 14.5264 21.1702 14.4599 21.2887 14.3414C21.4071 14.223 21.4736 14.0623 21.4736 13.8948C21.4736 13.7273 21.4071 13.5667 21.2887 13.4482C21.1702 13.3298 21.0096 13.2632 20.8421 13.2632Z" fill="#808080"/>
|
||||
</svg>
|
||||
|
||||
|
||||
<a class="nav-text" href="{{route("pbx")}}">PBX Pins</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($state === 'Admin')
|
||||
<div class="nav-item" id="logout">
|
||||
<svg class="icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M17.44 14.62L20 12.06L17.44 9.5" stroke="#A65959" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M9.76001 12.0601H19.93" stroke="#A65959" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M11.76 20C7.34001 20 3.76001 17 3.76001 12C3.76001 7 7.34001 4 11.76 4" stroke="#A65959" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
||||
<a class="nav-text" id="logout-text" href={{ route('logout') }}>Logout</a>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
19
resources/views/Layouts/layout.blade.php
Executable file
19
resources/views/Layouts/layout.blade.php
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="initial-scale=1, width=device-width" />
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="{{ asset('/favicon.ico') }}">
|
||||
|
||||
<title>@yield('Title')</title>
|
||||
<!-- Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
|
||||
@yield('css')
|
||||
|
||||
|
||||
@yield('Content')
|
||||
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue