mirror of
https://github.com/brunofontes/shareit.git
synced 2025-12-13 11:10:42 -03:00
Compare commits
30 Commits
v0.5
...
f89e0639dc
| Author | SHA1 | Date | |
|---|---|---|---|
|
f89e0639dc
|
|||
|
a5a2990518
|
|||
|
de91c4ef9f
|
|||
|
56bbef2a04
|
|||
|
967db67ce3
|
|||
|
f3d41e71d3
|
|||
|
26eab2646d
|
|||
|
a18d4ba808
|
|||
|
1acc2b66f7
|
|||
|
bc5f8feaac
|
|||
|
47c68c8860
|
|||
|
bd8927d408
|
|||
|
d441c82890
|
|||
|
54abd983aa
|
|||
|
5d7aee7778
|
|||
|
b767265200
|
|||
|
2ed6065901
|
|||
|
0b3f6d4837
|
|||
|
6339a23b02
|
|||
|
dc0c4e679b
|
|||
|
bb849dba4b
|
|||
|
437e847cdd
|
|||
|
|
f31228843f | ||
|
28520edee9
|
|||
|
74eb254297
|
|||
|
2f16d4dc60
|
|||
| 130e47b198 | |||
|
6be295e25b
|
|||
|
00c382e1cc
|
|||
|
2bc2792a24
|
7
.gitignore
vendored
7
.gitignore
vendored
@@ -5,14 +5,7 @@
|
||||
/vendor
|
||||
/.idea
|
||||
/.vscode
|
||||
/.vagrant
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
.env
|
||||
.phpunit.result.cache
|
||||
mergeAndDeploy.sh
|
||||
start_vagrant.sh
|
||||
stop_vagrant.sh
|
||||
ssh_homestead.sh
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
Use Throwable;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
@@ -32,7 +33,7 @@ class Handler extends ExceptionHandler
|
||||
* @param \Exception $exception
|
||||
* @return void
|
||||
*/
|
||||
public function report(Exception $exception)
|
||||
public function report(Throwable $exception)
|
||||
{
|
||||
parent::report($exception);
|
||||
}
|
||||
@@ -44,7 +45,7 @@ class Handler extends ExceptionHandler
|
||||
* @param \Exception $exception
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function render($request, Exception $exception)
|
||||
public function render($request, Throwable $exception)
|
||||
{
|
||||
return parent::render($request, $exception);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
||||
use Auth;
|
||||
use Mail;
|
||||
use \App\User;
|
||||
use App\FlashMessage;
|
||||
use \App\Mail\UserWaiting;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -22,9 +23,19 @@ class AlertController extends Controller
|
||||
public function store(Request $request)
|
||||
{
|
||||
$item = User::loggedIn()->items()->find(request('item'));
|
||||
$item->waiting_user_id = Auth::id();
|
||||
$item->timestamps = false;
|
||||
$item->save();
|
||||
if (!$item->used_by) {
|
||||
session()->flash(
|
||||
FlashMessage::PRIMARY,
|
||||
__('Oh! This item has just being returned. Take it before anyone else!')
|
||||
);
|
||||
return redirect('home');
|
||||
}
|
||||
|
||||
if ($item->used_by == Auth::id()) {
|
||||
return redirect('home');
|
||||
}
|
||||
|
||||
$item->storeAlert();
|
||||
|
||||
$loggedUser = Auth::user()->name;
|
||||
$userWithItem = User::find($item->used_by);
|
||||
@@ -38,10 +49,12 @@ class AlertController extends Controller
|
||||
public function delete(Request $request)
|
||||
{
|
||||
$item = User::loggedIn()->items()->find(request('item'));
|
||||
$item->waiting_user_id = null;
|
||||
$item->timestamps = false;
|
||||
$item->save();
|
||||
|
||||
if ($item->waiting_user_id != Auth::id()) {
|
||||
return redirect('home');
|
||||
}
|
||||
|
||||
$item->removeAlert();
|
||||
return redirect('home');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ use App\Item;
|
||||
use App\User;
|
||||
use App\Events\ReturnItem;
|
||||
use Illuminate\Http\Request;
|
||||
use PhpParser\Node\Stmt\TryCatch;
|
||||
|
||||
/**
|
||||
* Responsible to Take and Return an Item.
|
||||
@@ -24,13 +25,15 @@ class TakeController extends Controller
|
||||
public function store(Request $request)
|
||||
{
|
||||
$item = User::loggedIn()->items()->find(request('item'));
|
||||
if ($item->used_by) {
|
||||
|
||||
try {
|
||||
$item->takeItem();
|
||||
} catch (\Exception $e) {
|
||||
return back()->withErrors(
|
||||
Lang::getFromJson("This item is already taken")
|
||||
Lang::getFromJson('This item is already taken')
|
||||
);
|
||||
}
|
||||
$item->used_by = Auth::id();
|
||||
$item->save();
|
||||
|
||||
return redirect('home');
|
||||
}
|
||||
|
||||
@@ -45,8 +48,17 @@ class TakeController extends Controller
|
||||
public function delete(Request $request)
|
||||
{
|
||||
$item = User::loggedIn()->items()->find(request('item'));
|
||||
|
||||
try {
|
||||
$item->returnItem();
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return back()->withErrors(
|
||||
Lang::getFromJson("You cannot return an item that is not with you")
|
||||
);
|
||||
}
|
||||
|
||||
event(new ReturnItem($item));
|
||||
$item->returnItem();
|
||||
return redirect('home');
|
||||
}
|
||||
}
|
||||
|
||||
48
app/Item.php
48
app/Item.php
@@ -2,7 +2,10 @@
|
||||
|
||||
namespace App;
|
||||
|
||||
use Auth;
|
||||
use Lang;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Exception;
|
||||
|
||||
class Item extends Model
|
||||
{
|
||||
@@ -36,7 +39,23 @@ class Item extends Model
|
||||
*/
|
||||
public static function fromAuthUser()
|
||||
{
|
||||
return (new static)->where('user_id', \Auth::id());
|
||||
return (new static)->where('user_id', Auth::id());
|
||||
}
|
||||
|
||||
/**
|
||||
* Take a specified item
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function takeItem()
|
||||
{
|
||||
if (isset($this->used_by)) {
|
||||
throw new Exception("Trying to take an Item that is in use", 1);
|
||||
}
|
||||
|
||||
$this->used_by = Auth::id();
|
||||
$this->waiting_user_id = null;
|
||||
$this->save();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -46,8 +65,35 @@ class Item extends Model
|
||||
*/
|
||||
public function returnItem()
|
||||
{
|
||||
if ($this->used_by != Auth::id()) {
|
||||
throw new Exception("Trying to return an empty Item or from other user", 1);
|
||||
}
|
||||
|
||||
$this->used_by = null;
|
||||
$this->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a waiting user to the item
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function storeAlert()
|
||||
{
|
||||
$this->waiting_user_id = Auth::id();
|
||||
$this->timestamps = false;
|
||||
$this->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a waiting user to the item
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function removeAlert()
|
||||
{
|
||||
$this->waiting_user_id = null;
|
||||
$this->timestamps = false;
|
||||
$this->save();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,6 @@ class Welcome extends Mailable
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->subject(Lang::getFromJson('Welcome'))->markdown('emails.welcome');
|
||||
return $this->subject(Lang::get('Welcome'))->markdown('emails.welcome');
|
||||
}
|
||||
}
|
||||
|
||||
2
check.sh
Normal file
2
check.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
./vendor/bin/phpstan analyse --memory-limit=2G
|
||||
php artisan insights
|
||||
@@ -5,18 +5,23 @@
|
||||
"license": "MIT",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"php": "^7.3.0",
|
||||
"fideloper/proxy": "^4.0",
|
||||
"laravel/framework": "5.7.*",
|
||||
"laravel/tinker": "^1.0"
|
||||
"laravel/framework": "^8.0",
|
||||
"laravel/helpers": "^1.4",
|
||||
"laravel/tinker": "^2.0",
|
||||
"laravel/ui": "^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"beyondcode/laravel-dump-server": "^1.0",
|
||||
"filp/whoops": "^2.0",
|
||||
"fzaninotto/faker": "^1.4",
|
||||
"mockery/mockery": "^1.0",
|
||||
"nunomaduro/collision": "^2.0",
|
||||
"phpunit/phpunit": "^7.0"
|
||||
"nunomaduro/collision": "^5.0",
|
||||
"nunomaduro/larastan": "^0.7.4",
|
||||
"nunomaduro/phpinsights": "^1.14",
|
||||
"phpstan/phpstan": "^0.12.85",
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
|
||||
6952
composer.lock
generated
6952
composer.lock
generated
File diff suppressed because it is too large
Load Diff
113
config/insights.php
Normal file
113
config/insights.php
Normal file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use NunoMaduro\PhpInsights\Domain\Insights\ForbiddenDefineFunctions;
|
||||
use NunoMaduro\PhpInsights\Domain\Insights\ForbiddenFinalClasses;
|
||||
use NunoMaduro\PhpInsights\Domain\Insights\ForbiddenNormalClasses;
|
||||
use NunoMaduro\PhpInsights\Domain\Insights\ForbiddenPrivateMethods;
|
||||
use NunoMaduro\PhpInsights\Domain\Insights\ForbiddenTraits;
|
||||
use NunoMaduro\PhpInsights\Domain\Metrics\Architecture\Classes;
|
||||
use SlevomatCodingStandard\Sniffs\Commenting\UselessFunctionDocCommentSniff;
|
||||
use SlevomatCodingStandard\Sniffs\Namespaces\AlphabeticallySortedUsesSniff;
|
||||
use SlevomatCodingStandard\Sniffs\TypeHints\DeclareStrictTypesSniff;
|
||||
use SlevomatCodingStandard\Sniffs\TypeHints\DisallowMixedTypeHintSniff;
|
||||
use SlevomatCodingStandard\Sniffs\TypeHints\ParameterTypeHintSniff;
|
||||
use SlevomatCodingStandard\Sniffs\TypeHints\PropertyTypeHintSniff;
|
||||
use SlevomatCodingStandard\Sniffs\TypeHints\ReturnTypeHintSniff;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Preset
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default preset that will be used by PHP Insights
|
||||
| to make your code reliable, simple, and clean. However, you can always
|
||||
| adjust the `Metrics` and `Insights` below in this configuration file.
|
||||
|
|
||||
| Supported: "default", "laravel", "symfony", "magento2", "drupal"
|
||||
|
|
||||
*/
|
||||
|
||||
'preset' => 'laravel',
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| IDE
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This options allow to add hyperlinks in your terminal to quickly open
|
||||
| files in your favorite IDE while browsing your PhpInsights report.
|
||||
|
|
||||
| Supported: "textmate", "macvim", "emacs", "sublime", "phpstorm",
|
||||
| "atom", "vscode".
|
||||
|
|
||||
| If you have another IDE that is not in this list but which provide an
|
||||
| url-handler, you could fill this config with a pattern like this:
|
||||
|
|
||||
| myide://open?url=file://%f&line=%l
|
||||
|
|
||||
*/
|
||||
|
||||
'ide' => null,
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may adjust all the various `Insights` that will be used by PHP
|
||||
| Insights. You can either add, remove or configure `Insights`. Keep in
|
||||
| mind that all added `Insights` must belong to a specific `Metric`.
|
||||
|
|
||||
*/
|
||||
|
||||
'exclude' => [
|
||||
// 'path/to/directory-or-file'
|
||||
],
|
||||
|
||||
'add' => [
|
||||
Classes::class => [
|
||||
ForbiddenFinalClasses::class,
|
||||
],
|
||||
],
|
||||
|
||||
'remove' => [
|
||||
AlphabeticallySortedUsesSniff::class,
|
||||
DeclareStrictTypesSniff::class,
|
||||
DisallowMixedTypeHintSniff::class,
|
||||
ForbiddenDefineFunctions::class,
|
||||
ForbiddenNormalClasses::class,
|
||||
ForbiddenTraits::class,
|
||||
ParameterTypeHintSniff::class,
|
||||
PropertyTypeHintSniff::class,
|
||||
ReturnTypeHintSniff::class,
|
||||
UselessFunctionDocCommentSniff::class,
|
||||
],
|
||||
|
||||
'config' => [
|
||||
ForbiddenPrivateMethods::class => [
|
||||
'title' => 'The usage of private methods is not idiomatic in Laravel.',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Requirements
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define a level you want to reach per `Insights` category.
|
||||
| When a score is lower than the minimum level defined, then an error
|
||||
| code will be returned. This is optional and individually defined.
|
||||
|
|
||||
*/
|
||||
|
||||
'requirements' => [
|
||||
// 'min-quality' => 0,
|
||||
// 'min-complexity' => 0,
|
||||
// 'min-architecture' => 0,
|
||||
// 'min-style' => 0,
|
||||
// 'disable-security-check' => false,
|
||||
],
|
||||
|
||||
];
|
||||
@@ -164,7 +164,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'secure' => env('SESSION_SECURE_COOKIE', false),
|
||||
'secure' => env('SESSION_SECURE_COOKIE', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
|
||||
2
deploy.sh
Normal file
2
deploy.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
git checkout production && git merge master && git checkout - && git push origin production && ssh -A contabo -t "cd /var/www/shareit.brunofontes.net; git fetch --all; git checkout --force production; git pull origin production --force; ~/composer.phar install -n --optimize-autoloader --no-dev; npm install"
|
||||
9534
package-lock.json
generated
Normal file
9534
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
@@ -10,13 +10,17 @@
|
||||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios": "^0.18",
|
||||
"bootstrap": "^4.0.0",
|
||||
"cross-env": "^5.1",
|
||||
"jquery": "^3.2",
|
||||
"laravel-mix": "^2.0",
|
||||
"lodash": "^4.17.5",
|
||||
"popper.js": "^1.12",
|
||||
"vue": "^2.5.7"
|
||||
"axios": "^0.21",
|
||||
"bootstrap": "^4.6.0",
|
||||
"cross-env": "^5.2.1",
|
||||
"jquery": "^3.5.1",
|
||||
"laravel-mix": "^6.0.18",
|
||||
"lodash": "^4.17.21",
|
||||
"popper.js": "^1.16.1",
|
||||
"resolve-url-loader": "^3.1.3",
|
||||
"sass": "^1.32.12",
|
||||
"sass-loader": "^8.0.2",
|
||||
"vue": "^2.6.12",
|
||||
"vue-template-compiler": "^2.6.12"
|
||||
}
|
||||
}
|
||||
|
||||
17
phpstan.neon
Normal file
17
phpstan.neon
Normal file
@@ -0,0 +1,17 @@
|
||||
includes:
|
||||
- ./vendor/nunomaduro/larastan/extension.neon
|
||||
|
||||
parameters:
|
||||
paths:
|
||||
- app
|
||||
|
||||
# The level 8 is the highest level
|
||||
level: 5
|
||||
|
||||
ignoreErrors:
|
||||
- '#Unsafe usage of new static#'
|
||||
|
||||
excludePaths:
|
||||
- ./*/*/FileToBeExcluded.php
|
||||
|
||||
checkMissingIterableValueType: false
|
||||
14
public/css/app.css
vendored
14
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
3
public/js/app.js
vendored
3
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
77
public/js/app.js.LICENSE.txt
Normal file
77
public/js/app.js.LICENSE.txt
Normal file
@@ -0,0 +1,77 @@
|
||||
/*!
|
||||
* Bootstrap v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Determine if an object is a Buffer
|
||||
*
|
||||
* @author Feross Aboukhadijeh <https://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Sizzle CSS Selector Engine v2.3.5
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://js.foundation/
|
||||
*
|
||||
* Date: 2020-03-14
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Vue.js v2.6.12
|
||||
* (c) 2014-2020 Evan You
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.5.1
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2020-05-04T22:49Z
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Lodash <https://lodash.com/>
|
||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
|
||||
/**!
|
||||
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
||||
* @version 1.16.1
|
||||
* @license
|
||||
* Copyright (c) 2016 Federico Zivolo and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
4
public/mix-manifest.json
Normal file
4
public/mix-manifest.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"/js/app.js": "/js/app.js",
|
||||
"/css/app.css": "/css/app.css"
|
||||
}
|
||||
15
resources/lang/en/test.php
Normal file
15
resources/lang/en/test.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used during authentication for various
|
||||
| messages that we need to display to the user. You are free to modify
|
||||
| these language lines according to your application's requirements.
|
||||
|
|
||||
*/
|
||||
'failed' => 'These credentials do not match our records.',
|
||||
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
|
||||
];
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
":itemname is available!": ":itemname está disponível!",
|
||||
"Hi, :username,": "Olá, :username,",
|
||||
"Good news: :itemname is available!": "Uma boa notícia: :itemname está disponível!",
|
||||
"Good news: :itemname is available!": "Boa notícia: :itemname está disponível!",
|
||||
"The item <em>:itemname (:productname)</em> is now available on **Share It**.": "O item <em>:itemname (:productname)</em> já está disponível no **Share It**.",
|
||||
"**Take It** before anyone else at the website:": "Entre no nosso site para usar o item antes de todo mundo.",
|
||||
|
||||
@@ -46,5 +46,7 @@
|
||||
|
||||
"The item doesn't exist.": "O item não existe.",
|
||||
"The product doesn't exist or doesn't belongs to you.": "O produto não existe ou não é seu.",
|
||||
"This item is already taken": "Esse item já está sendo usado"
|
||||
"This item is already taken": "Esse item já está sendo usado.",
|
||||
"You cannot return an item that is not with you": "Você não pode devolver um item que não está com você.",
|
||||
"Oh! This item has just being returned. Take it before anyone else!": "Opa! Esse item acabou de ser devolvido. Aproveite!"
|
||||
}
|
||||
@@ -14,8 +14,10 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form class="d-inline" method="POST" action="{{ route('verification.resend') }}">
|
||||
@csrf
|
||||
{{ __('Before proceeding, please check your email for a verification link.') }}
|
||||
{{ __('If you did not receive the email') }}, <a href="{{ route('verification.resend') }}">{{ __('click here to request another') }}</a>.
|
||||
{{ __('If you did not receive the email') }}, <button type="submit" class="btn btn-link p-0 m-0 align-baseline">{{ __('click here to request another') }}</button>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,9 +3,13 @@
|
||||
@section('content')
|
||||
|
||||
<script type="text/javascript">
|
||||
setInterval(function() {
|
||||
window.location.reload(true);
|
||||
}, 2*60000); //NOTE: period is passed in milliseconds
|
||||
setInterval(
|
||||
function() {
|
||||
if (!document.hasFocus() ) {
|
||||
window.location.reload(true);
|
||||
}
|
||||
},
|
||||
2*60000); //NOTE: period is passed in milliseconds
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
|
||||
@@ -17,3 +17,4 @@
|
||||
<!-- Copyright -->
|
||||
</div>
|
||||
</footer>
|
||||
@include('layouts.tracker')
|
||||
3
resources/views/layouts/tracker.blade.php
Normal file
3
resources/views/layouts/tracker.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<script type="text/javascript">
|
||||
var owa_baseUrl='https://brunofontes.net/owa/';var owa_cmds=owa_cmds||[];owa_cmds.push(['setSiteId','15a38975230dfe7528d647a1419be7f7']);owa_cmds.push(['trackPageView']);owa_cmds.push(['trackClicks']);owa_cmds.push(['trackDomStream']);(function(){var _owa=document.createElement('script');_owa.type='text/javascript';_owa.async=true;owa_baseUrl=('https:'==document.location.protocol?window.owa_baseSecUrl||owa_baseUrl.replace(/http:/,'https:'):owa_baseUrl);_owa.src=owa_baseUrl+'modules/base/js/owa.tracker-combined-min.js';var _owa_s=document.getElementsByTagName('script')[0];_owa_s.parentNode.insertBefore(_owa,_owa_s)}());
|
||||
</script>
|
||||
@@ -114,5 +114,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layouts.tracker')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
1
ssh_homestead.sh
Normal file
1
ssh_homestead.sh
Normal file
@@ -0,0 +1 @@
|
||||
ssh homestead -t "cd code/Bruno\ Fontes/shareit; bash --login"
|
||||
4
start_vagrant.sh
Normal file
4
start_vagrant.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/zsh
|
||||
builtin cd ~/development/laravelHomestead && /usr/bin/vagrant up && builtin cd -
|
||||
~/Apps/firefox/firefox-bin http://shareit.test
|
||||
~/Apps/firefox/firefox-bin https://mailtrap.io/inboxes/455614/messages
|
||||
1
updateCompserNPM.sh
Normal file
1
updateCompserNPM.sh
Normal file
@@ -0,0 +1 @@
|
||||
ssh homestead -t 'cd code/Bruno\ Fontes/shareit; echo; echo -n "Press enter to update Composer..."; read; composer update; echo; echo -n "Press enter to update NPM..."; read; npm update; echo; echo -n "Press enter to exit..."; read'
|
||||
Reference in New Issue
Block a user