mirror of
https://github.com/brunofontes/shareit.git
synced 2025-12-13 19:12:08 -03:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
5be29fc3d8
|
|||
|
6b20397e9d
|
|||
|
67d7e34baa
|
|||
|
b7002e1d05
|
|||
|
f6ab437889
|
|||
|
9a66b65f38
|
|||
|
b49ec06062
|
|||
|
4764b74415
|
|||
|
a3e9abbd4c
|
|||
|
0cd807169e
|
|||
|
d87d4ba4bf
|
|||
|
61b54ecdd8
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -14,4 +14,5 @@ yarn-error.log
|
|||||||
.phpunit.result.cache
|
.phpunit.result.cache
|
||||||
mergeAndDeploy.sh
|
mergeAndDeploy.sh
|
||||||
start_vagrant.sh
|
start_vagrant.sh
|
||||||
|
stop_vagrant.sh
|
||||||
ssh_homestead.sh
|
ssh_homestead.sh
|
||||||
@@ -73,7 +73,7 @@ class RegisterController extends Controller
|
|||||||
|
|
||||||
\Mail::to($user)->send(new Welcome($user));
|
\Mail::to($user)->send(new Welcome($user));
|
||||||
|
|
||||||
session()->flash(FlashMessage::PRIMARY, 'Thanks for registering. Please, do not forget to validate your e-mail address.');
|
session()->flash(FlashMessage::PRIMARY, __('Thanks for registering. Please, do not forget to validate your e-mail address.'));
|
||||||
|
|
||||||
return $user;
|
return $user;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class VerificationController extends Controller
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $redirectTo = '/home';
|
protected $redirectTo = '/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use \App\User;
|
use \App\User;
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
class HomeController extends Controller
|
class HomeController extends Controller
|
||||||
{
|
{
|
||||||
@@ -34,6 +33,19 @@ class HomeController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the user_id alreay exists on $users array.
|
||||||
|
*
|
||||||
|
* @param array $users The array with users
|
||||||
|
* @param int $user_id The user_id to try to find on array
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function isNewUser($users, $user_id)
|
||||||
|
{
|
||||||
|
return ($user_id && !isset($users[$user_id]));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the application dashboard.
|
* Show the application dashboard.
|
||||||
*
|
*
|
||||||
@@ -45,14 +57,16 @@ class HomeController extends Controller
|
|||||||
$items = User::loggedIn()->items()->with('users')->get();
|
$items = User::loggedIn()->items()->with('users')->get();
|
||||||
|
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
if ($item->used_by && !isset($users[$item->used_by])) {
|
if ($this->isNewUser($users, $item->used_by)) {
|
||||||
$users[$item->used_by] = $this->findName($item->users, $item->used_by);
|
$users[$item->used_by] = $this->findName($item->users, $item->used_by);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($item->waiting_user_id && !isset($users[$item->waiting_user_id])) {
|
if ($this->isNewUser($users, $item->waiting_user_id)) {
|
||||||
$users[$item->waiting_user_id] = $this->findName($item->users, $item->waiting_user_id);
|
$users[$item->waiting_user_id] = $this->findName($item->users, $item->waiting_user_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return view('home', compact('items', 'users'));
|
|
||||||
|
$products = $items->sortBy('product.name', SORT_NATURAL | SORT_FLAG_CASE)->groupBy('product.name');
|
||||||
|
return view('home', compact('products', 'users'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,11 @@ class ItemController extends Controller
|
|||||||
{
|
{
|
||||||
$item = Item::find($id);
|
$item = Item::find($id);
|
||||||
if (!$item || $item->product->user_id != \Auth::id()) {
|
if (!$item || $item->product->user_id != \Auth::id()) {
|
||||||
session()->flash(flash::DANGER, "The item doesn't exist.");
|
session()->flash(flash::DANGER,
|
||||||
|
\Lang::getFromJson(
|
||||||
|
"The item doesn't exist."
|
||||||
|
)
|
||||||
|
);
|
||||||
return back();
|
return back();
|
||||||
}
|
}
|
||||||
$users = $item->users()->get();
|
$users = $item->users()->get();
|
||||||
|
|||||||
@@ -71,7 +71,12 @@ class ProductController extends Controller
|
|||||||
$product = Product::fromAuthUser()->find($id);
|
$product = Product::fromAuthUser()->find($id);
|
||||||
|
|
||||||
if (!$product) {
|
if (!$product) {
|
||||||
session()->flash(flash::DANGER, "The product doesn't exist or doesn't belongs to you.");
|
session()->flash(
|
||||||
|
flash::DANGER,
|
||||||
|
\Lang::getFromJson(
|
||||||
|
"The product doesn't exist or doesn't belongs to you."
|
||||||
|
)
|
||||||
|
);
|
||||||
return redirect('/product');
|
return redirect('/product');
|
||||||
}
|
}
|
||||||
return view('product.show', compact('product'));
|
return view('product.show', compact('product'));
|
||||||
|
|||||||
@@ -13,7 +13,11 @@ class TakeController extends Controller
|
|||||||
{
|
{
|
||||||
$item = User::loggedIn()->items()->find(request('item'));
|
$item = User::loggedIn()->items()->find(request('item'));
|
||||||
if ($item->used_by) {
|
if ($item->used_by) {
|
||||||
return back()->withErrors("This item is already taken");
|
return back()->withErrors(
|
||||||
|
\Lang::getFromJson(
|
||||||
|
"This item is already taken"
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$item->used_by = \Auth::id();
|
$item->used_by = \Auth::id();
|
||||||
$item->save();
|
$item->save();
|
||||||
|
|||||||
@@ -42,14 +42,22 @@ class UserController extends Controller
|
|||||||
$userArray = User::where('email', request('email'))->get();
|
$userArray = User::where('email', request('email'))->get();
|
||||||
|
|
||||||
if (count($userArray) == 0) {
|
if (count($userArray) == 0) {
|
||||||
return back()->withErrors("The e-mail address is not registered yet.");
|
return back()->withErrors(
|
||||||
|
\Lang::getFromJson("The e-mail address is not registered yet.")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$item = Item::findOrFail(request('item_id'));
|
$item = Item::findOrFail(request('item_id'));
|
||||||
if ($item->product->user_id == \Auth::id()) {
|
if ($item->product->user_id == \Auth::id()) {
|
||||||
User::findOrFail($userArray[0]->id)->items()->syncWithoutDetaching([request('item_id')]);
|
User::findOrFail($userArray[0]->id)
|
||||||
|
->items()
|
||||||
|
->syncWithoutDetaching([request('item_id')]);
|
||||||
} else {
|
} else {
|
||||||
return back()->withErrors("You cannot add a user to a product that is not yourse.");
|
return back()->withErrors(
|
||||||
|
\Lang::getFromJson(
|
||||||
|
"You cannot add a user to a product that is not yourse."
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return back();
|
return back();
|
||||||
}
|
}
|
||||||
@@ -67,12 +75,20 @@ class UserController extends Controller
|
|||||||
$item = Item::findOrFail(request('item_id'));
|
$item = Item::findOrFail(request('item_id'));
|
||||||
|
|
||||||
if ($item->product->user_id == \Auth::id()) {
|
if ($item->product->user_id == \Auth::id()) {
|
||||||
$returnItem = User::findOrFail(request('user_id'))->items()->findOrFail(request('item_id'));
|
$returnItem = User::findOrFail(request('user_id'))
|
||||||
|
->items()
|
||||||
|
->findOrFail(request('item_id'));
|
||||||
$returnItem->used_by = null;
|
$returnItem->used_by = null;
|
||||||
$returnItem->save();
|
$returnItem->save();
|
||||||
User::findOrFail(request('user_id'))->items()->detach([request('item_id')]);
|
User::findOrFail(request('user_id'))
|
||||||
|
->items()
|
||||||
|
->detach([request('item_id')]);
|
||||||
} else {
|
} else {
|
||||||
return back()->withErrors("You cannot remove a user from a product that is not yourse.");
|
return back()->withErrors(
|
||||||
|
\Lang::getFromJson(
|
||||||
|
"You cannot remove a user from a product that is not yourse."
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return back();
|
return back();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class Kernel extends HttpKernel
|
|||||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
|
\App\Http\Middleware\Locale::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
'api' => [
|
'api' => [
|
||||||
|
|||||||
21
app/Http/Middleware/Locale.php
Normal file
21
app/Http/Middleware/Locale.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
|
||||||
|
class Locale
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next)
|
||||||
|
{
|
||||||
|
\App::setLocale(session('lang'));
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -32,7 +32,11 @@ class ItemAvailable extends Mailable
|
|||||||
*/
|
*/
|
||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
return $this->subject($this->item->name . ' is available!')
|
return $this->subject(
|
||||||
->markdown('emails.itemAvailable');
|
\Lang::getFromJson(
|
||||||
|
':itemname is available!',
|
||||||
|
['itemname' => $this->item->name]
|
||||||
|
)
|
||||||
|
)->markdown('emails.itemAvailable');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,14 @@ class UserWaiting extends Mailable
|
|||||||
*/
|
*/
|
||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
return $this->subject($this->waitingUser . ' wants to use ' . $this->item->name)
|
return $this->subject(
|
||||||
->markdown('emails.userWaiting');
|
\Lang::getFromJson(
|
||||||
|
':waitinguser wants to use :itemname',
|
||||||
|
[
|
||||||
|
'waitinguser' => $this->waitingUser,
|
||||||
|
'itemname' => $this->item->name
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)->markdown('emails.userWaiting');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Mail;
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use \Lang;
|
||||||
use \App\User;
|
use \App\User;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Mail\Mailable;
|
use Illuminate\Mail\Mailable;
|
||||||
@@ -30,6 +31,6 @@ class Welcome extends Mailable
|
|||||||
*/
|
*/
|
||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
return $this->markdown('emails.welcome');
|
return $this->subject(Lang::getFromJson('Welcome'))->markdown('emails.welcome');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
15
readme.md
15
readme.md
@@ -1,16 +1,7 @@
|
|||||||
# Share It
|
# Share It
|
||||||
|
|
||||||
Cada usuário, identificado por e-mail, pode ter outros amigos
|
Just a simple tool to share items with friends.
|
||||||
|
|
||||||
## DB
|
It is my first try with Laravel, so I am just learning it. :)
|
||||||
|
|
||||||
[x] usuário(nome, email)
|
More information about **Share It** [here](https://shareit.brunofontes.net/help).
|
||||||
[x] product[site/software](nome, admin)
|
|
||||||
[ ] usersPerItem(productID, userID)
|
|
||||||
[x] item[licença](nome, productID, used_by, usedSince)
|
|
||||||
[ ] waiting(userID, itemID, waitingSince)
|
|
||||||
|
|
||||||
## VIEWS
|
|
||||||
|
|
||||||
- Product (administration)
|
|
||||||
- Item (view itens, other itens from the same product if this one is occupied)
|
|
||||||
73
resources/lang/en/help.php
Normal file
73
resources/lang/en/help.php
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Strings from the Help page
|
||||||
|
* They are separeted by help group
|
||||||
|
*/
|
||||||
|
|
||||||
|
return [
|
||||||
|
'helpTitle' => 'Help...',
|
||||||
|
/**
|
||||||
|
* What is it?
|
||||||
|
*/
|
||||||
|
'whatIsIt' => 'What is it?',
|
||||||
|
'siteHelpOthers' => '<p><strong>Share It!</strong> is a site dedicated to help you sharing items with others.</p>
|
||||||
|
<p>But before sharing anything, you just need to understand 2 basic ideas:</p>',
|
||||||
|
'product_item' => '<li><strong>Product</strong> - The category that has some similar items</li>
|
||||||
|
<li><strong>Item</strong> - The item that will be shared. Every item belongs to a <strong>Product</strong></li>',
|
||||||
|
'examples' => "<strong><em>Examples:</em></strong> You can create the following Categories/Items</p>
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>Books -> Don Quixote, The Hitchhiker's Guide to the Galaxy</li>
|
||||||
|
<li>Matrix Movies -> Matrix 1, Matrix 2, Matrix 3</li>
|
||||||
|
<li>Website Y -> <em>YourAccount</em>*</li>
|
||||||
|
</ul>
|
||||||
|
<p><em>* Please note that many websites does not allow sharing your account. Read the site EULA before include it here.</em></p>",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Step-by-step
|
||||||
|
*/
|
||||||
|
'step_title' => 'Step-by-step',
|
||||||
|
'step_sharing_subtitle' => 'Sharing a product/item',
|
||||||
|
'step_sharing_steps' => '<li>Go to the <strong><a href="/product">Products</a></strong> page;</li>
|
||||||
|
<li>Include the Product and click on it;</li>
|
||||||
|
<li>Include an Item that belongs to that Product and click on it;</li>
|
||||||
|
<li>Add other people with their subscribed e-mail address.</li>',
|
||||||
|
|
||||||
|
'step_sharedItem_subtitle' => 'Using a shared item',
|
||||||
|
'step_sharedItem_steps' => '<li>Go to the <strong><a href="/home">Home</a></strong> page (tip: add this page as a bookmark);</li>
|
||||||
|
<li>Click on <strong>Take</strong> to take the item you want to use;</li>
|
||||||
|
<li>When you finish using it, click on <strong>Return</strong> button.</li>',
|
||||||
|
|
||||||
|
'step_getAlerted_subtitle' => 'Getting alerted when an item is available',
|
||||||
|
'step_getAlerted_steps' => '<li>Go to the <strong><a href="/home">Home</a></strong> page (tip: add this page as a bookmark);</li>
|
||||||
|
<li>Click on <strong>Alert me</strong> next the taken item;</li>
|
||||||
|
<li>The active user will be alerted you want to use it later. When the person return it, you will be notified.</li>',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Screens
|
||||||
|
*/
|
||||||
|
'screens_title' => 'Screens',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Home
|
||||||
|
*/
|
||||||
|
'home_title' => 'Home',
|
||||||
|
'home_body' => '<p>The <strong>Home</strong> is the main screen where you will going to <strong>Take</strong>
|
||||||
|
and <strong>Return</strong> items.</p>
|
||||||
|
<p>It shows all items that were shared with you or that you are sharing, unless you remove yourself from there.</p>
|
||||||
|
<p>If the item has a website, the items name will become a link, so you can just click on it to open.</p>
|
||||||
|
<p>When the item you want is already taken, you are going to see who got it and for how long.
|
||||||
|
So you can identify if the person is still using it or if someone just forgot to return it.</p>
|
||||||
|
<p>You can also ask to be alerted when the item is available. This will notify the active
|
||||||
|
user that you want to use that item. So the person can return it as soon as they finish using it.</p>',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Products
|
||||||
|
*/
|
||||||
|
'products_title' => 'Products',
|
||||||
|
'products_body' => '<p>The <strong>Products</strong> is the screen to include Products and Items.</p>
|
||||||
|
<p>You can also <strong>add users</strong> to your items from this screen.
|
||||||
|
To be able to do that you just need to select the item.</p>
|
||||||
|
<p class="mb-4">When adding a Product, you can specify a webpage (this is optional).</p>',
|
||||||
|
|
||||||
|
];
|
||||||
12
resources/lang/en/home.php
Normal file
12
resources/lang/en/home.php
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// /resources/views/home.blade.php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'no_messages' => 'There are no items shared with you yet.',
|
||||||
|
'share_item' => 'Share an item!',
|
||||||
|
'return' => 'Return It',
|
||||||
|
'cancel_alert' => 'Cancel Alert',
|
||||||
|
'alert_me' => 'Alert me',
|
||||||
|
'take' => 'Take It'
|
||||||
|
];
|
||||||
40
resources/lang/en/item.php
Normal file
40
resources/lang/en/item.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
/**
|
||||||
|
* Strings from Item Delete button menu
|
||||||
|
*/
|
||||||
|
'confirmation' => 'Confirmation...',
|
||||||
|
'confirmDeletion' => 'Would you like to delete the item <strong>:itemname</strong>?',
|
||||||
|
'notAbleRestore' => 'You will not be able to restore it after deletion.',
|
||||||
|
'close' => 'Close',
|
||||||
|
'delete' => 'Delete',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Strings from Item Edit button menu
|
||||||
|
*/
|
||||||
|
'edit' => 'Edit',
|
||||||
|
'edititem' => 'Edit item',
|
||||||
|
'newname' => 'New name:',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Strings from the Users box on Item page
|
||||||
|
*/
|
||||||
|
'users' => 'Users:',
|
||||||
|
'noItems' => 'There are no items yet. Include one with the form above.',
|
||||||
|
'addUser' => 'Add user',
|
||||||
|
'email' => 'E-mail: ',
|
||||||
|
'nameDomain' => 'name@domain.com',
|
||||||
|
'insert' => 'Insert',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* String from otherItems.blade.php - Other items box from item page
|
||||||
|
*/
|
||||||
|
'otherItems' => 'Other items from the same product',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* String from item.blade.php
|
||||||
|
*/
|
||||||
|
'back' => 'BACK',
|
||||||
|
|
||||||
|
];
|
||||||
63
resources/lang/en/product.php
Normal file
63
resources/lang/en/product.php
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Strings from the product pages
|
||||||
|
* They are separeted by the file that calls them.
|
||||||
|
* Sometimes, a string is used on another file,
|
||||||
|
* so it will stay at the common segment.
|
||||||
|
*/
|
||||||
|
|
||||||
|
return [
|
||||||
|
/**
|
||||||
|
* COMMON
|
||||||
|
*/
|
||||||
|
'insert' => 'Insert',
|
||||||
|
'close' => 'Close',
|
||||||
|
'' => '',
|
||||||
|
'' => '',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* addItemForm.blade.php
|
||||||
|
*/
|
||||||
|
'item' => 'Item:',
|
||||||
|
'100yearsSolitude' => 'One Hundred Years of Solitude',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* addProductForm.blade.php
|
||||||
|
*/
|
||||||
|
'name' => 'Name:',
|
||||||
|
'book' => 'Book',
|
||||||
|
'url' => 'URL:',
|
||||||
|
'optionalUrlExample' => '(Optional) http://bookwebsite.com',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* deleteButton.blade.php
|
||||||
|
*/
|
||||||
|
'delete' => 'Delete',
|
||||||
|
'confirmation' => 'Confirmation...',
|
||||||
|
'wannaDelete' => "Would you like to delete the product <strong>:productname</strong> and it's items?",
|
||||||
|
'notAbleRestore' => 'You will not be able to restore it after deletion.',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* editButton.blade.php
|
||||||
|
*/
|
||||||
|
'edit' => 'Edit',
|
||||||
|
'editProduct' => 'Edit product',
|
||||||
|
'newName' => 'New name:',
|
||||||
|
'newUrl' => 'New url:',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* index.blade.php
|
||||||
|
*/
|
||||||
|
'products' => 'Products',
|
||||||
|
'noProductsYet' => 'There are no products yet. Include one with the form above.',
|
||||||
|
'addProduct' => 'Add product',
|
||||||
|
'yourItems' => 'Your items',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* show.blade.php
|
||||||
|
*/
|
||||||
|
'items' => 'Items:',
|
||||||
|
'noItemsYet' => 'There are no items yet. Include one with the form above.',
|
||||||
|
'addItem' => 'Add item',
|
||||||
|
'back' => 'BACK',
|
||||||
|
];
|
||||||
10
resources/lang/en/welcome.php
Normal file
10
resources/lang/en/welcome.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
return [
|
||||||
|
'Home' => 'Home',
|
||||||
|
'Login' => 'Login',
|
||||||
|
'Register' => 'Register',
|
||||||
|
'Products' => 'Products',
|
||||||
|
'Help' => 'Help',
|
||||||
|
'copyright' => '© 2018 Bruno Fontes All Rights Reserved',
|
||||||
|
'byAuthor' => 'By Bruno Fontes',
|
||||||
|
];
|
||||||
50
resources/lang/pt-br.json
Normal file
50
resources/lang/pt-br.json
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"Reset Password": "Redefinir senha",
|
||||||
|
"E-Mail Address" : "E-mail",
|
||||||
|
"Send Password Reset Link" : "Redefinir senha",
|
||||||
|
"Password" : "Senha",
|
||||||
|
"Confirm Password" : "Confirmar senha",
|
||||||
|
"Login" : "Entrar",
|
||||||
|
"Remember Me" : "Manter conectado",
|
||||||
|
"Forgot Your Password?" : "Esqueceu sua senha?",
|
||||||
|
"Register" : "Cadastrar",
|
||||||
|
"Name" : "Nome",
|
||||||
|
"Logout" : "Desconectar",
|
||||||
|
"Verify Your Email Address" : "Confirme seu e-mail",
|
||||||
|
"A fresh verification link has been sent to your email address." : "Enviamos outro link de confirmação para o seu e-mail.",
|
||||||
|
"Before proceeding, please check your email for a verification link." : "Antes de continuar, use o link de confirmação que enviamos para o seu e-mail.",
|
||||||
|
"If you did not receive the email" : "Se você não recebeu o e-mail",
|
||||||
|
"click here to request another" : "clique aqui para enviar novamente",
|
||||||
|
"Thanks for registering. Please, do not forget to validate your e-mail address." : "Obrigado por se cadastrar. Não esqueça de validar seu e-mail.",
|
||||||
|
|
||||||
|
"Welcome": "Bem-vindo!",
|
||||||
|
"Welcome, :username,": "Bem-vindo, :username,",
|
||||||
|
"Thank's for registering at **Share It!**" : "Obrigado por se registrar no **Share It!**",
|
||||||
|
"Your account was created, but you still need to activate it. We've sent you another e-mail and we are ready to go!" : "Sua conta foi criada, mas você ainda precisa confirmar o seu e-mail para usá-la. Enviamos um outro e-mail com a confirmação.",
|
||||||
|
"And you? Are you ready to Share It with your friends?" : "E você? Está pronto para compartilhar?",
|
||||||
|
|
||||||
|
":waitinguser wants to use :itemname": ":waitinguser quer usar :itemname",
|
||||||
|
"Hello!": "Olá!",
|
||||||
|
"Verify Email Address" : "Confirme o seu e-mail",
|
||||||
|
"Please click the button below to verify your email address." : "Clique no botão abaixo para confirmar o seu e-mail.",
|
||||||
|
"If you did not create an account, no further action is required." : "Se você não criou uma conta, basta ignorar este e-mail.",
|
||||||
|
"Regards": "Obrigado",
|
||||||
|
|
||||||
|
":itemname is available!": ":itemname está disponível!",
|
||||||
|
"Hi, :username,": "Olá, :username,",
|
||||||
|
"Good news: :itemname is available!": "Uma 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.",
|
||||||
|
|
||||||
|
"Are you still using :itemname?": "Você ainda está usando o item :itemname?",
|
||||||
|
"We just want to let you know that :waitinguser asked us to be alerted when this item were available.": "A gente apenas queria dizer que :waitinguser nos pediu para avisar quando esse item estivesse disponível.",
|
||||||
|
"So, if you are not using it anymore, please **Return It** at the website:": "Então, se você não estiver mais usando, por favor, **Devolva** no nosso site:",
|
||||||
|
|
||||||
|
"The e-mail address is not registered yet.": "Esse usuário ainda não está cadastrado.",
|
||||||
|
"You cannot add a user to a product that is not yourse.": "Você não pode adicionar um usuário a um produto que não é seu.",
|
||||||
|
"You cannot remove a user from a product that is not yourse.": "Você não pode remover um usuário de um produto que não é seu.",
|
||||||
|
|
||||||
|
"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"
|
||||||
|
}
|
||||||
19
resources/lang/pt-br/auth.php
Normal file
19
resources/lang/pt-br/auth.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used during authentication for various
|
||||||
|
| messages that we need to display to the user. You are free to modify
|
||||||
|
| these language lines according to your application's requirements.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'failed' => 'Login ou senha inválidos.',
|
||||||
|
'throttle' => 'Limite tentativas excedido. Você pode tentar novamente após :seconds segundos.',
|
||||||
|
|
||||||
|
];
|
||||||
74
resources/lang/pt-br/help.php
Normal file
74
resources/lang/pt-br/help.php
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Strings from the Help page
|
||||||
|
* They are separeted by help group
|
||||||
|
*/
|
||||||
|
|
||||||
|
return [
|
||||||
|
'helpTitle' => 'Ajuda...',
|
||||||
|
/**
|
||||||
|
* What is it?
|
||||||
|
*/
|
||||||
|
'whatIsIt' => 'O que é?',
|
||||||
|
'siteHelpOthers' => '<p><strong>Share It!</strong> é um site que te ajudar a compartilhar seus items com seus amigos.</p>
|
||||||
|
<p>Mas antes de qualquer coisa, você precisa entender duas ideias básicas:</p>',
|
||||||
|
'product_item' => '<li><strong>Produto</strong> - Um grupo que contém itens similares</li>
|
||||||
|
<li><strong>Item</strong> - O item que será compartilhado. Cada item pertence a um <strong>Produto</strong></li>',
|
||||||
|
'examples' => "<strong><em>Exemplos:</em></strong> Você pode criar os seguintes Produtos/Itens:</p>
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>Livros -> Don Quixote, O guia do mochileiro das galáxias</li>
|
||||||
|
<li>Filmes Matrix -> Matrix 1, Matrix 2, Matrix 3</li>
|
||||||
|
<li>Site Y -> <em>SuaConta</em>*</li>
|
||||||
|
</ul>
|
||||||
|
<p><em>* Observe que muitos sites não permitem compartilhar sua conta. Leia atentamente o contrato do serviço antes de incluí-lo aqui.</em></p>",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Step-by-step
|
||||||
|
*/
|
||||||
|
'step_title' => 'Passo a passo',
|
||||||
|
'step_sharing_subtitle' => 'Compartilhando um produto/item',
|
||||||
|
'step_sharing_steps' => '<li>Vá para a página <strong><a href="/product">Produtos</a></strong>;</li>
|
||||||
|
<li>Inclua o Produto e clique nele;</li>
|
||||||
|
<li>Inclua um item que pertence ao produto cadastrado e clique nele;</li>
|
||||||
|
<li>Adicione outras pessoas pelo e-mail que elas se cadastram.</li>',
|
||||||
|
|
||||||
|
'step_sharedItem_subtitle' => 'Usando um item compartilhado',
|
||||||
|
'step_sharedItem_steps' => '<li>Vá até a página <strong><a href="/home">Início</a></strong> (dica: adicione essa página aos seus favoritos);</li>
|
||||||
|
<li>Clique em <strong>Usar</strong> para usar o item que deseja;</li>
|
||||||
|
<li>Ao terminar de usar, clique no botão <strong>Devolver</strong>.</li>',
|
||||||
|
|
||||||
|
'step_getAlerted_subtitle' => 'Sendo avisado quando um item está disponível',
|
||||||
|
'step_getAlerted_steps' => '<li>Vá até a página <strong><a href="/home">Início</a></strong> (dica: adicione essa página aos seus favoritos);</li>
|
||||||
|
<li>Clique no botão <strong>Alertar</strong> próximo ao item que está em uso;</li>
|
||||||
|
<li>O atual usuário será avisado que você quer usar o item. Quando a pessoa devolver, você será notificado.</li>',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Screens
|
||||||
|
*/
|
||||||
|
'screens_title' => 'Páginas',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Home
|
||||||
|
*/
|
||||||
|
'home_title' => 'Início',
|
||||||
|
'home_body' => '<p>A tela <strong>Início</strong> é a sua página principal. Lá você vai <strong>Usar</strong>
|
||||||
|
e <strong>Devolver</strong> itens.</p>
|
||||||
|
<p>Ela exibe todos os itens que estão sendo compartilhados com você ou que você está compartilhando
|
||||||
|
a menos que você se remova de lá.</p>
|
||||||
|
<p>Se um item tiver um site cadastrado, ele aparecerá como um link. Então você pode clicar nele para abrir a página.</p>
|
||||||
|
<p>Quanto o item que você quiser já estiver em uso, você vai ver quem o está usando e por quanto tempo.
|
||||||
|
Então você pode identificar se a pessoa ainda está usando ou se aparentemente ela esqueceu de retorná-lo.</p>
|
||||||
|
<p>Você também pode pedir para ser avisado quando o item estiver disponível. Isso vai avisar o usuário ativo
|
||||||
|
que você está esperando por ele. Então a pessoa pode devolvê-lo assim que ela terminar de usar.</p>',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Products
|
||||||
|
*/
|
||||||
|
'products_title' => 'Produtos',
|
||||||
|
'products_body' => '<p>A página <strong>Produtos</strong> é a tela usada para incluir Produtos e Itens.</p>
|
||||||
|
<p>Você também pode <strong>incluir usuários</strong> aos seus items nessa tela.
|
||||||
|
Para fazer isso, você só precisa clicar no item que deseja compartilhar e incluir outras pessoas.</p>
|
||||||
|
<p class="mb-4">Ao adicionar um produto, você pode especificar um site (opcional).</p>',
|
||||||
|
|
||||||
|
];
|
||||||
12
resources/lang/pt-br/home.php
Normal file
12
resources/lang/pt-br/home.php
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// /resources/views/home.blade.php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'no_messages' => 'Ainda não há itens compartilhados com você.',
|
||||||
|
'share_item' => 'Compartilhe um item!',
|
||||||
|
'return' => 'Devolver',
|
||||||
|
'cancel_alert' => 'Cancelar alerta',
|
||||||
|
'alert_me' => 'Alertar',
|
||||||
|
'take' => 'Usar'
|
||||||
|
];
|
||||||
39
resources/lang/pt-br/item.php
Normal file
39
resources/lang/pt-br/item.php
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
/**
|
||||||
|
* Strings from Item Delete button menu
|
||||||
|
*/
|
||||||
|
'confirmation' => 'Confirmação...',
|
||||||
|
'confirmDeletion' => 'Você gostaria de apagar o item <strong>:itemname</strong>?',
|
||||||
|
'notAbleRestore' => 'Não será possível restaurá-lo posteriormente.',
|
||||||
|
'close' => 'Fechar',
|
||||||
|
'delete' => 'Apagar',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Strings from Item Edit button menu
|
||||||
|
*/
|
||||||
|
'edit' => 'Editar',
|
||||||
|
'edititem' => 'Editar item',
|
||||||
|
'newname' => 'Novo nome:',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Strings from the Users box on Item page
|
||||||
|
*/
|
||||||
|
'users' => 'Usuários:',
|
||||||
|
'noItems' => 'Não há itens cadastrados. Adicione um no formulário acima.',
|
||||||
|
'addUser' => 'Adicionar usuário',
|
||||||
|
'email' => 'E-mail: ',
|
||||||
|
'nameDomain' => 'nome@dominio.com.br',
|
||||||
|
'insert' => 'Inserir',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* String from otherItems.blade.php - Other items box from item page
|
||||||
|
*/
|
||||||
|
'otherItems' => 'Outros items do mesmo produto',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* String from item.blade.php
|
||||||
|
*/
|
||||||
|
'back' => 'VOLTAR',
|
||||||
|
];
|
||||||
19
resources/lang/pt-br/pagination.php
Normal file
19
resources/lang/pt-br/pagination.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Pagination Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used by the paginator library to build
|
||||||
|
| the simple pagination links. You are free to change them to anything
|
||||||
|
| you want to customize your views to better match your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'previous' => '« Anterior',
|
||||||
|
'next' => 'Próxima »',
|
||||||
|
|
||||||
|
];
|
||||||
22
resources/lang/pt-br/passwords.php
Normal file
22
resources/lang/pt-br/passwords.php
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Reset Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are the default lines which match reasons
|
||||||
|
| that are given by the password broker for a password update attempt
|
||||||
|
| has failed, such as for an invalid token or invalid new password.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'password' => 'As senhas precisam ter pelo menos 6 caracteres e serem iguais a confirmação.',
|
||||||
|
'reset' => 'Sua senha foi redefinida!',
|
||||||
|
'sent' => 'O link para redefinir sua senha foi enviado por e-mail!',
|
||||||
|
'token' => 'O token de redefinição de senha é inválido.',
|
||||||
|
'user' => "Não foi possível encontrar um usuário com o e-mail digitado.",
|
||||||
|
|
||||||
|
];
|
||||||
61
resources/lang/pt-br/product.php
Normal file
61
resources/lang/pt-br/product.php
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Strings from the product pages
|
||||||
|
* They are separeted by the file that calls them.
|
||||||
|
* Sometimes, a string is used on another file,
|
||||||
|
* so it will stay at the common segment.
|
||||||
|
*/
|
||||||
|
|
||||||
|
return [
|
||||||
|
/**
|
||||||
|
* COMMON
|
||||||
|
*/
|
||||||
|
'insert' => 'Inserir',
|
||||||
|
'close' => 'Fechar',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* addItemForm.blade.php
|
||||||
|
*/
|
||||||
|
'item' => 'Item:',
|
||||||
|
'100yearsSolitude' => 'Cem anos de solidão',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* addProductForm.blade.php
|
||||||
|
*/
|
||||||
|
'name' => 'Nome:',
|
||||||
|
'book' => 'Livro',
|
||||||
|
'url' => 'URL:',
|
||||||
|
'optionalUrlExample' => '(Opcional) http://sitedolivro.com.br',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* deleteButton.blade.php
|
||||||
|
*/
|
||||||
|
'delete' => 'Apagar',
|
||||||
|
'confirmation' => 'Confirmação...',
|
||||||
|
'wannaDelete' => "Você gostaria de apagar o produto <strong>:productname</strong> e seus items?",
|
||||||
|
'notAbleRestore' => 'Não será possível recuperá-los depois.',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* editButton.blade.php
|
||||||
|
*/
|
||||||
|
'edit' => 'Editar',
|
||||||
|
'editProduct' => 'Editar produto',
|
||||||
|
'newName' => 'Novo nome:',
|
||||||
|
'newUrl' => 'Nova url:',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* index.blade.php
|
||||||
|
*/
|
||||||
|
'products' => 'Produtos',
|
||||||
|
'noProductsYet' => 'Ainda não há produtos cadastrados. Inclua um no formulário acima.',
|
||||||
|
'addProduct' => 'Incluir produto',
|
||||||
|
'yourItems' => 'Seus items',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* show.blade.php
|
||||||
|
*/
|
||||||
|
'items' => 'Items:',
|
||||||
|
'noItemsYet' => 'Ainda não há itens cadastrados. Inclua um no formulário acima.',
|
||||||
|
'addItem' => 'Incluir item',
|
||||||
|
'back' => 'VOLTAR',
|
||||||
|
];
|
||||||
148
resources/lang/pt-br/validation.php
Normal file
148
resources/lang/pt-br/validation.php
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines contain the default error messages used by
|
||||||
|
| the validator class. Some of these rules have multiple versions such
|
||||||
|
| as the size rules. Feel free to tweak each of these messages here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'accepted' => 'The :attribute must be accepted.',
|
||||||
|
'active_url' => 'The :attribute is not a valid URL.',
|
||||||
|
'after' => 'The :attribute must be a date after :date.',
|
||||||
|
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
||||||
|
'alpha' => 'The :attribute may only contain letters.',
|
||||||
|
'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
|
||||||
|
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
||||||
|
'array' => 'The :attribute must be an array.',
|
||||||
|
'before' => 'The :attribute must be a date before :date.',
|
||||||
|
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||||
|
'between' => [
|
||||||
|
'numeric' => 'The :attribute must be between :min and :max.',
|
||||||
|
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
||||||
|
'string' => 'The :attribute must be between :min and :max characters.',
|
||||||
|
'array' => 'The :attribute must have between :min and :max items.',
|
||||||
|
],
|
||||||
|
'boolean' => 'The :attribute field must be true or false.',
|
||||||
|
'confirmed' => 'Os campos :attribute e confirmar :attribute são diferentes.',
|
||||||
|
'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 must have a value.',
|
||||||
|
'gt' => [
|
||||||
|
'numeric' => 'The :attribute must be greater than :value.',
|
||||||
|
'file' => 'The :attribute must be greater than :value kilobytes.',
|
||||||
|
'string' => 'The :attribute must be greater than :value characters.',
|
||||||
|
'array' => 'The :attribute must have more than :value items.',
|
||||||
|
],
|
||||||
|
'gte' => [
|
||||||
|
'numeric' => 'The :attribute must be greater than or equal :value.',
|
||||||
|
'file' => 'The :attribute must be greater than or equal :value kilobytes.',
|
||||||
|
'string' => 'The :attribute must be greater than or equal :value characters.',
|
||||||
|
'array' => 'The :attribute must have :value items or more.',
|
||||||
|
],
|
||||||
|
'image' => 'The :attribute must be an image.',
|
||||||
|
'in' => 'The selected :attribute is invalid.',
|
||||||
|
'in_array' => 'The :attribute field does not exist in :other.',
|
||||||
|
'integer' => 'The :attribute must be an integer.',
|
||||||
|
'ip' => 'The :attribute must be a valid IP address.',
|
||||||
|
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
||||||
|
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
||||||
|
'json' => 'The :attribute must be a valid JSON string.',
|
||||||
|
'lt' => [
|
||||||
|
'numeric' => 'The :attribute must be less than :value.',
|
||||||
|
'file' => 'The :attribute must be less than :value kilobytes.',
|
||||||
|
'string' => 'The :attribute must be less than :value characters.',
|
||||||
|
'array' => 'The :attribute must have less than :value items.',
|
||||||
|
],
|
||||||
|
'lte' => [
|
||||||
|
'numeric' => 'The :attribute must be less than or equal :value.',
|
||||||
|
'file' => 'The :attribute must be less than or equal :value kilobytes.',
|
||||||
|
'string' => 'The :attribute must be less than or equal :value characters.',
|
||||||
|
'array' => 'The :attribute must not have more than :value items.',
|
||||||
|
],
|
||||||
|
'max' => [
|
||||||
|
'numeric' => 'The :attribute may not be greater than :max.',
|
||||||
|
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
||||||
|
'string' => 'The :attribute may not be greater than :max characters.',
|
||||||
|
'array' => 'The :attribute may not have more than :max items.',
|
||||||
|
],
|
||||||
|
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||||
|
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
||||||
|
'min' => [
|
||||||
|
'numeric' => 'O campo :attribute precisa ter pelo menos :min.',
|
||||||
|
'file' => 'The :attribute must be at least :min kilobytes.',
|
||||||
|
'string' => 'O campo :attribute precisa ter pelo menos :min caracteres.',
|
||||||
|
'array' => 'The :attribute must have at least :min items.',
|
||||||
|
],
|
||||||
|
'not_in' => 'The selected :attribute is invalid.',
|
||||||
|
'not_regex' => 'The :attribute format 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.',
|
||||||
|
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||||
|
'same' => 'The :attribute and :other must match.',
|
||||||
|
'size' => [
|
||||||
|
'numeric' => 'The :attribute must be :size.',
|
||||||
|
'file' => 'The :attribute must be :size kilobytes.',
|
||||||
|
'string' => 'The :attribute must be :size characters.',
|
||||||
|
'array' => 'The :attribute must contain :size items.',
|
||||||
|
],
|
||||||
|
'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.',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify custom validation messages for attributes using the
|
||||||
|
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||||
|
| specify a specific custom language line for a given attribute rule.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'custom' => [
|
||||||
|
'attribute-name' => [
|
||||||
|
'rule-name' => 'custom-message',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Attributes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used to swap 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.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'attributes' => [
|
||||||
|
'password' => 'senha'
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
10
resources/lang/pt-br/welcome.php
Normal file
10
resources/lang/pt-br/welcome.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
return [
|
||||||
|
'Home' => 'Início',
|
||||||
|
'Login' => 'Login',
|
||||||
|
'Register' => 'Cadastrar',
|
||||||
|
'Products' => 'Produtos',
|
||||||
|
'Help' => 'Ajuda',
|
||||||
|
'copyright' => '© 2018 Bruno Fontes Todos os direitos reservados',
|
||||||
|
'byAuthor' => 'Por Bruno Fontes',
|
||||||
|
];
|
||||||
@@ -1,12 +1,18 @@
|
|||||||
@component('mail::message')
|
@component('mail::message')
|
||||||
Hi, {{$username}},
|
{!! __('Hi, :username,', ['username' => $username]) !!}
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
#Good news: {{$item->name}} is available!
|
#{!! __('Good news: :itemname is available!', ['itemname' => $item->name]) !!}
|
||||||
<br>
|
|
||||||
The item <em>{{$item->name}} ({{$item->product->name}})</em> is now available on **Share It**.
|
|
||||||
<br>
|
{!! __('The item <em>:itemname (:productname)</em> is now available on **Share It**.', ['itemname' => $item->name, 'productname' => $item->product->name]) !!}
|
||||||
<br>
|
|
||||||
<a href="https://shareit.brunofontes.net/home">Take it</a> before anyone else.
|
|
||||||
|
{!! __('**Take It** before anyone else at the website:') !!}
|
||||||
|
|
||||||
|
|
||||||
|
@component('mail::button', ['url' => 'https://shareit.brunofontes.net/home'])
|
||||||
|
{{ config('app.name') }}
|
||||||
|
@endcomponent
|
||||||
|
|
||||||
@endcomponent
|
@endcomponent
|
||||||
@@ -1,14 +1,18 @@
|
|||||||
@component('mail::message')
|
@component('mail::message')
|
||||||
Hello, {{$userWithItem}},
|
{!! __('Hi, :username,', ['username' => $userWithItem]) !!}
|
||||||
|
|
||||||
Are you still using {{$item->name}}?
|
|
||||||
|
|
||||||
We just want to let you know that {{$waitingUser}} asked us to be alerted when this item were available.
|
{!! __('Are you still using :itemname?', ['itemname' => $item->name]) !!}
|
||||||
|
|
||||||
|
|
||||||
|
{!! __('We just want to let you know that :waitinguser asked us to be alerted when this item were available.', ['waitinguser' => $waitingUser]) !!}
|
||||||
|
|
||||||
|
|
||||||
|
{!! __('So, if you are not using it anymore, please **Return It** at the website:') !!}
|
||||||
|
|
||||||
So, if you are not using it anymore, please go to our site and...
|
|
||||||
|
|
||||||
@component('mail::button', ['url' => 'https://shareit.brunofontes.net/home'])
|
@component('mail::button', ['url' => 'https://shareit.brunofontes.net/home'])
|
||||||
Return it!
|
Share It!
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
Thanks,<br>
|
Thanks,<br>
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
@component('mail::message')
|
@component('mail::message')
|
||||||
# Welcome, {{$user->name}},
|
# @lang('Welcome, :username,', ['username' => $user->name])
|
||||||
|
|
||||||
Thank's for registering at **Share It!**
|
|
||||||
|
|
||||||
Your account was created and it is active. And you? Are you ready to Share It with your friends? :)
|
@lang("Thank's for registering at **Share It!**")
|
||||||
|
|
||||||
|
|
||||||
|
@lang("Your account was created, but you still need to activate it. We've sent you another e-mail and we are ready to go!")
|
||||||
|
|
||||||
|
|
||||||
|
@lang("And you? Are you ready to Share It with your friends?")
|
||||||
|
|
||||||
|
|
||||||
@component('mail::button', ['url' => 'https://shareit.brunofontes.net'])
|
@component('mail::button', ['url' => 'https://shareit.brunofontes.net'])
|
||||||
Share it!
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
Thanks,<br>
|
|
||||||
{{ config('app.name') }}
|
{{ config('app.name') }}
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
@endcomponent
|
||||||
@@ -4,26 +4,16 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="row"><h1>Help...</h1></div>
|
<div class="row"><h1>{!! __('help.helpTitle') !!}</h1></div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header"><strong>What is it?</strong></div>
|
<div class="card-header"><strong>{!! __('help.whatIsIt') !!}</strong></div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p>
|
{!! __('help.siteHelpOthers') !!}
|
||||||
<strong>Share It!</strong> is a site dedicated to help you sharing items with others.
|
|
||||||
</p>
|
|
||||||
<p>But before sharing anything, you just need to understand 2 basic ideas:</p>
|
|
||||||
<p class="my-4"><ul>
|
<p class="my-4"><ul>
|
||||||
<li><strong>Product</strong> - The category that has some similar items</li>
|
{!! __('help.product_item') !!}
|
||||||
<li><strong>Item</strong> - The item that will be shared. Every item belongs to a <strong>Product</strong></li>
|
|
||||||
</ul></p>
|
</ul></p>
|
||||||
<p class="my-4"><strong><em>Examples:</em></strong> You can create the following Categories/Items</p>
|
<p class="my-4">
|
||||||
<p>
|
{!! __('help.examples') !!}
|
||||||
<ul>
|
|
||||||
<li>Books -> Don Quixote, The Hitchhiker's Guide to the Galaxy</li>
|
|
||||||
<li>Matrix Movies -> Matrix 1, Matrix 2, Matrix 3</li>
|
|
||||||
<li>Website Y -> <em>YourAccount</em>*</li>
|
|
||||||
</ul>
|
|
||||||
<p><em>* Please note that many websites does not allow sharing your account. Read the site EULA before include it here.</em></p>
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,31 +22,24 @@
|
|||||||
<div class="row justify-content-center mt-4">
|
<div class="row justify-content-center mt-4">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header"><strong>Step-by-step</strong></div>
|
<div class="card-header"><strong>{!! __('help.step_title') !!}</strong></div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div>
|
<div>
|
||||||
<strong>Sharing a product/item</strong>
|
<strong>{!! __('help.step_sharing_subtitle') !!}</strong>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Go to the <strong><a href="/product">Products</a></strong> page;</li>
|
{!! __('help.step_sharing_steps') !!}
|
||||||
<li>Include the Product and click on it;</li>
|
|
||||||
<li>Include an Item that belongs to that Product and click on it;</li>
|
|
||||||
<li>Add other people with their subscribed e-mail address.</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<strong>Using a shared item</strong>
|
<strong>{!! __('help.step_sharedItem_subtitle') !!}</strong>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Go to the <strong><a href="/home">Home</a></strong> page (tip: add this page as a bookmark);</li>
|
{!! __('help.step_sharedItem_steps') !!}
|
||||||
<li>Click on <strong>Take</strong> to take the item you want to use;</li>
|
|
||||||
<li>When you finish using it, click on <strong>Return</strong> button.</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<strong>Getting alerted when an item is available</strong>
|
<strong>{!! __('help.step_getAlerted_subtitle') !!}</strong>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Go to the <strong><a href="/home">Home</a></strong> page (tip: add this page as a bookmark);</li>
|
{!! __('help.step_getAlerted_steps') !!}
|
||||||
<li>Click on <strong>Alert me</strong> next the taken item;</li>
|
|
||||||
<li>The active user will be alerted you want to use it later. When the person return it, you will be notified.</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -66,23 +49,16 @@
|
|||||||
<div class="row justify-content-center mt-4">
|
<div class="row justify-content-center mt-4">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header"><strong>Screens</strong></div>
|
<div class="card-header"><strong>{!! __('help.screens_title') !!}</strong></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center mt-4">
|
<div class="row justify-content-center mt-4">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header"><strong>Home</strong></div>
|
<div class="card-header"><strong>{!! __('help.home_title') !!}</strong></div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p>The <strong>Home</strong> is the main screen where you will going to <strong>Take</strong>
|
{!! __('help.home_body') !!}
|
||||||
and <strong>Return</strong> items.</p>
|
|
||||||
<p>It shows all items that were shared with you or that you are sharing, unless you remove yourself from there.</p>
|
|
||||||
<p>If the item has a website, the items name will become a link, so you can just click on it to open.</p>
|
|
||||||
<p>When the item you want is already taken, you are going to see who got it and for how long.
|
|
||||||
So you can identify if the person is still using it or if someone just forgot to return it.</p>
|
|
||||||
<p>You can also ask to be alerted when the item is available. This will notify the active
|
|
||||||
user that you want to use that item. So the person can return it as soon as they finish using it.</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -90,12 +66,9 @@
|
|||||||
<div class="row justify-content-center mt-4">
|
<div class="row justify-content-center mt-4">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header"><strong>Products</strong></div>
|
<div class="card-header"><strong>{!! __('help.products_title') !!}</strong></div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p>The <strong>Products</strong> is the screen to include Products and Items.</p>
|
{!! __('help.products_body') !!}
|
||||||
<p>You can also <strong>add users</strong> to your items from this screen.
|
|
||||||
To be able to do that you just need to select the item.</p>
|
|
||||||
<p class="mb-4">When adding a Product, you can specify a webpage (this is optional).</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,41 +4,41 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="card">
|
@forelse ($products as $items)
|
||||||
<div class="card-header">Your items</div>
|
<div class="card mb-4">
|
||||||
|
<div class="card-header">{{$items->first()->product->name}}</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@if (session('status'))
|
@forelse ($items->sortBy('name', SORT_NATURAL | SORT_FLAG_CASE) as $item)
|
||||||
<div class="alert alert-success" role="alert">
|
|
||||||
{{ session('status') }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@forelse ($items as $item)
|
|
||||||
@if (!$loop->first)
|
@if (!$loop->first)
|
||||||
<hr class="m-3">
|
<hr class="m-3">
|
||||||
@endif
|
@endif
|
||||||
<div class="my-4 p-2">
|
<div class="row align-items-center p-2">
|
||||||
|
<div class="col col-xs-auto">
|
||||||
@if ($item->product->url)
|
@if ($item->product->url)
|
||||||
<a href="{{$item->product->url}}" class="link-unstyled" target="_blank" rel="noopener noreferrer">
|
<a href="{{$item->product->url}}" class="link-unstyled" target="_blank" rel="noopener noreferrer">
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<strong>{{$item->name}}</strong> ({{$item->product->name}})
|
<strong>{{$item->name}}</strong>
|
||||||
|
|
||||||
@if ($item->product->url)
|
@if ($item->product->url)
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="ml-auto align-self-end text-right">
|
||||||
@if ($item->used_by)
|
@if ($item->used_by)
|
||||||
@include('home.usedItem')
|
@include('home.usedItem')
|
||||||
@else
|
@else
|
||||||
@include('home.unusedItem')
|
@include('home.unusedItem')
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
@empty
|
@empty
|
||||||
<p>There are no items shared with you yet. <a href="/product">Share an item!</a></p>
|
<p>@lang('home.no_messages')<a href="/product">@lang('home.share_item')</a></p>
|
||||||
@endforelse
|
@endforelse
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@empty
|
||||||
|
@endforelse
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<span class="float-right">
|
<form action="/take" method="POST">
|
||||||
<form action="/take" method="POST">
|
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
<input type="hidden" name="item" value="{{$item->id}}">
|
<input type="hidden" name="item" value="{{$item->id}}">
|
||||||
<button type="submit" class="btn btn-sm btn-success">Take It</button>
|
<button type="submit" class="btn btn-sm btn-success">@lang('home.take')</button>
|
||||||
</form>
|
</form>
|
||||||
</span>
|
|
||||||
@@ -1,35 +1,31 @@
|
|||||||
@if ($item->used_by == \Auth::id())
|
@if ($item->used_by == \Auth::id())
|
||||||
<span class="float-right">
|
<form action="/take" method="POST" class="form-inline">
|
||||||
<form action="/take" method="POST">
|
<em class="pr-sm-2 ml-auto">{{\Carbon\Carbon::parse($item->updated_at)->diffForHumans()}}</em>
|
||||||
|
<div class="w-100 d-xm-block d-sm-none"></div>
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
@method('DELETE')
|
@method('DELETE')
|
||||||
<input type="hidden" name="item" value="{{$item->id}}">
|
<input type="hidden" name="item" value="{{$item->id}}">
|
||||||
<button type="submit" class="btn btn-sm btn-danger">Return It</button>
|
<button type="submit" class="btn btn-sm btn-danger ml-auto">@lang('home.return')</button>
|
||||||
</form>
|
</form>
|
||||||
</span>
|
|
||||||
<span class="float-right mr-3"><em>{{\Carbon\Carbon::parse($item->updated_at)->diffForHumans()}}</em></span>
|
|
||||||
|
|
||||||
|
|
||||||
@else
|
@else
|
||||||
<span class="float-right">
|
<form action="/alert" method="POST" class="form-inline">
|
||||||
<form action="/alert" method="POST">
|
<em class="pr-sm-2 ml-auto">
|
||||||
{{ csrf_field() }}
|
|
||||||
<input type="hidden" name="item" value="{{$item->id}}">
|
|
||||||
@if ($item->waiting_user_id == \Auth::id())
|
|
||||||
@method('DELETE')
|
|
||||||
<button type="submit" class="btn btn-sm btn-outline-danger">Cancel Alert</button>
|
|
||||||
@elseif (!$item->waiting_user_id)
|
|
||||||
<button type="submit" class="btn btn-sm btn-outline-secondary">Alert me</button>
|
|
||||||
@endif
|
|
||||||
</form>
|
|
||||||
</span>
|
|
||||||
<span class="float-right mr-3">
|
|
||||||
<em>
|
|
||||||
{{str_limit($users[$item->used_by], 15, '...')}}
|
{{str_limit($users[$item->used_by], 15, '...')}}
|
||||||
@if ($item->waiting_user_id && $item->waiting_user_id != \Auth::id())
|
@if ($item->waiting_user_id && $item->waiting_user_id != \Auth::id())
|
||||||
<strong>> {{str_limit($users[$item->waiting_user_id], 15, '...')}}</strong>
|
<strong>> {{str_limit($users[$item->waiting_user_id], 15, '...')}}</strong>
|
||||||
@endif
|
@endif
|
||||||
<small>({{$item->updated_at->diffForHumans()}})</small>
|
<small>({{$item->updated_at->diffForHumans()}})</small>
|
||||||
</em>
|
</em>
|
||||||
</span>
|
<div class="w-100 d-xm-block d-sm-none"></div>
|
||||||
|
{{ csrf_field() }}
|
||||||
|
<input type="hidden" name="item" value="{{$item->id}}">
|
||||||
|
@if ($item->waiting_user_id == \Auth::id())
|
||||||
|
@method('DELETE')
|
||||||
|
<button type="submit" class="btn btn-sm btn-outline-danger ml-auto">@lang('home.cancel_alert')</button>
|
||||||
|
@elseif (!$item->waiting_user_id)
|
||||||
|
<button type="submit" class="btn btn-sm btn-outline-secondary ml-auto">@lang('home.alert_me')</button>
|
||||||
|
@endif
|
||||||
|
</form>
|
||||||
@endif
|
@endif
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
@include ('item.otherItems')
|
@include ('item.otherItems')
|
||||||
|
|
||||||
|
|
||||||
<div class="float-right mt-2"><a class="btn btn-secondary" href="/product/{{ $item->product->id }}">BACK</a></div>
|
<div class="float-right mt-2"><a class="btn btn-secondary" href="/product/{{ $item->product->id }}">{{ __('item.back') }}</a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,22 +5,22 @@
|
|||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="deleteModalLabel">Confirmation...</h5>
|
<h5 class="modal-title" id="deleteModalLabel">{{ __('item.confirmation') }}</h5>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p>Would you like to delete the item <strong>{{$item->name}}</strong>?</p>
|
<p>{!! __('item.confirmDeletion', ['itemname' => $item->name]) !!}</p>
|
||||||
<p>You will not be able to restore it after deletion.</p>
|
<p>{!! __('item.notAbleRestore') !!}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ __('item.close') }}</button>
|
||||||
<form action="/item/" method="POST">
|
<form action="/item/" method="POST">
|
||||||
@method('DELETE')
|
@method('DELETE')
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
<input type="hidden" name="item" value="{{$item->id}}">
|
<input type="hidden" name="item" value="{{$item->id}}">
|
||||||
<button type="submit" class="btn btn-danger">Delete</button>
|
<button type="submit" class="btn btn-danger">{{ __('item.delete') }}</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<button type="button" class="btn btn-sm btn-secondary mr-1" data-toggle="modal" data-target="#editModal">Edit</button>
|
<button type="button" class="btn btn-sm btn-secondary mr-1" data-toggle="modal" data-target="#editModal">{{ __('item.edit') }}</button>
|
||||||
|
|
||||||
<!-- MODAL - CHANGE WINDOW -->
|
<!-- MODAL - CHANGE WINDOW -->
|
||||||
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalLabel" aria-hidden="true">
|
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="editModalLabel">Edit item</h5>
|
<h5 class="modal-title" id="editModalLabel">{{ __('item.edititem') }}</h5>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<form action="/item" method="POST">
|
<form action="/item" method="POST">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name" class="col-form-label">New name: </label>
|
<label for="name" class="col-form-label">{{ __('item.newname') }} </label>
|
||||||
<input type="text" name="name" id="name" class="form-control" value="{{$item->name}}">
|
<input type="text" name="name" id="name" class="form-control" value="{{$item->name}}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
@method('PATCH')
|
@method('PATCH')
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
<input type="hidden" name="item" value="{{$item->id}}">
|
<input type="hidden" name="item" value="{{$item->id}}">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ __('item.close') }}</button>
|
||||||
<button type="submit" class="btn btn-danger">Edit</button>
|
<button type="submit" class="btn btn-danger">{{ __('item.edit') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="card mt-4">
|
<div class="card mt-4">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
Other items from the same product
|
{{ __('item.otherItems') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<li><a href="/item/{{ $otherItem->id }}">{{ $otherItem->name }}</a></li>
|
<li><a href="/item/{{ $otherItem->id }}">{{ $otherItem->name }}</a></li>
|
||||||
@endif
|
@endif
|
||||||
@empty
|
@empty
|
||||||
<p>There are no items yet. Include one with the form above.</p>
|
<p>{{ __('item.noItems') }}</p>
|
||||||
@endforelse
|
@endforelse
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<p><strong>Users:</strong></p>
|
<p><strong>{{ __('item.users') }}</strong></p>
|
||||||
@forelse ($users as $user)
|
@forelse ($users as $user)
|
||||||
@if (!$loop->first)
|
@if (!$loop->first)
|
||||||
<hr>
|
<hr>
|
||||||
@@ -14,27 +14,27 @@
|
|||||||
@method('DELETE')
|
@method('DELETE')
|
||||||
<input type="hidden" name="item_id" id="item_id" value="{{ $item['id'] }}">
|
<input type="hidden" name="item_id" id="item_id" value="{{ $item['id'] }}">
|
||||||
<input type="hidden" class="form-control" name="user_id" id="user_id" value="{{$user->id}}">
|
<input type="hidden" class="form-control" name="user_id" id="user_id" value="{{$user->id}}">
|
||||||
<button type="submit" class="btn btn-sm btn-danger">Delete</button>
|
<button type="submit" class="btn btn-sm btn-danger">{{ __('item.delete') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@empty
|
@empty
|
||||||
<p>There are no items yet. Include one with the form above.</p>
|
<p>{{ __('item.noItems') }}</p>
|
||||||
@endforelse
|
@endforelse
|
||||||
|
|
||||||
|
|
||||||
<!-- ADD USERS -->
|
<!-- ADD USERS -->
|
||||||
<hr class="mt-5">
|
<hr class="mt-5">
|
||||||
<p><strong>Add user</strong></p>
|
<p><strong>{{ __('item.addUser') }}</strong></p>
|
||||||
<form method="POST" action="/user">
|
<form method="POST" action="/user">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="form-group row mt-2">
|
<div class="form-group row mt-2">
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
<div class="col-sm-2 col-lg-auto"><label for="name">E-mail: </label></div>
|
<div class="col-sm-2 col-lg-auto"><label for="name">{{ __('item.email') }}</label></div>
|
||||||
<div class="col-xs-12 col-sm mb-3"><input type="email" class="form-control" name="email" id="email" placeholder="name@domain.com" required></div>
|
<div class="col-xs-12 col-sm mb-3"><input type="email" class="form-control" name="email" id="email" placeholder="{{ __('item.nameDomain') }}" required></div>
|
||||||
<input type="hidden" name="item_id" id="item_id" value="{{ $item['id'] }}" required>
|
<input type="hidden" name="item_id" id="item_id" value="{{ $item['id'] }}" required>
|
||||||
<div class="col-sm-2 col-lg-1 mr-4"><button type="submit" class="btn btn-primary">Insert</button></div>
|
<div class="col-sm-2 col-lg-1 mr-4"><button type="submit" class="btn btn-primary">{{ __('item.insert') }}</button></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -80,9 +80,11 @@
|
|||||||
<div class="alert alert-danger text-center" role="alert">{{ $flashMsg }}</div>
|
<div class="alert alert-danger text-center" role="alert">{{ $flashMsg }}</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<main class="py-4">
|
<main class="py-4 mb-5">
|
||||||
@yield('content')
|
@yield('content')
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
@include('layouts.footer')
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
19
resources/views/layouts/footer.blade.php
Normal file
19
resources/views/layouts/footer.blade.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
<div class="my-4"><br></div>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<footer class="fixed-bottom page-footer font-small mt-5">
|
||||||
|
<div class="row footer-copyright text-left bg-secondary text-white mt-5 py-3">
|
||||||
|
<!-- Copyright -->
|
||||||
|
<div class="col ml-4">
|
||||||
|
© 2018<?='2018' != date('Y')?'-' . date('Y'):'';?> Copyright <a href="https://brunofontes.net" class="link text-white-50" target="_blank">Bruno Fontes</a>
|
||||||
|
</div>
|
||||||
|
<div class="col mr-4 text-right">
|
||||||
|
<a href="{{ url('/lang/pt-br') }}" class="link text-white">Português</a>
|
||||||
|
<span class="d-none d-sm-inline"> | </span>
|
||||||
|
<span class="d-xs-block d-sm-none"> <br> </span>
|
||||||
|
<a href="{{ url('/lang/en') }}" class="link text-white">English</a>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright -->
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="form-group row mt-2">
|
<div class="form-group row mt-2">
|
||||||
<div class="col-sm-2 col-lg-1"><label for="product">Item:</label></div>
|
<div class="col-sm-2 col-lg-1"><label for="product">{{ __('product.item') }}</label></div>
|
||||||
<div class="col-xs-12 col-sm mb-3"><input type="text" class="form-control" name="item" id="item" placeholder="One Hundred Years of Solitude" required></div>
|
<div class="col-xs-12 col-sm mb-3"><input type="text" class="form-control" name="item" id="item" placeholder="{{ __('product.100yearsSolitude') }}" required></div>
|
||||||
<input type="hidden" name="product_id" id="product_id" value="{{ $product['id'] }}" required>
|
<input type="hidden" name="product_id" id="product_id" value="{{ $product['id'] }}" required>
|
||||||
<div class="col-sm-2 col-lg-1 mr-4"><button type="submit" class="btn btn-primary">Insert</button></div>
|
<div class="col-sm-2 col-lg-1 mr-4"><button type="submit" class="btn btn-primary">{{ __('product.insert') }}</button></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -2,16 +2,16 @@
|
|||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="form-group row mt-2">
|
<div class="form-group row mt-2">
|
||||||
<div class="col-sm-2 col-lg-1"><label for="product">Name:</label></div>
|
<div class="col-sm-2 col-lg-1"><label for="product">{{ __('product.name') }}</label></div>
|
||||||
<div class="col-xs-12 col-sm"><input type="text" class="form-control" name="product" id="product" placeholder="Book" required></div>
|
<div class="col-xs-12 col-sm"><input type="text" class="form-control" name="product" id="product" placeholder="{{ __('product.book') }}" required></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row mt-2">
|
<div class="form-group row mt-2">
|
||||||
<div class="col-sm-2 col-lg-1"><label for="product">URL:</label></div>
|
<div class="col-sm-2 col-lg-1"><label for="product">{{ __('product.url') }}</label></div>
|
||||||
<div class="col-xs-12 col-sm"><input type="text" class="form-control" name="url" id="url" placeholder="(Optional) http://bookwebsite.com"></div>
|
<div class="col-xs-12 col-sm"><input type="text" class="form-control" name="url" id="url" placeholder="{{ __('product.optionalUrlExample') }}"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row mt-2">
|
<div class="form-group row mt-2">
|
||||||
<div class="col-xs-0 col-sm-1 col-md-1 col-lg-1 col-xg-1"></div>
|
<div class="col-xs-0 col-sm-1 col-md-1 col-lg-1 col-xg-1"></div>
|
||||||
<div class="col col-xs-12"><button type="submit" class="btn btn-primary">Insert</button></div>
|
<div class="col col-xs-12"><button type="submit" class="btn btn-primary">{{ __('product.insert') }}</button></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@include ('layouts.errors')
|
@include ('layouts.errors')
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
<button type="button" class="btn btn-sm btn-danger" data-toggle="modal" data-target="#deleteModal">Delete</button>
|
<button type="button" class="btn btn-sm btn-danger" data-toggle="modal" data-target="#deleteModal">{{ __('product.delete') }}</button>
|
||||||
|
|
||||||
<!-- MODAL - DELETE CONFIRMATION -->
|
<!-- MODAL - DELETE CONFIRMATION -->
|
||||||
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
|
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="deleteModalLabel">Confirmation...</h5>
|
<h5 class="modal-title" id="deleteModalLabel">{{ __('product.confirmation') }}</h5>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
Would you like to delete the product <strong>{{$product->name}}</strong> and it's items?
|
{!! __('product.wannaDelete', ['productname' => $product->name]) !!}
|
||||||
<p>You will not be able to restore it after deletion.</p>
|
<p>{{ __('product.notAbleRestore') }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ __('product.close') }}</button>
|
||||||
<form action="/product" method="POST">
|
<form action="/product" method="POST">
|
||||||
@method('DELETE')
|
@method('DELETE')
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
<input type="hidden" name="product" value="{{$product->id}}">
|
<input type="hidden" name="product" value="{{$product->id}}">
|
||||||
<button type="submit" class="btn btn-danger">Delete</button>
|
<button type="submit" class="btn btn-danger">{{ __('product.delete') }}</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<button type="button" class="btn btn-sm btn-secondary mr-1" data-toggle="modal" data-target="#editModal">Edit</button>
|
<button type="button" class="btn btn-sm btn-secondary mr-1" data-toggle="modal" data-target="#editModal">{{ __('product.edit') }}</button>
|
||||||
|
|
||||||
<!-- MODAL - CHANGE WINDOW -->
|
<!-- MODAL - CHANGE WINDOW -->
|
||||||
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalLabel" aria-hidden="true">
|
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="editModalLabel">Edit product</h5>
|
<h5 class="modal-title" id="editModalLabel">{{ __('product.editProduct') }}</h5>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -14,11 +14,11 @@
|
|||||||
<form action="/product" method="POST">
|
<form action="/product" method="POST">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name" class="col-form-label">New name: </label>
|
<label for="name" class="col-form-label">{{ __('product.newName') }} </label>
|
||||||
<input type="text" name="name" id="name" class="form-control" value="{{$product->name}}">
|
<input type="text" name="name" id="name" class="form-control" value="{{$product->name}}">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="url" class="col-form-label">New url: </label>
|
<label for="url" class="col-form-label">{{ __('product.newUrl') }} </label>
|
||||||
<input type="text" name="url" id="url" class="form-control" value="{{$product->url}}">
|
<input type="text" name="url" id="url" class="form-control" value="{{$product->url}}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
@method('PATCH')
|
@method('PATCH')
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
<input type="hidden" name="product" value="{{$product->id}}">
|
<input type="hidden" name="product" value="{{$product->id}}">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ __('product.close') }}</button>
|
||||||
<button type="submit" class="btn btn-danger">Edit</button>
|
<button type="submit" class="btn btn-danger">{{ __('product.edit') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="card mt-4">
|
<div class="card mt-4">
|
||||||
<div class="card-header"><strong>Products</strong></div>
|
<div class="card-header"><strong>{{ __('product.products') }}</strong></div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@if (session('status'))
|
@if (session('status'))
|
||||||
@@ -18,17 +18,17 @@
|
|||||||
@forelse ($products as $product)
|
@forelse ($products as $product)
|
||||||
<li><a href="/product/{{$product['id']}}">{{$product['name']}}</a></li>
|
<li><a href="/product/{{$product['id']}}">{{$product['name']}}</a></li>
|
||||||
@empty
|
@empty
|
||||||
<p>There are no products yet. Include one with the form above.</p>
|
<p>{{ __('product.noProductsYet') }}</p>
|
||||||
@endforelse
|
@endforelse
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card mt-4">
|
<div class="card mt-4">
|
||||||
<div class="card-header">Add product</div>
|
<div class="card-header">{{ __('product.addProduct') }}</div>
|
||||||
<div class="card-body">@include('product.addProductForm')</div>
|
<div class="card-body">@include('product.addProductForm')</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="float-right mt-2"><a class="btn btn-secondary" href="/home">Your items</a></div>
|
<div class="float-right mt-2"><a class="btn btn-secondary" href="/home">{{ __('product.yourItems') }}</a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -25,23 +25,23 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<strong>Items:</strong>
|
<strong>{{ __('product.items') }}</strong>
|
||||||
<ul>
|
<ul>
|
||||||
@forelse ($product->items as $item)
|
@forelse ($product->items as $item)
|
||||||
<li><a href="/item/{{ $item->id }}">{{ $item->name }}</a></li>
|
<li><a href="/item/{{ $item->id }}">{{ $item->name }}</a></li>
|
||||||
@empty
|
@empty
|
||||||
<p>There are no items yet. Include one with the form above.</p>
|
<p>{{ __('product.noItemsYet') }}</p>
|
||||||
@endforelse
|
@endforelse
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card mt-4">
|
<div class="card mt-4">
|
||||||
<div class="card-header">Add item</div>
|
<div class="card-header">{{ __('product.addItem') }}</div>
|
||||||
<div class="card-body">@include('product.addItemForm')</div>
|
<div class="card-body">@include('product.addItemForm')</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="float-right mt-2"><a class="btn btn-secondary" href="/product">BACK</a></div>
|
<div class="float-right mt-2"><a class="btn btn-secondary" href="/product">{{ __('product.back') }}</a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -79,10 +79,10 @@
|
|||||||
@if (Route::has('login'))
|
@if (Route::has('login'))
|
||||||
<div class="top-right links">
|
<div class="top-right links">
|
||||||
@auth
|
@auth
|
||||||
<a href="{{ url('/home') }}">Home</a>
|
<a href="{{ url('/home') }}">@lang('welcome.Home')</a>
|
||||||
@else
|
@else
|
||||||
<a href="{{ route('login') }}">Login</a>
|
<a href="{{ route('login') }}">@lang('welcome.Login')</a>
|
||||||
<a href="{{ route('register') }}">Register</a>
|
<a href="{{ route('register') }}">@lang('welcome.Register')</a>
|
||||||
@endauth
|
@endauth
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -94,20 +94,23 @@
|
|||||||
|
|
||||||
<div class="links">
|
<div class="links">
|
||||||
@auth
|
@auth
|
||||||
<a href="/home">Home</a>
|
<a href="/home">@lang('welcome.Home')</a>
|
||||||
<a href="/product">Products</a>
|
<a href="/product">@lang('welcome.Products')</a>
|
||||||
@else
|
@else
|
||||||
<a href="/register">Register</a>
|
<a href="/login">@lang('welcome.Login')</a>
|
||||||
<a href="/login">Login</a>
|
<a href="/register">@lang('welcome.Register')</a>
|
||||||
@endauth
|
@endauth
|
||||||
<a href="/help">Help</a>
|
<a href="/help">@lang('welcome.Help')</a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="mt-5 mb-5"><br></div>
|
||||||
<br>
|
<div class="links">
|
||||||
|
<a href="{{ url('/lang/pt-br') }}">Português</a>
|
||||||
|
<a href="{{ url('/lang/en') }}">English</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mt-5 mb-5"><br></div>
|
||||||
<div class="links footer">
|
<div class="links footer">
|
||||||
<a href="https://brunofontes.net">By Bruno Fontes</a>
|
<a href="https://brunofontes.net">@lang('welcome.byAuthor')</a>
|
||||||
<p>© 2018 Bruno Fontes All Rights Reserved</p>
|
<p>@lang('welcome.copyright')</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,6 +15,12 @@ Route::get('/', function () {
|
|||||||
return view('welcome');
|
return view('welcome');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Route::get('/lang/{locale}', function ($locale) {
|
||||||
|
session(['lang' => $locale]);
|
||||||
|
session()->save();
|
||||||
|
return back();
|
||||||
|
});
|
||||||
|
|
||||||
Route::get('/product', 'ProductController@index')->middleware('verified');
|
Route::get('/product', 'ProductController@index')->middleware('verified');
|
||||||
Route::get('/product/{product}', 'ProductController@show')->middleware('verified');
|
Route::get('/product/{product}', 'ProductController@show')->middleware('verified');
|
||||||
Route::post('/product', 'ProductController@store')->middleware('verified');
|
Route::post('/product', 'ProductController@store')->middleware('verified');
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#source ~/.zshrc
|
|
||||||
vagrant up
|
|
||||||
./ssh_homestead.sh
|
|
||||||
Reference in New Issue
Block a user