Compare commits

...
Sign in to create a new pull request.

34 commits

Author SHA1 Message Date
Tobias Kündig
0e1b09f6cb
Update README.md 2024-04-26 11:08:27 +02:00
Tobias Kündig
6e5d1d191d Updated dependencies 2021-06-08 21:13:47 +02:00
Tobias Kündig
59ab5a2f2f Removed compiled assets 2021-06-07 07:36:02 +02:00
Tobias Kündig
2234362d51 Restored old .env.example 2021-06-07 07:28:41 +02:00
Tobias Kündig
e4ed849e69 Restored old README 2021-06-07 07:27:57 +02:00
Tobias Kündig
36e8f94c34 Laravel 8 Upgrade 2021-06-05 15:21:49 +02:00
Tobias Kündig
ab27f05800 Removed cleanup 2021-06-02 16:59:32 +02:00
Tobias Kündig
df968882ba Added Cleanup 2021-06-02 14:36:18 +02:00
Tobias Kündig
e520a9f3cb Added Rate-Limiting 2021-06-02 14:24:16 +02:00
Tobias Kündig
0ee8651082 Fixed API Paths 2021-06-02 13:39:20 +02:00
Tobias Kündig
71d3711fc5 Added Debug-Statements 2021-06-02 13:03:16 +02:00
Tobias Kündig
e2d1649884 Added Vue-Resource root 2021-06-02 11:17:17 +02:00
Tobias Kündig
f967def80d Added ext-ftp 2021-06-02 10:48:45 +02:00
Tobias Kündig
cc89817f1e Log Login exception 2021-06-02 09:45:55 +02:00
Tobias Kündig
5771e442d8 Fixed Node to Version 7 2021-06-02 08:50:34 +02:00
Tobias Kündig
70877f6c86 Removed optimize cmd 2021-06-02 08:05:43 +02:00
Tobias Kündig
12810f24cc Downgraded to PHP 7.0 2021-06-02 07:59:23 +02:00
Tobias Kündig
4938fadb4d Fixed PHP to Version 7.1 2021-06-02 07:51:11 +02:00
Tobias Kündig
0f1be2309e Fixed Node to Version 8 2021-06-02 07:43:17 +02:00
Tobias Kündig
fde925b997 Updated dependencies 2021-06-02 07:38:24 +02:00
Tobias Kündig
7320c03fe2
Fixed PHP to 7.2 2021-06-02 07:35:55 +02:00
Tobias Kündig
fced82c6b2
Fixed json syntax 2021-06-02 07:32:33 +02:00
Tobias Kündig
0c517bbff2
Fixed Node to version 10 2021-06-02 07:32:22 +02:00
Tobias Kündig
90a6ea8f40
Added license 2018-08-13 08:14:51 +02:00
Tobias Kündig
66965d65f0
Removed GitHub ribbon when loggen in (closes #11) 2018-07-25 12:03:02 +02:00
Tobias Kündig
31b7140339
Fixed fullscreen toggle 2018-07-25 12:02:05 +02:00
Tobias Kündig
455acf1042
Cleaned up fullscreen toggle 2018-07-25 11:55:11 +02:00
Tobias Kündig
f0e3b06a6d
Merge pull request #23 from bleonard252/patch-2
Add fullscreen, change language to English (en), and separate toolbar
2018-07-25 11:50:24 +02:00
bleonard252
bc9d656116
Merge pull request #1 from bleonard252/patch-1
Change language
2018-07-20 12:11:25 -04:00
bleonard252
28dde47489
Add fullscreen, separate editor and toolbar
Height change (100vh to 100vh-54px): separates the editor from the toolbar

Status bar background-color addition: aesthetic thing for separating the editor and statusbar

Fullscr class: applies to the div and allows fullscreen editing

Fullwin method: just regular javascript that adds the Fullscr class to the editor column div or removes it

--By Blake L
2018-07-20 12:06:39 -04:00
bleonard252
5a8b3e19c9
Change language
The code and everything appears to be in English, so fixing so that Chrome (and others) won't insist on translating it from English to English.
2018-07-20 11:30:16 -04:00
Tobias Kündig
0152cfa2d2 Merge branch 'develop' 2017-12-10 14:12:41 +01:00
Tobias Kündig
70dc6f405f Merge pull request #10 from OFFLINE-GmbH/develop
Use guessExtension to determine the file's extension
2017-10-19 10:55:40 +02:00
Tobias Kündig
cb83d56cf9 Merge branch 'develop' 2017-09-08 08:36:59 +02:00
128 changed files with 14578 additions and 7448 deletions

15
.editorconfig Normal file
View 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

2
.gitattributes vendored
View file

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

24
.gitignore vendored
View file

@ -1,15 +1,21 @@
/node_modules
/public/hot
/public/storage
/public/css
/public/js
/public/js/**
/public/css/**
/public/*manifest.json
/storage/*.key
/vendor
/.idea
.env
.env.backup
.phpunit.result.cache
*.map
docker-compose.override.yml
Homestead.json
Homestead.yaml
.env
resources/views/partials/analytics.blade.php
composer.phar
.htaccess
public/css/app.css
npm-debug.log
yarn-error.log
/.idea
/.vscode
old
old/**

8
.lando.yml Normal file
View file

@ -0,0 +1,8 @@
name: onlineftp
recipe: laravel
config:
php: '8.0'
via: nginx
webroot: public
cache: redis
xdebug: false

13
.styleci.yml Normal file
View 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

View file

@ -1,24 +1,19 @@
# Online FTP / Amazon S3 Filebrowser
[![Build Status](https://travis-ci.org/OFFLINE-GmbH/Online-FTP.svg?branch=master)](https://travis-ci.org/OFFLINE-GmbH/Online-FTP)
> After 12+ years, we've made the decision to shut down onlineftp.ch. The project is no longer compatible with current data privacy regulations and modern workflows.
Simple file browser built with Laravel and Vue.
## Installation
1. Clone this repository to your machine.
1. `cp .env.example .env`
1. `composer install`
1. `yarn` or `npm install`
1. `gulp` or `gulp --production`
1. `yarn dev` or `npm run dev` for development builds or `yarn prod` or `npm run prod` for production builds
### Max upload size
Make sure to restrict the maximum upload size in your php config as well as in the `.env` file.
### Filesystem cleanup
Setup a cronjob to remove old files from your filesystem or trigger it manually.
```
php artisan onlineftp:cleanup
```
See https://laravel.com/docs/5.3/scheduling#introduction on how to setup the task scheduler cronjob.

View file

@ -2,7 +2,6 @@
namespace App\Console;
use App\Console\Commands\CleanUp;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
@ -14,29 +13,29 @@ class Kernel extends ConsoleKernel
* @var array
*/
protected $commands = [
CleanUp::class,
//
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('onlineftp:cleanup')
->everyTenMinutes();
// $schedule->command('inspire')->hourly();
}
/**
* Register the Closure based commands for the application.
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}

View file

@ -2,64 +2,40 @@
namespace App\Exceptions;
use Exception;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
\Illuminate\Auth\AuthenticationException::class,
\Illuminate\Auth\Access\AuthorizationException::class,
\Symfony\Component\HttpKernel\Exception\HttpException::class,
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
\Illuminate\Session\TokenMismatchException::class,
\Illuminate\Validation\ValidationException::class,
//
];
/**
* Report or log an exception.
* A list of the inputs that are never flashed for validation exceptions.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
* @var array
*/
protected $dontFlash = [
'current_password',
'password',
'password_confirmation',
];
/**
* Register the exception handling callbacks for the application.
*
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
public function register()
{
parent::report($exception);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
return parent::render($request, $exception);
}
/**
* Convert an authentication exception into an unauthenticated response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response
*/
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest('login');
$this->reportable(function (Throwable $e) {
//
});
}
}

View file

@ -1,16 +1,17 @@
<?php
namespace App\Console\Commands;
namespace App\Helpers;
use Illuminate\Console\Command;
use Illuminate\Filesystem\FilesystemManager;
class CleanUp extends Command
class Cleanup
{
/**
* Max file age in minutes.
* @var int
*/
const FIFTEEN_MINUTES = 900;
const MAX_AGE = 15;
/**
* Never delete these files.
@ -22,21 +23,6 @@ class CleanUp extends Command
* @var array
*/
private $dirs = ['downloads', 'uploads'];
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'onlineftp:cleanup';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Cleans up temporary files';
/**
* @var FilesystemManager
*/
@ -49,7 +35,6 @@ class CleanUp extends Command
*/
public function __construct(FilesystemManager $fs)
{
parent::__construct();
$this->fs = $fs;
}
@ -58,7 +43,7 @@ class CleanUp extends Command
*
* @return mixed
*/
public function handle()
public function run()
{
foreach ($this->dirs as $directory) {
$this->cleanup($directory);
@ -73,13 +58,13 @@ class CleanUp extends Command
protected function cleanup($path)
{
foreach ($this->fs->directories($path) as $directory) {
if ( ! $this->keep($directory)) {
if (!$this->keep($directory)) {
$this->fs->deleteDirectory($directory);
}
}
foreach ($this->fs->files($path) as $file) {
if ( ! $this->keep($file)) {
if (!$this->keep($file)) {
$this->fs->delete($file);
}
}
@ -110,7 +95,7 @@ class CleanUp extends Command
{
$modified = $this->fs->lastModified($file);
return $modified < (time() - $this::FIFTEEN_MINUTES);
return $modified < (time() - $this::MAX_AGE);
}
/**
@ -123,6 +108,6 @@ class CleanUp extends Command
*/
protected function keep($path)
{
return $this->ignore($path) || ! $this->isOld($path);
return $this->ignore($path) || !$this->isOld($path);
}
}

View file

@ -3,47 +3,46 @@
namespace App\Helpers;
use Crypt;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\Session;
class LoginHandler
{
public function set($data)
{
$data = Crypt::encrypt($data);
\Session::set('data', $data);
Session::put('data', Crypt::encrypt($data));
return $this;
}
public function apply()
public function apply($data = null)
{
$data = Crypt::decrypt(Session::get('data'));
$data = $data ?? Crypt::decrypt(Session::get('data'));
$driver = Session::get('driver');
if ($driver === 's3') {
Session::set('host', sprintf('%s://%s', $data['region'], $data['bucket']));
app()['config']['filesystems.cloud'] = 's3';
app()['config']['filesystems.disks.s3'] = [
Session::put('host', sprintf('%s://%s', $data['region'], $data['bucket']));
config()->set('filesystems.cloud', 's3');
config()->set('filesystems.disks.s3', [
'driver' => 's3',
'key' => $data['key'],
'key' => $data['key'],
'secret' => $data['secret'],
'region' => $data['region'],
'bucket' => $data['bucket'],
];
'endpoint' => (isset($data['endpoint']) && $data['endpoint']) ? $data['endpoint'] : null,
]);
} elseif ($driver === 'ftp') {
Session::set('host', sprintf('%s@%s', $data['username'], $data['host']));
app()['config']['filesystems.cloud'] = 'ftp';
app()['config']['filesystems.disks.ftp'] = [
'driver' => 'ftp',
'host' => $data['host'],
Session::put('host', sprintf('%s@%s', $data['username'], $data['host']));
config()->set('filesystems.cloud', 'ftp');
config()->set('filesystems.disks.ftp', [
'driver' => 'ftp',
'host' => $data['host'],
'username' => $data['username'],
'password' => $data['password'],
'port' => $data['port'],
];
'port' => $data['port'],
]);
} else {
throw new \RuntimeException('Unknown driver');
}
}
}
}

View file

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

View file

@ -39,7 +39,7 @@ class DirectoryController extends Controller
public function destroy(Request $request)
{
$path = $request->input('path', null);
$this->directory->delete($path);
}
}

View file

@ -2,61 +2,57 @@
namespace App\Http\Controllers;
use App\Helpers\Cleanup;
use App\Helpers\LoginHandler;
use App\Http\Requests;
use Aws\S3\Exception\S3Exception;
use Illuminate\Filesystem\FilesystemManager;
use Illuminate\Session\SessionManager;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Session;
use Throwable;
class SessionController extends Controller
{
/**
* @var Session
*/
private $session;
public function __construct(SessionManager $session)
public function index()
{
$this->session = $session;
$this->cleanup();
$view = Session::get('loggedIn', false) !== true ? 'login' : 'index';
return view($view);
}
public function login(Requests\LoginRequest $request, FilesystemManager $fs)
{
$data = $this->getData($request);
$this->session->set('driver', $request->get('driver', 'ftp'));
Session::put('driver', $request->get('driver', 'ftp'));
$login = new LoginHandler();
$login->set($data)->apply();
$login->set($data)->apply($data);
try {
// Try to list contents to validate the provided data.
$fs->cloud()->files('/');
} catch (\Expection $e) {
return $this->error($e);
} catch (\ErrorException $e) {
return $this->error($e);
} catch (S3Exception $e) {
return $this->error($e);
} catch (\RuntimeException $e) {
} catch (Throwable $e) {
return $this->error($e);
}
$this->session->set('loggedIn', true);
Session::put('loggedIn', true);
return redirect('/');
}
public function logout()
{
$this->session->flush();
$this->session->regenerate();
Session::flush();
Session::regenerate();
return redirect('/');
}
protected function error($e)
{
info('login failed', [$e]);
return redirect()->back()->withErrors(['connection' => 'Cannot connect to server!'])->withInput();
}
@ -70,18 +66,33 @@ class SessionController extends Controller
switch ($request->get('driver')) {
case 'ftp':
return [
'host' => $request->get('host'),
'host' => $request->get('host'),
'username' => $request->get('username'),
'password' => $request->get('password'),
'port' => $request->get('port', 21),
'port' => $request->get('port', 21),
];
case 's3':
return [
'key' => $request->get('key'),
'key' => $request->get('key'),
'secret' => $request->get('secret'),
'region' => $request->get('region'),
'bucket' => $request->get('bucket'),
];
}
}
private function cleanup()
{
try {
return Cache::remember('cleanup', now()->addMinutes(1), function () {
app(Cleanup::class)->run();
return true;
});
} catch (Throwable $e) {
logger()->error('Failed to run cleanup', [$e]);
return false;
}
}
}

View file

@ -2,7 +2,6 @@
namespace App\Http;
use App\Http\Middleware\ApplyLoginData;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
@ -15,7 +14,13 @@ class Kernel extends HttpKernel
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
// \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,
];
/**
@ -27,11 +32,12 @@ class Kernel extends HttpKernel
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
// \App\Http\Middleware\VerifyCsrfToken::class,
ApplyLoginData::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,
\App\Http\Middleware\ApplyLoginData::class,
],
'api' => [
@ -48,11 +54,14 @@ class Kernel extends HttpKernel
* @var array
*/
protected $routeMiddleware = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::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,
];
}

View file

@ -4,20 +4,21 @@ namespace App\Http\Middleware;
use App\Helpers\LoginHandler;
use Closure;
use Illuminate\Support\Facades\Session;
class ApplyLoginData
{
/**
* Apply the login data from the session storage.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)
{
if (\Session::get('loggedIn', false) === true) {
if (Session::get('loggedIn', false) === true) {
$login = new LoginHandler();
$login->apply();
}

View file

@ -2,29 +2,20 @@
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class Authenticate
class Authenticate extends Middleware
{
/**
* Handle an incoming request.
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
* @return string|null
*/
public function handle($request, Closure $next, $guard = null)
protected function redirectTo($request)
{
if (Auth::guard($guard)->guest()) {
if ($request->ajax()) {
return response('Unauthorized.', 401);
} else {
return redirect()->guest('login');
}
if (! $request->expectsJson()) {
return route('login');
}
return $next($request);
}
}

View file

@ -2,9 +2,9 @@
namespace App\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
class EncryptCookies extends BaseEncrypter
class EncryptCookies extends Middleware
{
/**
* The names of the cookies that should not be encrypted.

View 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 = [
//
];
}

View file

@ -2,7 +2,9 @@
namespace App\Http\Middleware;
use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
@ -12,13 +14,17 @@ class RedirectIfAuthenticated
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @param string|null ...$guards
* @return mixed
*/
public function handle($request, Closure $next, $guard = null)
public function handle(Request $request, Closure $next, ...$guards)
{
if (Auth::guard($guard)->check()) {
return redirect('/');
$guards = empty($guards) ? [null] : $guards;
foreach ($guards as $guard) {
if (Auth::guard($guard)->check()) {
return redirect(RouteServiceProvider::HOME);
}
}
return $next($request);

View file

@ -0,0 +1,19 @@
<?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 = [
'current_password',
'password',
'password_confirmation',
];
}

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

@ -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_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB;
}

View file

@ -2,9 +2,9 @@
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends BaseVerifier
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.

43
app/Models/User.php Normal file
View file

@ -0,0 +1,43 @@
<?php
namespace App\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use HasFactory, Notifiable;
/**
* 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',
];
}

View file

@ -2,20 +2,12 @@
namespace App\Providers;
use App\Helpers\Cleanup;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register any application services.
*
@ -23,6 +15,25 @@ class AppServiceProvider extends ServiceProvider
*/
public function register()
{
//
$this->app->bind(Cleanup::class, function () {
return new Cleanup($this->app->get('filesystem'));
});
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
$analytics = env('ANALYTICS');
if ($analytics) {
View::share('analytics', $analytics);
}
$ads = env('SHOW_ADS');
if ($ads) {
View::share('ads', $ads);
}
}
}

View file

@ -2,8 +2,8 @@
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
class AuthServiceProvider extends ServiceProvider
{
@ -13,7 +13,7 @@ class AuthServiceProvider extends ServiceProvider
* @var array
*/
protected $policies = [
'App\Model' => 'App\Policies\ModelPolicy',
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
];
/**

View file

@ -2,8 +2,8 @@
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
class BroadcastServiceProvider extends ServiceProvider
{
@ -16,11 +16,6 @@ class BroadcastServiceProvider extends ServiceProvider
{
Broadcast::routes();
/*
* Authenticate the user's personal channel...
*/
Broadcast::channel('App.User.*', function ($user, $userId) {
return (int) $user->id === (int) $userId;
});
require base_path('routes/channels.php');
}
}

View file

@ -2,8 +2,10 @@
namespace App\Providers;
use Illuminate\Support\Facades\Event;
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
{
@ -13,8 +15,8 @@ class EventServiceProvider extends ServiceProvider
* @var array
*/
protected $listen = [
'App\Events\SomeEvent' => [
'App\Listeners\EventListener',
Registered::class => [
SendEmailVerificationNotification::class,
],
];
@ -25,8 +27,6 @@ class EventServiceProvider extends ServiceProvider
*/
public function boot()
{
parent::boot();
//
}
}

View file

@ -2,19 +2,31 @@
namespace App\Providers;
use Illuminate\Support\Facades\Route;
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
{
/**
* This namespace is applied to your controller routes.
* The path to the "home" route for your application.
*
* In addition, it is set as the URL generator's root namespace.
* This is used by Laravel authentication to redirect users after login.
*
* @var string
*/
protected $namespace = 'App\Http\Controllers';
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.
@ -23,57 +35,29 @@ class RouteServiceProvider extends ServiceProvider
*/
public function boot()
{
//
$this->configureRateLimiting();
parent::boot();
}
$this->routes(function () {
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
/**
* Define the routes for the application.
*
* @return void
*/
public function map()
{
$this->mapApiRoutes();
$this->mapWebRoutes();
//
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
{
Route::group([
'middleware' => 'web',
'namespace' => $this->namespace,
], function ($router) {
require base_path('routes/web.php');
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
});
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
* Configure the rate limiters for the application.
*
* @return void
*/
protected function mapApiRoutes()
protected function configureRateLimiting()
{
Route::group([
'middleware' => 'api',
'namespace' => $this->namespace,
'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
});
}
}

View file

@ -55,7 +55,7 @@ class FileRepository extends FilesystemRepository
return true;
}
/**
* Creates an empty file
*
@ -77,8 +77,8 @@ class FileRepository extends FilesystemRepository
*/
protected function checkPath($path)
{
if ($path == '') {
if (!$path) {
throw new InvalidArgumentException('Please specify a file path.');
}
}
}
}

View file

@ -4,9 +4,6 @@ namespace App\Repositories;
use Illuminate\Filesystem\FilesystemManager;
use Illuminate\Support\Facades\Config;
use League\Flysystem\Plugin\ListPaths;
use League\Flysystem\Plugin\ListWith;
class FilesystemRepository
{
@ -16,4 +13,4 @@ class FilesystemRepository
{
$this->fs = $fs;
}
}
}

8
artisan Normal file → Executable file
View file

@ -1,6 +1,8 @@
#!/usr/bin/env php
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
@ -9,11 +11,11 @@
| 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.
| loading of any of our classes manually. It's great to relax.
|
*/
require __DIR__.'/bootstrap/autoload.php';
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
@ -40,7 +42,7 @@ $status = $kernel->handle(
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running. We will fire off the shutdown events
| 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.
|

View file

@ -12,7 +12,7 @@
*/
$app = new Illuminate\Foundation\Application(
realpath(__DIR__.'/../')
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);
/*

View file

@ -1,34 +0,0 @@
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Composer 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';
/*
|--------------------------------------------------------------------------
| Include The Compiled Class File
|--------------------------------------------------------------------------
|
| To dramatically increase your application's performance, you may use a
| compiled class file which contains all of the classes commonly used
| by a request. The Artisan "optimize" is used to create this file.
|
*/
$compiledPath = __DIR__.'/cache/compiled.php';
if (file_exists($compiledPath)) {
require $compiledPath;
}

View file

@ -1,52 +1,62 @@
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
"php": "^7.3|^8.0",
"ext-ftp": "*",
"ext-zip": "*",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.40",
"laravel/tinker": "^2.5",
"league/flysystem-aws-s3-v3": "^1.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*"
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
"psr-4": {
"Tests\\": "tests/"
}
},
"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');\""
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}

5976
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -10,9 +10,10 @@ return [
| 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' => 'Online FTP',
'name' => env('APP_NAME', 'Laravel'),
/*
|--------------------------------------------------------------------------
@ -21,7 +22,7 @@ return [
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services your application utilizes. Set this in your ".env" file.
| services the application utilizes. Set this in your ".env" file.
|
*/
@ -38,7 +39,7 @@ return [
|
*/
'debug' => env('APP_DEBUG', false),
'debug' => (bool) env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
@ -53,6 +54,8 @@ return [
'url' => env('APP_URL', 'http://localhost'),
'asset_url' => env('ASSET_URL', null),
/*
|--------------------------------------------------------------------------
| Application Timezone
@ -64,7 +67,7 @@ return [
|
*/
'timezone' => env('APP_TIMEZONE', 'UTC'),
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
@ -92,6 +95,19 @@ return [
'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
@ -107,23 +123,6 @@ return [
'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
|
| Here you may configure the log settings 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 Settings: "single", "daily", "syslog", "errorlog"
|
*/
'log' => env('APP_LOG', 'daily'),
'log_level' => env('APP_LOG_LEVEL', 'debug'),
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
@ -167,8 +166,6 @@ return [
* Package Service Providers...
*/
//
/*
* Application Service Providers...
*/
@ -194,20 +191,24 @@ return [
'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,
'Date' => Illuminate\Support\Facades\Date::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,
@ -215,13 +216,14 @@ return [
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::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,

View file

@ -44,6 +44,7 @@ return [
'api' => [
'driver' => 'token',
'provider' => 'users',
'hash' => false,
],
],
@ -67,7 +68,7 @@ return [
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
'model' => App\Models\User::class,
],
// 'users' => [
@ -96,7 +97,21 @@ return [
'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,
];

View file

@ -11,7 +11,7 @@ return [
| 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"
| Supported: "pusher", "ably", "redis", "log", "null"
|
*/
@ -32,14 +32,20 @@ return [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_KEY'),
'secret' => env('PUSHER_SECRET'),
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
'cluster' => env('PUSHER_APP_CLUSTER'),
'useTLS' => true,
],
],
'ably' => [
'driver' => 'ably',
'key' => env('ABLY_KEY'),
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',

View file

@ -1,5 +1,7 @@
<?php
use Illuminate\Support\Str;
return [
/*
@ -11,8 +13,6 @@ return [
| 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"
|
*/
'default' => env('CACHE_DRIVER', 'file'),
@ -26,6 +26,9 @@ return [
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
| Supported drivers: "apc", "array", "database", "file",
| "memcached", "redis", "dynamodb", "octane", "null"
|
*/
'stores' => [
@ -36,17 +39,19 @@ return [
'array' => [
'driver' => 'array',
'serialize' => false,
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
'lock_connection' => null,
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache'),
'path' => storage_path('framework/cache/data'),
],
'memcached' => [
@ -57,7 +62,7 @@ return [
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
@ -70,7 +75,21 @@ return [
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'connection' => 'cache',
'lock_connection' => 'default',
],
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],
'octane' => [
'driver' => 'octane',
],
],
@ -86,6 +105,6 @@ return [
|
*/
'prefix' => 'laravel',
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
];

View file

@ -1,35 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Additional Compiled Classes
|--------------------------------------------------------------------------
|
| Here you may specify additional classes to include in the compiled file
| generated by the `artisan optimize` command. These should be classes
| that are included on basically every request into the application.
|
*/
'files' => [
//
],
/*
|--------------------------------------------------------------------------
| Compiled File Providers
|--------------------------------------------------------------------------
|
| Here you may list service providers which define a "compiles" function
| that returns additional files that should be compiled, providing an
| easy way to get common files from any packages you are utilizing.
|
*/
'providers' => [
//
],
];

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/*', 'sanctum/csrf-cookie'],
'allowed_methods' => ['*'],
'allowed_origins' => ['*'],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => false,
];

View file

@ -1,20 +1,9 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass object; however, you may desire to retrieve records in an
| array format for simplicity. Here you can tweak the fetch style.
|
*/
'fetch' => PDO::FETCH_OBJ,
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
@ -48,26 +37,35 @@ return [
'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', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'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'),
@ -75,10 +73,24 @@ return [
'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,
],
],
/*
@ -100,20 +112,34 @@ return [
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer set of commands than a typical key-value systems
| 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' => [
'cluster' => false,
'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' => 0,
'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'),
],
],

View file

@ -13,20 +13,7 @@ return [
|
*/
'default' => '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' => 'ftp',
'default' => env('FILESYSTEM_DRIVER', 'local'),
/*
|--------------------------------------------------------------------------
@ -37,7 +24,7 @@ return [
| 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", "s3", "rackspace"
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/
@ -48,34 +35,39 @@ return [
'root' => storage_path('app'),
],
'ftp' => [
'driver' => 'ftp',
'host' => '',
'username' => '',
'password' => '',
// Optional FTP Settings...
'port' => '',
// 'root' => '',
// 'passive' => true,
// 'ssl' => true,
// 'timeout' => 30,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => 'your-key',
'secret' => 'your-secret',
'region' => 'your-region',
'bucket' => 'your-bucket',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
],
],
/*
|--------------------------------------------------------------------------
| 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 Normal file
View 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,
],
];

105
config/logging.php Normal file
View file

@ -0,0 +1,105 @@
<?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',
'level' => env('LOG_LEVEL', 'debug'),
'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'),
],
],
];

View file

@ -4,45 +4,73 @@ return [
/*
|--------------------------------------------------------------------------
| Mail Driver
| Default Mailer
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill",
| "ses", "sparkpost", "log"
| 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.
|
*/
'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
| applications. A default option is provided that is compatible with
| the Mailgun mail service which will provide reliable deliveries.
| 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"
|
*/
'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,
],
/*
|--------------------------------------------------------------------------
| 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.
|
*/
'ses' => [
'transport' => 'ses',
],
'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',
],
],
/*
|--------------------------------------------------------------------------
@ -62,54 +90,21 @@ return [
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
| Markdown Mail Settings
|--------------------------------------------------------------------------
|
| 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.
| 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!
|
*/
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'markdown' => [
'theme' => 'default',
/*
|--------------------------------------------------------------------------
| 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'),
/*
|--------------------------------------------------------------------------
| SMTP Server Password
|--------------------------------------------------------------------------
|
| Here you may set the password required by your SMTP server to send out
| messages from your application. This will be given to the server on
| connection so that the application will be able to send messages.
|
*/
'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',
'paths' => [
resource_path('views/vendor/mail'),
],
],
];

View file

@ -4,18 +4,16 @@ return [
/*
|--------------------------------------------------------------------------
| Default Queue Driver
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| The Laravel queue API supports a variety of back-ends via an unified
| 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 each one. Here you may set the default queue driver.
|
| Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
| syntax for every one. Here you may define a default connection.
|
*/
'default' => env('QUEUE_DRIVER', 'sync'),
'default' => env('QUEUE_CONNECTION', 'sync'),
/*
|--------------------------------------------------------------------------
@ -26,6 +24,8 @@ return [
| 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' => [
@ -39,6 +39,7 @@ return [
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 90,
'after_commit' => false,
],
'beanstalkd' => [
@ -46,22 +47,28 @@ return [
'host' => 'localhost',
'queue' => 'default',
'retry_after' => 90,
'block_for' => 0,
'after_commit' => false,
],
'sqs' => [
'driver' => 'sqs',
'key' => 'your-public-key',
'secret' => 'your-secret-key',
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
'queue' => 'your-queue-name',
'region' => 'us-east-1',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'default'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'after_commit' => false,
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => 'default',
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'block_for' => null,
'after_commit' => false,
],
],
@ -78,6 +85,7 @@ return [
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],

View file

@ -8,31 +8,26 @@ return [
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Stripe, Mailgun, SparkPost and others. This file provides a sane
| default location for this type of information, allowing packages
| to have a conventional place to find your various credentials.
| 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('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => 'us-east-1',
],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
];

View file

@ -1,5 +1,7 @@
<?php
use Illuminate\Support\Str;
return [
/*
@ -12,7 +14,7 @@ return [
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "array"
| "memcached", "redis", "dynamodb", "array"
|
*/
@ -29,7 +31,7 @@ return [
|
*/
'lifetime' => 120,
'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => false,
@ -70,7 +72,7 @@ return [
|
*/
'connection' => null,
'connection' => env('SESSION_CONNECTION', null),
/*
|--------------------------------------------------------------------------
@ -90,13 +92,15 @@ return [
| Session Cache Store
|--------------------------------------------------------------------------
|
| When using the "apc" or "memcached" session drivers, you may specify a
| cache store that should be used for these sessions. This value must
| correspond with one of the application's configured cache stores.
| 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' => null,
'store' => env('SESSION_STORE', null),
/*
|--------------------------------------------------------------------------
@ -122,7 +126,10 @@ return [
|
*/
'cookie' => 'laravel_session',
'cookie' => env(
'SESSION_COOKIE',
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
),
/*
|--------------------------------------------------------------------------
@ -157,11 +164,11 @@ return [
|
| 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.
| the cookie from being sent to you when it can't be done securely.
|
*/
'secure' => env('SESSION_SECURE_COOKIE', false),
'secure' => env('SESSION_SECURE_COOKIE'),
/*
|--------------------------------------------------------------------------
@ -176,4 +183,19 @@ return [
'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',
];

View file

@ -14,7 +14,7 @@ return [
*/
'paths' => [
realpath(base_path('resources/views')),
resource_path('views'),
],
/*
@ -28,6 +28,9 @@ return [
|
*/
'compiled' => realpath(storage_path('framework/views')),
'compiled' => env(
'VIEW_COMPILED_PATH',
realpath(storage_path('framework/views'))
),
];

2
database/.gitignore vendored
View file

@ -1 +1 @@
*.sqlite
*.sqlite*

View file

@ -1,24 +0,0 @@
<?php
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
|
*/
/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory->define(App\User::class, function (Faker\Generator $faker) {
static $password;
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => str_random(10),
];
});

View file

@ -0,0 +1,47 @@
<?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),
];
}
/**
* Indicate that the model's email address should be unverified.
*
* @return \Illuminate\Database\Eloquent\Factories\Factory
*/
public function unverified()
{
return $this->state(function (array $attributes) {
return [
'email_verified_at' => null,
];
});
}
}

View file

@ -0,0 +1,36 @@
<?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->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}

View 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');
}
}

View 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');
}
}

View file

@ -1,16 +1,18 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
* Seed the application's database.
*
* @return void
*/
public function run()
{
// $this->call(UsersTableSeeder::class);
// \App\Models\User::factory(10)->create();
}
}

19
gulpfile.js vendored
View file

@ -1,19 +0,0 @@
const elixir = require('laravel-elixir');
require('laravel-elixir-vue-2');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for your application as well as publishing vendor resources.
|
*/
elixir((mix) => {
mix.sass('app.scss')
.webpack('app.js');
});

3
npm-shrinkwrap.json generated
View file

@ -1,3 +0,0 @@
{
"dependencies": {}
}

View file

@ -1,23 +1,33 @@
{
"private": true,
"scripts": {
"prod": "gulp --production",
"dev": "gulp watch"
},
"devDependencies": {
"alertify.js": "^1.0.12",
"babel-core": "^6.21.0",
"babel-loader": "^6.2.10",
"babel-plugin-transform-runtime": "^6.15.0",
"bootstrap-sass": "^3.3.7",
"gulp": "^3.9.1",
"jquery": "^3.1.0",
"laravel-elixir": "^6.0.0-14",
"laravel-elixir-vue-2": "^0.2.0",
"laravel-elixir-webpack-official": "^1.0.2",
"lodash": "^4.16.2",
"vue": "^2.0.1",
"vue-resource": "1.0.3",
"vuex": "^2.1.1"
}
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
},
"devDependencies": {
"alertify.js": "^1.0.12",
"axios": "^0.21",
"bootstrap-sass": "^3.4.1",
"jquery": "^3.1.0",
"laravel-mix": "^6.0.6",
"lodash": "^4.17.19",
"postcss": "^8.1.14",
"resolve-url-loader": "^3.1.2",
"sass": "^1.34.1",
"sass-loader": "^11.0.1",
"vue": "^2.0.1",
"vue-loader": "^15.9.5",
"vue-resource": "1.0.3",
"vue-template-compiler": "^2.6.13",
"vuex": "^2.1.1"
},
"dependencies": {
"vue-google-adsense": "^1.9.3",
"vue-script2": "^2.1.0"
}
}

View file

@ -1,27 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
>
<testsuites>
<testsuite name="Application Test Suite">
<directory suffix="Test.php">./tests</directory>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./app</directory>
</whitelist>
</filter>
</include>
</coverage>
<php>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
<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>

View file

@ -1,20 +1,21 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# 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>

View file

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 106 KiB

View file

@ -1,11 +1,24 @@
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
use Illuminate\Contracts\Http\Kernel;
use Illuminate\Http\Request;
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Check If The Application Is Under Maintenance
|--------------------------------------------------------------------------
|
| If the application is in maintenance / demo mode via the "down" command
| we will load this file so that any pre-rendered content 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';
}
/*
|--------------------------------------------------------------------------
@ -13,46 +26,30 @@
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels nice to relax.
| 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__.'/../bootstrap/autoload.php';
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/
$app = require_once __DIR__.'/../bootstrap/app.php';
require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
| 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.
|
*/
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$app = require_once __DIR__.'/../bootstrap/app.php';
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$kernel = $app->make(Kernel::class);
$response->send();
$response = tap($kernel->handle(
$request = Request::capture()
))->send();
$kernel->terminate($request, $response);

28
public/web.config Normal file
View file

@ -0,0 +1,28 @@
<!--
Rewrites requires Microsoft URL Rewrite Module for IIS
Download: https://www.iis.net/downloads/microsoft/url-rewrite
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>

View file

@ -1,103 +0,0 @@
<template>
<div id="app" :class="{'editor-visible' : editorVisible}">
<loading-overlay :visible="isLoading"></loading-overlay>
<modals></modals>
<browser></browser>
<editor :visible="editorVisible"></editor>
<iframe src="about:blank" style="display: none" id="download-frame"></iframe>
</div>
</template>
<script>
import Editor from './components/Editor.vue';
import Browser from './components/Browser.vue';
import Modals from './components/modals/Index.vue'
import LoadingOverlay from './components/layout/LoadingOverlay.vue'
import * as types from './store/types'
import { mapActions, mapState } from 'vuex'
export default {
computed: {
...mapState({
isLoading: state => state.isLoading,
editorVisible: state => state.editorVisible,
})
},
components: {
Editor,
Browser,
Modals,
LoadingOverlay
}
}
</script>
<style>
a {
cursor: pointer
}
.col-browser {
position: relative;
width: 80%;
left: 10%;
padding: 1em;
float: left;
transition: .2s ease-out;
transition-property: width, margin, left;
}
.col-editor {
left: 100%;
height: 100%;
width: 50%;
position: fixed !important;
visibility: hidden;
opacity: 0;
transition: .2s ease-out;
transition-property: visibility, opacity, left;
}
.editor-visible .col {
position: relative;
width: 50%;
}
.editor-visible .col-browser {
width: 50%;
left: 0;
}
.editor-visible .col-editor {
visibility: visible;
opacity: 1;
left: 50%;
}
.alertify-logs {
z-index: 10001;
}
@media screen and (max-width: 880px) {
.github-ribbon {
display: none;
}
.editor-visible .col {
width: 100%;
}
.editor-visible .col-browser {
width: 100%;
}
.editor-visible .col-editor {
left: 0%;
}
}
</style>

View file

@ -1,9 +0,0 @@
// Fonts
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
// Variables
@import "variables";
// Bootstrap
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";

View file

@ -1,13 +1,17 @@
import Vue from 'vue';
const resource = require('vue-resource');
Vue.use(resource);
let http = Vue.http;
http.options.root = document.location.protocol + '//' + document.location.hostname
http.headers.common['X-CSRF-TOKEN'] = Laravel.csrfToken
const removeSlashes = (str) => str.replace(/^\/|\/$/g, '');
export function getFiles (path, cb) {
return http({url: '/directory/?path=' + removeSlashes(path), method: 'GET'}).then(response => {
return http({url: '/directory?path=' + removeSlashes(path), method: 'GET'}).then(response => {
response.data.listing.map(item => {
item.checked = false;
item._uid = +Date.now();
@ -20,7 +24,7 @@ export function getFiles (path, cb) {
}
export function getContents (path, cb) {
return http({url: '/file/?path=' + removeSlashes(path), method: 'GET'})
return http({url: '/file?path=' + removeSlashes(path), method: 'GET'})
.then(response => response.data);
}
@ -58,4 +62,4 @@ export function upload (files, path, extract) {
data.append('extract', extract ? 1 : 0);
return http({url: '/upload', method: 'POST', body: data});
}
}

View file

@ -8,6 +8,10 @@ require('./bootstrap');
import Vue from 'vue'
import App from './app.vue'
import Adsense from 'vue-google-adsense/dist/Adsense.min.js'
Vue.use(require('vue-script2'))
Vue.use(Adsense)
import store from './store'
@ -21,4 +25,4 @@ const vm = new Vue({
}
});
vm.$store.dispatch(types.FETCH_FILES, '/');
vm.$store.dispatch(types.FETCH_FILES, '/');

108
resources/js/app.vue Normal file
View file

@ -0,0 +1,108 @@
<template>
<div id="app" :class="{'editor-visible' : editorVisible}">
<loading-overlay :visible="isLoading"></loading-overlay>
<ad v-if="showAd"></ad>
<modals></modals>
<browser></browser>
<editor :visible="editorVisible"></editor>
<iframe src="about:blank" style="display: none" id="download-frame"></iframe>
</div>
</template>
<script>
import Editor from './components/Editor.vue';
import Browser from './components/Browser.vue';
import Ad from './components/Ad.vue';
import Modals from './components/modals/Index.vue'
import LoadingOverlay from './components/layout/LoadingOverlay.vue'
import { mapState } from 'vuex'
export default {
computed: {
...mapState({
isLoading: state => state.isLoading,
editorVisible: state => state.editorVisible,
}),
showAd () {
return window.Laravel.showAds;
}
},
components: {
Editor,
Browser,
Modals,
LoadingOverlay,
Ad,
}
}
</script>
<style>
a {
cursor: pointer
}
.col-browser {
position: relative;
width: 80%;
left: 10%;
padding: 1em;
float: left;
transition: .2s ease-out;
transition-property: width, margin, left;
}
.col-editor {
left: 100%;
height: 100%;
width: 50%;
position: fixed !important;
visibility: hidden;
opacity: 0;
transition: .2s ease-out;
transition-property: visibility, opacity, left;
}
.editor-visible .col {
position: relative;
width: 50%;
}
.editor-visible .col-browser {
width: 50%;
left: 0;
}
.editor-visible .col-editor {
visibility: visible;
opacity: 1;
left: 50%;
}
.alertify-logs {
z-index: 10001;
}
@media screen and (max-width: 880px) {
.github-ribbon {
display: none;
}
.editor-visible .col {
width: 100%;
}
.editor-visible .col-browser {
width: 100%;
}
.editor-visible .col-editor {
left: 0%;
}
}
</style>

View file

@ -25,11 +25,7 @@ require('vue-resource');
* included with Laravel will automatically verify the header's value.
*/
Vue.http.interceptors.push((request, next) => {
request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);
next();
});
/**
* Echo exposes an expressive API for subscribing to channels and listening

View file

@ -0,0 +1,11 @@
<template>
<div id="header-bar">
<Adsense
data-ad-client="ca-pub-3465760842579742"
data-ad-slot="8298008179"
data-ad-format="auto"
data-full-width-responsive="true"
>
</Adsense>
</div>
</template>

View file

@ -1,5 +1,5 @@
<template>
<div class="col col-editor">
<div class="col col-editor" :class="{'is-fullscreen' : isFullscreen}">
<div id="editor">{{ contents }}</div>
<div id="hide">
<button type="button" class="btn btn-default btn-sm" @click="hide" title="Hide editor">
@ -24,6 +24,14 @@
>
<span class="glyphicon glyphicon-download"></span>
</button>
<button type="button"
class="btn btn-default"
title="Full Window/Fullscreen"
@click="fullscreen"
v-show="openFile !== null"
>
<span class="glyphicon glyphicon-fullscreen"></span>
</button>
</div>
</div>
</template>
@ -34,7 +42,8 @@
export default {
data() {
return {
editor: null
editor: null,
isFullscreen: false
}
},
methods: {
@ -48,6 +57,9 @@
save() {
this.putContents(this.editor.getValue());
},
fullscreen() {
this.isFullscreen = !this.isFullscreen
},
hide() {
this.setEditorVisibility(false);
}
@ -90,11 +102,18 @@
</script>
<style>
.col-editor.is-fullscreen {
width: 100%;
left: 0;
}
.col-editor.is-fullscreen #hide {
display: none;
}
#editor {
position: relative;
width: 100%;
z-index: 500;
height: 100vh;
height: calc(100vh - 54px);
font-size: 15px;
line-height: 1.6;
}
@ -107,6 +126,7 @@
width: 100%;
z-index: 600;
padding: 10px;
background-color: white;
}
#hide {
@ -122,4 +142,4 @@
transform: translate(10%, 0);
}
}
</style>
</style>

View file

@ -20,7 +20,7 @@
</tr>
</thead>
<tbody>
<tr is="file-list-entry" :item="item" v-for="item in listing"></tr>
<tr is="file-list-entry" :item="item" v-for="item in listing" :key="item.name"></tr>
</tbody>
</table>
</div>
@ -70,4 +70,4 @@
display: none;
}
}
</style>
</style>

View file

@ -1,8 +1,8 @@
<template>
<div class="row">
<div class="breadcrumbs col-md-11 col-xs-10">
<div class="breadcrumbs col-md-10">
<ol class="breadcrumb">
<li v-for="breadcrumb in breadcrumbs"
<li v-for="(breadcrumb, $index) in breadcrumbs"
:class="{ active: isLast($index) }">
<a @click="cd(($index === 0 ? '' : '/') + breadcrumb.path)"
v-if="!isLast($index)">
@ -14,7 +14,7 @@
</li>
</ol>
</div>
<div class="col-md-1 col-xs-2 text-right logout-button">
<div class="col-md-2 text-right logout-button">
<a href="/logout" class="btn btn-sm btn-default">Logout</a>
</div>
</div>
@ -60,4 +60,4 @@
position: relative;
right: 9px;
}
</style>
</style>

View file

@ -1,9 +1,5 @@
<template>
<modal :confirm="confirm"
:disabled="disabled"
identifier="upload"
width="500"
>
<modal :confirm="confirm" :disabled="disabled" identifier="upload" width="500">
<h3 slot="header">Upload a new file</h3>
<div slot="body">
<p>Select the files you want to upload</p>
@ -29,7 +25,8 @@
export default {
data() {
return {
extract: false
extract: false,
disabled: false,
}
},
methods: {
@ -59,4 +56,4 @@
.zip-checkbox {
margin-top: 3em;
}
</style>
</style>

View file

@ -14,6 +14,7 @@ return [
*/
'failed' => 'These credentials do not match our records.',
'password' => 'The provided password is incorrect.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
];

View file

@ -14,6 +14,6 @@ return [
*/
'previous' => '&laquo; Previous',
'next' => 'Next &raquo;',
'next' => 'Next &raquo;',
];

View file

@ -13,10 +13,10 @@ return [
|
*/
'password' => 'Passwords must be at least six characters and match the confirmation.',
'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.',
'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

@ -13,78 +13,114 @@ return [
|
*/
'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, and dashes.',
'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' => [
'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 must only contain letters.',
'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.',
'alpha_num' => 'The :attribute must 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.',
'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_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.',
'exists' => 'The selected :attribute is invalid.',
'file' => 'The :attribute must be a file.',
'filled' => 'The :attribute field is required.',
'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.',
'json' => 'The :attribute must be a valid JSON string.',
'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.',
'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.',
],
'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.',
'min' => [
'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 must not be greater than :max.',
'file' => 'The :attribute must not be greater than :max kilobytes.',
'string' => 'The :attribute must not be greater than :max characters.',
'array' => 'The :attribute must 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.',
'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.',
],
'not_in' => 'The selected :attribute is invalid.',
'numeric' => 'The :attribute must be a number.',
'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 is present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'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' => [
'prohibited' => 'The :attribute field is prohibited.',
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
'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.',
'file' => 'The :attribute must be :size kilobytes.',
'string' => 'The :attribute must be :size characters.',
'array' => 'The :attribute must contain :size items.',
],
'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.',
'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.',
/*
|--------------------------------------------------------------------------
@ -108,9 +144,9 @@ return [
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap attribute place-holders
| with something more reader friendly such as E-Mail Address instead
| of "email". This simply helps us make messages a little cleaner.
| 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.
|
*/

View file

@ -1,19 +0,0 @@
<?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' => 'Essas credenciais não correspondem aos nossos registros.',
'throttle' => 'Muitas tentativas de login. Tente novamente em :seconds segundos.',
];

View file

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

View file

@ -1,22 +0,0 @@
<?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.
|
*/
'password' => 'Senhas devem ter pelo menos seis caracteres e combinar com a confirmação.',
'reset' => 'Sua senha foi alterada!',
'sent' => 'Nós enviamos um email com link para troca de sua senha!',
'token' => 'Este token de redefinição de senha é inválido.',
'user' => "Não encontramos um usuário com esse endereço de e-mail.",
];

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