Framework upgrade to Laravel 7

This commit is contained in:
Deon George 2020-08-23 11:37:08 +10:00
parent f8717480fd
commit f3282bed38
60 changed files with 3783 additions and 1785 deletions

View File

@ -9,9 +9,9 @@ LOG_CHANNEL=stack
DB_CONNECTION=mysql DB_CONNECTION=mysql
DB_HOST=127.0.0.1 DB_HOST=127.0.0.1
DB_PORT=3306 DB_PORT=3306
DB_DATABASE=homestead DB_DATABASE=laravel
DB_USERNAME=homestead DB_USERNAME=root
DB_PASSWORD=secret DB_PASSWORD=
BROADCAST_DRIVER=log BROADCAST_DRIVER=log
CACHE_DRIVER=file CACHE_DRIVER=file
@ -23,12 +23,14 @@ REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null REDIS_PASSWORD=null
REDIS_PORT=6379 REDIS_PORT=6379
MAIL_DRIVER=smtp MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525 MAIL_PORT=2525
MAIL_USERNAME=null MAIL_USERNAME=null
MAIL_PASSWORD=null MAIL_PASSWORD=null
MAIL_ENCRYPTION=null MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID= AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY= AWS_SECRET_ACCESS_KEY=

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
/storage/*.key /storage/*.key
/vendor /vendor
.env .env
.env.backup
.phpunit.result.cache .phpunit.result.cache
Homestead.json Homestead.json
Homestead.yaml Homestead.yaml

3
app/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
q*
!public/
!.gitignore

View File

@ -24,8 +24,7 @@ class Kernel extends ConsoleKernel
*/ */
protected function schedule(Schedule $schedule) protected function schedule(Schedule $schedule)
{ {
// $schedule->command('inspire') // $schedule->command('inspire')->hourly();
// ->hourly();
} }
/** /**

View File

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

View File

@ -1,32 +0,0 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
class ForgotPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset emails and
| includes a trait which assists in sending these notifications from
| your application to your users. Feel free to explore this trait.
|
*/
use SendsPasswordResetEmails;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}

View File

@ -3,6 +3,7 @@
namespace App\Http\Controllers\Auth; namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller class LoginController extends Controller
@ -25,7 +26,7 @@ class LoginController extends Controller
* *
* @var string * @var string
*/ */
protected $redirectTo = '/home'; protected $redirectTo = RouteServiceProvider::HOME;
/** /**
* Create a new controller instance. * Create a new controller instance.
@ -37,16 +38,16 @@ class LoginController extends Controller
$this->middleware('guest')->except('logout'); $this->middleware('guest')->except('logout');
} }
public function username() /**
{ * Show our themed login page
return 'mail'; */
} public function showLoginForm()
{
$login_note = '';
/** if (file_exists('login_note.txt'))
* Show our themed login page $login_note = file_get_contents('login_note.txt');
*/
public function showLoginForm() return view('adminlte::auth.login')->with('login_note',$login_note);
{ }
return view('adminlte::auth.login');
}
} }

View File

@ -1,72 +0,0 @@
<?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
class RegisterController extends Controller
{
/*
|--------------------------------------------------------------------------
| Register Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users as well as their
| validation and creation. By default this controller uses a trait to
| provide this functionality without requiring any additional code.
|
*/
use RegistersUsers;
/**
* Where to redirect users after registration.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'password' => ['required', 'string', 'min:8', 'confirmed'],
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return \App\User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);
}
}

View File

@ -1,39 +0,0 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
class ResetPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/
use ResetsPasswords;
/**
* Where to redirect users after resetting their password.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}

View File

@ -0,0 +1,33 @@
<?php
namespace App\Http\Controllers\Auth;
use Illuminate\Support\Facades\Auth;
use App\Http\Controllers\Controller;
use Socialite;
class SocialLoginController extends Controller
{
public function redirectToProvider($provider)
{
return Socialite::with($provider)->redirect();
}
public function handleProviderCallback($provider)
{
$openiduser = Socialite::with($provider)->user();
$user = Socialite::with($provider)->findOrCreateUser($openiduser);
Auth::login($user,FALSE);
/*
if (! $user->profile_update)
{
return redirect()->to(url('settings'));
}
*/
return redirect()->intended();
}
}

View File

@ -1,41 +0,0 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\VerifiesEmails;
class VerificationController extends Controller
{
/*
|--------------------------------------------------------------------------
| Email Verification Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling email verification for any
| user that recently registered with the application. Emails may also
| be re-sent if the user didn't receive the original email message.
|
*/
use VerifiesEmails;
/**
* Where to redirect users after verification.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
$this->middleware('signed')->only('verify');
$this->middleware('throttle:6,1')->only('verify', 'resend');
}
}

View File

@ -2,10 +2,10 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; 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 class Controller extends BaseController
{ {

View File

@ -14,11 +14,13 @@ class Kernel extends HttpKernel
* @var array * @var array
*/ */
protected $middleware = [ protected $middleware = [
// \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class,
\Fruitcake\Cors\HandleCors::class,
\App\Http\Middleware\CheckForMaintenanceMode::class, \App\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class, \App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::class,
]; ];
/** /**
@ -39,7 +41,7 @@ class Kernel extends HttpKernel
'api' => [ 'api' => [
'throttle:60,1', 'throttle:60,1',
'bindings', \Illuminate\Routing\Middleware\SubstituteBindings::class,
], ],
]; ];
@ -57,24 +59,9 @@ class Kernel extends HttpKernel
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
]; ];
/**
* The priority-sorted list of middleware.
*
* This forces non-global middleware to always be in the given order.
*
* @var array
*/
protected $middlewarePriority = [
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\Authenticate::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Illuminate\Auth\Middleware\Authorize::class,
];
} }

View File

@ -10,7 +10,7 @@ class Authenticate extends Middleware
* Get the path the user should be redirected to when they are not authenticated. * Get the path the user should be redirected to when they are not authenticated.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @return string * @return string|null
*/ */
protected function redirectTo($request) protected function redirectTo($request)
{ {

View File

@ -2,6 +2,7 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use App\Providers\RouteServiceProvider;
use Closure; use Closure;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
@ -18,7 +19,7 @@ class RedirectIfAuthenticated
public function handle($request, Closure $next, $guard = null) public function handle($request, Closure $next, $guard = null)
{ {
if (Auth::guard($guard)->check()) { if (Auth::guard($guard)->check()) {
return redirect('/home'); return redirect(RouteServiceProvider::HOME);
} }
return $next($request); return $next($request);

View 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(),
];
}
}

View File

@ -2,15 +2,15 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware; use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware class TrustProxies extends Middleware
{ {
/** /**
* The trusted proxies for this application. * The trusted proxies for this application.
* *
* @var array * @var array|string|null
*/ */
protected $proxies; protected $proxies;

View File

@ -6,13 +6,6 @@ use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware class VerifyCsrfToken extends Middleware
{ {
/**
* Indicates whether the XSRF-TOKEN cookie should be set on the response.
*
* @var bool
*/
protected $addHttpCookie = true;
/** /**
* The URIs that should be excluded from CSRF verification. * The URIs that should be excluded from CSRF verification.
* *

View File

@ -2,8 +2,8 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
class AuthServiceProvider extends ServiceProvider class AuthServiceProvider extends ServiceProvider
{ {

View File

@ -2,8 +2,8 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast; use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
class BroadcastServiceProvider extends ServiceProvider class BroadcastServiceProvider extends ServiceProvider
{ {

View File

@ -2,10 +2,10 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\Facades\Event;
use Illuminate\Auth\Events\Registered; use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;
class EventServiceProvider extends ServiceProvider class EventServiceProvider extends ServiceProvider
{ {
@ -14,11 +14,7 @@ class EventServiceProvider extends ServiceProvider
* *
* @var array * @var array
*/ */
protected $listen = [ protected $listen = [];
Registered::class => [
SendEmailVerificationNotification::class,
],
];
/** /**
* Register any events for your application. * Register any events for your application.

View File

@ -2,8 +2,8 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Route;
class RouteServiceProvider extends ServiceProvider class RouteServiceProvider extends ServiceProvider
{ {
@ -16,6 +16,13 @@ class RouteServiceProvider extends ServiceProvider
*/ */
protected $namespace = 'App\Http\Controllers'; protected $namespace = 'App\Http\Controllers';
/**
* The path to the "home" route for your application.
*
* @var string
*/
public const HOME = '/home';
/** /**
* Define your route model bindings, pattern filters, etc. * Define your route model bindings, pattern filters, etc.
* *

View File

@ -2,9 +2,9 @@
namespace App; namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable class User extends Authenticatable
{ {

View File

@ -8,20 +8,22 @@
], ],
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^7.1.3", "php": "^7.2.5",
"adldap2/adldap2-laravel": "^6.0", "adldap2/adldap2-laravel": "^6.0",
"fideloper/proxy": "^4.0", "fideloper/proxy": "^4.2",
"laravel/framework": "5.8.*", "fruitcake/laravel-cors": "^2.0",
"laravel/tinker": "^1.0", "guzzlehttp/guzzle": "^6.3",
"leenooks/laravel": "^0.3.7" "laravel/framework": "^7.22.2",
"leenooks/laravel": "^7.0",
"leenooks/ldap": "dev-SANDPIT"
}, },
"require-dev": { "require-dev": {
"beyondcode/laravel-dump-server": "^1.0", "facade/ignition": "^2.0",
"filp/whoops": "^2.0", "fzaninotto/faker": "^1.9.1",
"fzaninotto/faker": "^1.4", "laravel/tinker": "^2.0",
"mockery/mockery": "^1.0", "mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^3.0", "nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^7.5" "phpunit/phpunit": "^8.5"
}, },
"config": { "config": {
"optimize-autoloader": true, "optimize-autoloader": true,
@ -51,6 +53,10 @@
{ {
"type": "vcs", "type": "vcs",
"url": "https://dev.leenooks.net/leenooks/laravel" "url": "https://dev.leenooks.net/leenooks/laravel"
},
{
"type": "path",
"url": "ldap"
} }
], ],
"minimum-stability": "dev", "minimum-stability": "dev",

4680
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,7 @@ return [
'name' => env('APP_NAME', 'phpLDAPadmin'), 'name' => env('APP_NAME', 'phpLDAPadmin'),
'name_html_long' => env('APP_NAME_HTML_LONG', '<b>php</b>LDAPadmin'), 'name_html_long' => env('APP_NAME_HTML_LONG', '<b>php</b>LDAPadmin'),
'version' => trim(file_get_contents(__DIR__.'/../public/VERSION')),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -40,7 +41,7 @@ return [
| |
*/ */
'debug' => env('APP_DEBUG', false), 'debug' => (bool) env('APP_DEBUG', false),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -179,9 +180,10 @@ return [
/* /*
* Other Service Providers... * Other Service Providers...
*/ */
Acacha\User\Providers\GuestUserServiceProvider::class,
Orchestra\Asset\AssetServiceProvider::class, Orchestra\Asset\AssetServiceProvider::class,
Collective\Html\HtmlServiceProvider::class, Collective\Html\HtmlServiceProvider::class,
//\SocialiteProviders\Manager\ServiceProvider::class,
], ],
/* /*
@ -214,8 +216,8 @@ return [
'Event' => Illuminate\Support\Facades\Event::class, 'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class, 'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class, 'Gate' => Illuminate\Support\Facades\Gate::class,
'Gravatar' => Creativeorange\Gravatar\Facades\Gravatar::class,
'Hash' => Illuminate\Support\Facades\Hash::class, 'Hash' => Illuminate\Support\Facades\Hash::class,
'Http' => Illuminate\Support\Facades\Http::class,
'Lang' => Illuminate\Support\Facades\Lang::class, 'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class, 'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class, 'Mail' => Illuminate\Support\Facades\Mail::class,

View File

@ -97,7 +97,21 @@ return [
'provider' => 'users', 'provider' => 'users',
'table' => 'password_resets', 'table' => 'password_resets',
'expire' => 60, '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,
]; ];

View File

@ -37,7 +37,7 @@ return [
'app_id' => env('PUSHER_APP_ID'), 'app_id' => env('PUSHER_APP_ID'),
'options' => [ 'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'), 'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true, 'useTLS' => true,
], ],
], ],

View File

@ -39,6 +39,7 @@ return [
'array' => [ 'array' => [
'driver' => 'array', 'driver' => 'array',
'serialize' => false,
], ],
'database' => [ 'database' => [
@ -82,6 +83,7 @@ return [
'secret' => env('AWS_SECRET_ACCESS_KEY'), 'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
], ],
], ],

34
config/cors.php Normal file
View File

@ -0,0 +1,34 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/
'paths' => ['api/*'],
'allowed_methods' => ['*'],
'allowed_origins' => ['*'],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => false,
];

View File

@ -37,6 +37,7 @@ return [
'sqlite' => [ 'sqlite' => [
'driver' => 'sqlite', 'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')), 'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '', 'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
@ -44,6 +45,7 @@ return [
'mysql' => [ 'mysql' => [
'driver' => 'mysql', 'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'), 'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'), 'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
@ -63,6 +65,7 @@ return [
'pgsql' => [ 'pgsql' => [
'driver' => 'pgsql', 'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'), 'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'), 'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
@ -77,6 +80,7 @@ return [
'sqlsrv' => [ 'sqlsrv' => [
'driver' => 'sqlsrv', 'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'), 'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'), 'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
@ -115,25 +119,27 @@ return [
'redis' => [ 'redis' => [
'client' => env('REDIS_CLIENT', 'predis'), 'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [ 'options' => [
'cluster' => env('REDIS_CLUSTER', 'predis'), 'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => Str::slug(env('APP_NAME', 'laravel'), '_').'_database_', 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
], ],
'default' => [ 'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', 0), 'database' => env('REDIS_DB', '0'),
], ],
'cache' => [ 'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', 1), 'database' => env('REDIS_CACHE_DB', '1'),
], ],
], ],

View File

@ -37,7 +37,7 @@ return [
| may even configure multiple disks of the same driver. Defaults have | may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options. | been setup for each driver as an example of the required options.
| |
| Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace" | Supported Drivers: "local", "ftp", "sftp", "s3"
| |
*/ */
@ -62,8 +62,24 @@ return [
'region' => env('AWS_DEFAULT_REGION'), 'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'), 'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'), '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'),
],
]; ];

View File

@ -1,5 +1,6 @@
<?php <?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler; use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler; use Monolog\Handler\SyslogUdpHandler;
@ -89,6 +90,15 @@ return [
'driver' => 'errorlog', 'driver' => 'errorlog',
'level' => 'debug', 'level' => 'debug',
], ],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
], ],
]; ];

View File

@ -4,45 +4,73 @@ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Mail Driver | Default Mailer
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Laravel supports both SMTP and PHP's "mail" function as drivers for the | This option controls the default mailer that is used to send any email
| sending of e-mail. You may specify which one you're using throughout | messages sent by your application. Alternative mailers may be setup
| your application here. By default, Laravel is setup for SMTP mail. | and used as needed; however, this mailer will be used by default.
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
| "sparkpost", "postmark", "log", "array"
| |
*/ */
'driver' => env('MAIL_DRIVER', 'smtp'), 'default' => env('MAIL_MAILER', 'smtp'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| SMTP Host Address | Mailer Configurations
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Here you may provide the host address of the SMTP server used by your | Here you may configure all of the mailers used by your application plus
| applications. A default option is provided that is compatible with | their respective settings. Several examples have been configured for
| the Mailgun mail service which will provide reliable deliveries. | 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"
| |
*/ */
'host' => env('MAIL_HOST', 'smtp.mailgun.org'), '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',
| SMTP Host Port ],
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to deliver e-mails to
| users of the application. Like the host we have set this value to
| stay compatible with the Mailgun e-mail application by default.
|
*/
'port' => env('MAIL_PORT', 587), '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',
],
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -60,47 +88,6 @@ return [
'name' => env('MAIL_FROM_NAME', 'Example'), 'name' => env('MAIL_FROM_NAME', 'Example'),
], ],
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Markdown Mail Settings | Markdown Mail Settings
@ -120,17 +107,4 @@ return [
], ],
], ],
/*
|--------------------------------------------------------------------------
| Log Channel
|--------------------------------------------------------------------------
|
| If you are using the "log" driver, you may specify the logging channel
| if you prefer to keep mail messages separate from other log entries
| for simpler reading. Otherwise, the default channel will be used.
|
*/
'log_channel' => env('MAIL_LOG_CHANNEL'),
]; ];

View File

@ -55,6 +55,7 @@ return [
'secret' => env('AWS_SECRET_ACCESS_KEY'), 'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'your-queue-name'), 'queue' => env('SQS_QUEUE', 'your-queue-name'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
], ],
@ -80,6 +81,7 @@ return [
*/ */
'failed' => [ 'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
'database' => env('DB_CONNECTION', 'mysql'), 'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs', 'table' => 'failed_jobs',
], ],

View File

@ -8,9 +8,9 @@ return [
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This file is for storing the credentials for third party services such | This file is for storing the credentials for third party services such
| as Stripe, Mailgun, SparkPost and others. This file provides a sane | as Mailgun, Postmark, AWS and more. This file provides the de facto
| default location for this type of information, allowing packages | location for this type of information, allowing packages to have
| to have a conventional place to find your various credentials. | a conventional file to locate the various service credentials.
| |
*/ */
@ -30,18 +30,4 @@ return [
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
], ],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
'webhook' => [
'secret' => env('STRIPE_WEBHOOK_SECRET'),
'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300),
],
],
]; ];

View File

@ -92,10 +92,12 @@ return [
| Session Cache Store | Session Cache Store
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| When using the "apc", "memcached", or "dynamodb" session drivers you may | 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 | list a cache store that should be used for these sessions. This value
| must match with one of the application's configured cache "stores". | must match with one of the application's configured cache "stores".
| |
| Affects: "apc", "dynamodb", "memcached", "redis"
|
*/ */
'store' => env('SESSION_STORE', null), 'store' => env('SESSION_STORE', null),
@ -166,7 +168,7 @@ return [
| |
*/ */
'secure' => env('SESSION_SECURE_COOKIE', false), 'secure' => env('SESSION_SECURE_COOKIE'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -188,12 +190,12 @@ return [
| |
| This option determines how your cookies behave when cross-site requests | This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we | take place, and can be used to mitigate CSRF attacks. By default, we
| do not enable this as other CSRF protection services are in place. | will set this value to "lax" since this is a secure default value.
| |
| Supported: "lax", "strict" | Supported: "lax", "strict", "none", null
| |
*/ */
'same_site' => null, 'same_site' => 'lax',
]; ];

View File

@ -1,10 +1,10 @@
<?php <?php
/* @var $factory \Illuminate\Database\Eloquent\Factory */ /** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\User; use App\User;
use Illuminate\Support\Str;
use Faker\Generator as Faker; use Faker\Generator as Faker;
use Illuminate\Support\Str;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@ -11,6 +11,6 @@ class DatabaseSeeder extends Seeder
*/ */
public function run() public function run()
{ {
// $this->call(UsersTableSeeder::class); // $this->call(UserSeeder::class);
} }
} }

0
doc/demo-reset.sh Executable file → Normal file
View File

0
doc/uidpool.schema Executable file → Normal file
View File

28
ldap/composer.json Normal file
View File

@ -0,0 +1,28 @@
{
"name": "leenooks/ldap",
"description": "LDAP Library",
"type": "library",
"authors": [
{
"name": "Deon George",
"email": "deon@leenooks.net"
}
],
"require": {
"php": ">=7.2",
"ext-ldap": "*",
"adldap2/adldap2-laravel": "^6.0"
},
"autoload": {
"psr-4": {
"Leenooks\\LDAP\\": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"Leenooks\\LDAP\\LaravelServiceProvider"
]
}
}
}

View File

@ -5,22 +5,17 @@
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch", "watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll", "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 --config=node_modules/laravel-mix/setup/webpack.config.js", "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", "prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
}, },
"devDependencies": { "devDependencies": {
"axios": "^0.18", "axios": "^0.19",
"bootstrap": "^4.0.0", "cross-env": "^7.0",
"cross-env": "^5.1", "laravel-mix": "^5.0.1",
"jquery": "^3.2", "lodash": "^4.17.19",
"laravel-mix": "^4.0.7", "resolve-url-loader": "^3.1.0",
"lodash": "^4.17.5",
"popper.js": "^1.12",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2", "sass": "^1.15.2",
"sass-loader": "^7.1.0", "sass-loader": "^8.0.0"
"vue": "^2.5.17",
"vue-template-compiler": "^2.6.10"
} }
} }

View File

@ -1,18 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false" <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupStaticAttributes="false" xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php" bootstrap="vendor/autoload.php"
colors="true" colors="true"
convertErrorsToExceptions="true" >
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites> <testsuites>
<testsuite name="Unit"> <testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory> <directory suffix="Test.php">./tests/Unit</directory>
</testsuite> </testsuite>
<testsuite name="Feature"> <testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory> <directory suffix="Test.php">./tests/Feature</directory>
</testsuite> </testsuite>
@ -26,8 +21,11 @@
<server name="APP_ENV" value="testing"/> <server name="APP_ENV" value="testing"/>
<server name="BCRYPT_ROUNDS" value="4"/> <server name="BCRYPT_ROUNDS" value="4"/>
<server name="CACHE_DRIVER" value="array"/> <server name="CACHE_DRIVER" value="array"/>
<server name="MAIL_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="QUEUE_CONNECTION" value="sync"/>
<server name="SESSION_DRIVER" value="array"/> <server name="SESSION_DRIVER" value="array"/>
<server name="TELESCOPE_ENABLED" value="false"/>
</php> </php>
</phpunit> </phpunit>

View File

@ -14,7 +14,7 @@
RewriteCond %{REQUEST_URI} (.+)/$ RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301] RewriteRule ^ %1 [L,R=301]
# Handle Front Controller... # Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L] RewriteRule ^ index.php [L]

1
public/VERSION Normal file
View File

@ -0,0 +1 @@
v2.0.0-dev

32
resources/js/app.js vendored
View File

@ -1,33 +1 @@
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap'); require('./bootstrap');
window.Vue = require('vue');
/**
* The following block of code may be used to automatically register your
* Vue components. It will recursively scan this directory for the Vue
* components and automatically register them with their "basename".
*
* Eg. ./components/ExampleComponent.vue -> <example-component></example-component>
*/
// const files = require.context('./', true, /\.vue$/i);
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default));
Vue.component('example-component', require('./components/ExampleComponent.vue').default);
/**
* Next, we will create a fresh Vue application instance and attach it to
* the page. Then, you may begin adding components to this application
* or customize the JavaScript scaffolding to fit your unique needs.
*/
const app = new Vue({
el: '#app'
});

View File

@ -1,19 +1,5 @@
window._ = require('lodash'); window._ = require('lodash');
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
try {
window.Popper = require('popper.js').default;
window.$ = window.jQuery = require('jquery');
require('bootstrap');
} catch (e) {}
/** /**
* We'll load the axios HTTP library which allows us to easily issue requests * 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 * to our Laravel back-end. This library automatically handles sending the
@ -24,27 +10,13 @@ window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
/**
* Next we will register the CSRF Token as a common header with Axios so that
* all outgoing HTTP requests automatically have it attached. This is just
* a simple convenience so we don't have to attach every token manually.
*/
let token = document.head.querySelector('meta[name="csrf-token"]');
if (token) {
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else {
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
}
/** /**
* Echo exposes an expressive API for subscribing to channels and listening * Echo exposes an expressive API for subscribing to channels and listening
* for events that are broadcast by Laravel. Echo and event broadcasting * for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications. * allows your team to easily build robust real-time web applications.
*/ */
// import Echo from 'laravel-echo' // import Echo from 'laravel-echo';
// window.Pusher = require('pusher-js'); // window.Pusher = require('pusher-js');
@ -52,5 +24,5 @@ if (token) {
// broadcaster: 'pusher', // broadcaster: 'pusher',
// key: process.env.MIX_PUSHER_APP_KEY, // key: process.env.MIX_PUSHER_APP_KEY,
// cluster: process.env.MIX_PUSHER_APP_CLUSTER, // cluster: process.env.MIX_PUSHER_APP_CLUSTER,
// encrypted: true // forceTLS: true
// }); // });

View File

@ -13,10 +13,10 @@ return [
| |
*/ */
'password' => 'Passwords must be at least eight characters and match the confirmation.',
'reset' => 'Your password has been reset!', 'reset' => 'Your password has been reset!',
'sent' => 'We have e-mailed your password reset link!', 'sent' => 'We have emailed your password reset link!',
'throttled' => 'Please wait before retrying.',
'token' => 'This password reset token is invalid.', 'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that e-mail address.", 'user' => "We can't find a user with that email address.",
]; ];

View File

@ -40,6 +40,7 @@ return [
'dimensions' => 'The :attribute has invalid image dimensions.', 'dimensions' => 'The :attribute has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.', 'distinct' => 'The :attribute field has a duplicate value.',
'email' => 'The :attribute must be a valid email address.', '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.', 'exists' => 'The selected :attribute is invalid.',
'file' => 'The :attribute must be a file.', 'file' => 'The :attribute must be a file.',
'filled' => 'The :attribute field must have a value.', 'filled' => 'The :attribute field must have a value.',
@ -92,6 +93,7 @@ return [
'not_in' => 'The selected :attribute is invalid.', 'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute format is invalid.', 'not_regex' => 'The :attribute format is invalid.',
'numeric' => 'The :attribute must be a number.', 'numeric' => 'The :attribute must be a number.',
'password' => 'The password is incorrect.',
'present' => 'The :attribute field must be present.', 'present' => 'The :attribute field must be present.',
'regex' => 'The :attribute format is invalid.', 'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.', 'required' => 'The :attribute field is required.',
@ -108,7 +110,7 @@ return [
'string' => 'The :attribute must be :size characters.', 'string' => 'The :attribute must be :size characters.',
'array' => 'The :attribute must contain :size items.', 'array' => 'The :attribute must contain :size items.',
], ],
'starts_with' => 'The :attribute must start with one of the following: :values', 'starts_with' => 'The :attribute must start with one of the following: :values.',
'string' => 'The :attribute must be a string.', 'string' => 'The :attribute must be a string.',
'timezone' => 'The :attribute must be a valid zone.', 'timezone' => 'The :attribute must be a valid zone.',
'unique' => 'The :attribute has already been taken.', 'unique' => 'The :attribute has already been taken.',

View File

@ -1,14 +1 @@
//
// Fonts
@import url('https://fonts.googleapis.com/css?family=Nunito');
// Variables
@import 'variables';
// Bootstrap
@import '~bootstrap/scss/bootstrap';
.navbar-laravel {
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

View File

@ -22,8 +22,8 @@
</div> </div>
<div class="col-12 col-sm-6"> <div class="col-12 col-sm-6">
<h3 class="my-3">Welcome to phpLDAPadmin</h3> <h3 class="mb-1">Welcome to phpLDAPadmin</h3>
<h4 class="my-3">Updated to v2</h4> <h4 class="mb-3"><small>{{ config('app.version') }}</small></h4>
<p>phpLDAPadmin (or PLA for short) is an LDAP data management tool for administrators.</p> <p>phpLDAPadmin (or PLA for short) is an LDAP data management tool for administrators.</p>
<p>PLA aims to adhere to the LDAP standards (RFC4511) so that it can interact with any LDAP server that implements those standards.</p> <p>PLA aims to adhere to the LDAP standards (RFC4511) so that it can interact with any LDAP server that implements those standards.</p>
<hr> <hr>

View File

@ -1,6 +1,7 @@
<?php <?php
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -13,6 +14,8 @@ use Illuminate\Http\Request;
| |
*/ */
#Route::middleware('auth:api')->get('/user', function (Request $request) { /*
# return $request->user(); Route::middleware('auth:api')->get('/user', function (Request $request) {
#}); return $request->user();
});
*/

View File

@ -1,5 +1,7 @@
<?php <?php
use Illuminate\Support\Facades\Broadcast;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Broadcast Channels | Broadcast Channels

View File

@ -1,6 +1,7 @@
<?php <?php
use Illuminate\Foundation\Inspiring; use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@ -1,5 +1,7 @@
<?php <?php
use Illuminate\Support\Facades\Route;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Web Routes | Web Routes
@ -11,10 +13,12 @@
| |
*/ */
/*
Auth::routes([ Auth::routes([
'reset' => false, 'reset' => false,
'verify' => false, 'verify' => false,
'register' => false, 'register' => false,
]); ]);
*/
Route::get('/home','HomeController@home'); Route::get('/home','HomeController@home');

View File

@ -1,3 +1,3 @@
storage/framework/cache/.gitignore * *
!data/ !data/
!.gitignore !.gitignore

View File

@ -1,21 +0,0 @@
<?php
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testBasicTest()
{
$response = $this->get('/');
$response->assertStatus(200);
}
}

View File

@ -1,19 +0,0 @@
<?php
namespace Tests\Unit;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testBasicTest()
{
$this->assertTrue(true);
}
}

2
webpack.mix.js vendored
View File

@ -12,4 +12,4 @@ const mix = require('laravel-mix');
*/ */
mix.js('resources/js/app.js', 'public/js') mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css'); .sass('resources/sass/app.scss', 'public/css');