mirror of
https://github.com/brunofontes/shareit.git
synced 2025-12-13 19:12:08 -03:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
3d6b0dbeca
|
|||
|
52223676dc
|
|||
|
7a8d5ccaff
|
|||
|
8c4fe0a489
|
|||
|
69f0722c79
|
|||
|
5667fd0a86
|
|||
|
954820f46b
|
|||
|
8157a183c7
|
|||
|
528d3b4caf
|
|||
|
4ec2b24885
|
|||
|
5be29fc3d8
|
|||
|
6b20397e9d
|
|||
|
67d7e34baa
|
|||
|
b7002e1d05
|
|||
|
f6ab437889
|
|||
|
9a66b65f38
|
|||
|
b49ec06062
|
|||
|
4764b74415
|
|||
|
a3e9abbd4c
|
|||
|
0cd807169e
|
|||
|
d87d4ba4bf
|
|||
|
61b54ecdd8
|
|||
|
b99f6a5b68
|
|||
|
1f23753f70
|
|||
|
1fd78fe94a
|
|||
|
0bcefb43e6
|
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
|
||||||
40
app/Events/ReturnItem.php
Normal file
40
app/Events/ReturnItem.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Events;
|
||||||
|
|
||||||
|
use \App\Item;
|
||||||
|
use Illuminate\Broadcasting\Channel;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Broadcasting\PrivateChannel;
|
||||||
|
use Illuminate\Broadcasting\PresenceChannel;
|
||||||
|
use Illuminate\Foundation\Events\Dispatchable;
|
||||||
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||||
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||||
|
|
||||||
|
class ReturnItem
|
||||||
|
{
|
||||||
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||||
|
public $item;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new event instance.
|
||||||
|
*
|
||||||
|
* @param Item $item The returned item.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct(Item $item)
|
||||||
|
{
|
||||||
|
$this->item = $item;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the channels the event should broadcast on.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Broadcasting\Channel|array
|
||||||
|
*/
|
||||||
|
public function broadcastOn()
|
||||||
|
{
|
||||||
|
return new PrivateChannel('channel-name');
|
||||||
|
}
|
||||||
|
}
|
||||||
11
app/FlashMessage.php
Normal file
11
app/FlashMessage.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class FlashMessage extends Model
|
||||||
|
{
|
||||||
|
const PRIMARY = 'primary';
|
||||||
|
const DANGER = 'danger';
|
||||||
|
}
|
||||||
@@ -2,24 +2,35 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Auth;
|
||||||
|
use Mail;
|
||||||
use \App\User;
|
use \App\User;
|
||||||
use \App\Mail\UserWaiting;
|
use \App\Mail\UserWaiting;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class AlertController extends Controller
|
class AlertController extends Controller
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Store the waiting_user_id on db
|
||||||
|
* so the user can be alerted when
|
||||||
|
* the item is free
|
||||||
|
*
|
||||||
|
* @param Request $request Form data
|
||||||
|
*
|
||||||
|
* @return redirect to home
|
||||||
|
*/
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
$item = User::loggedIn()->items()->find(request('item'));
|
$item = User::loggedIn()->items()->find(request('item'));
|
||||||
$item->waiting_user_id = \Auth::id();
|
$item->waiting_user_id = Auth::id();
|
||||||
$item->timestamps = false;
|
$item->timestamps = false;
|
||||||
$item->save();
|
$item->save();
|
||||||
|
|
||||||
$loggedUser = \Auth::user()->name;
|
$loggedUser = Auth::user()->name;
|
||||||
$userWithItem = User::find($item->used_by);
|
$userWithItem = User::find($item->used_by);
|
||||||
\Mail::to($userWithItem)->send(
|
Mail::to($userWithItem)
|
||||||
new UserWaiting($loggedUser, $userWithItem->name, $item)
|
->locale($userWithItem->language)
|
||||||
);
|
->send(new UserWaiting($loggedUser, $userWithItem->name, $item));
|
||||||
|
|
||||||
return redirect('home');
|
return redirect('home');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ use App\Http\Controllers\Controller;
|
|||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||||
|
use App\FlashMessage;
|
||||||
|
use Mail;
|
||||||
|
|
||||||
class RegisterController extends Controller
|
class RegisterController extends Controller
|
||||||
{
|
{
|
||||||
@@ -70,7 +72,15 @@ class RegisterController extends Controller
|
|||||||
'password' => Hash::make($data['password']),
|
'password' => Hash::make($data['password']),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
\Mail::to($user)->send(new Welcome($user));
|
Mail::to($user)->send(new Welcome($user));
|
||||||
|
|
||||||
|
$text = "Share it! New user: {$user->name} ($user->email)";
|
||||||
|
Mail::raw($text, function ($message) use ($text) {
|
||||||
|
$message->to('brunofontes.shareit@mailnull.com');
|
||||||
|
$message->subject($text);
|
||||||
|
});
|
||||||
|
|
||||||
|
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,10 +3,11 @@
|
|||||||
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
|
||||||
{
|
{
|
||||||
|
protected $activeUsers = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
*
|
*
|
||||||
@@ -17,6 +18,50 @@ class HomeController extends Controller
|
|||||||
$this->middleware('auth');
|
$this->middleware('auth');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the application dashboard.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$items = User::loggedIn()->items()->with('users')->get();
|
||||||
|
|
||||||
|
$numberOfUsedItems = 0;
|
||||||
|
foreach ($items as $item) {
|
||||||
|
if (isset($item->used_by)) {
|
||||||
|
$numberOfUsedItems++;
|
||||||
|
}
|
||||||
|
$this->getUsername($item->users, $item->used_by);
|
||||||
|
$this->getUsername($item->users, $item->waiting_user_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$products = $items
|
||||||
|
->sortBy('product.name', SORT_NATURAL | SORT_FLAG_CASE)
|
||||||
|
->groupBy('product.name');
|
||||||
|
|
||||||
|
return view(
|
||||||
|
'home',
|
||||||
|
['products' => $products, 'users' => $this->activeUsers, 'usedItems' => $numberOfUsedItems]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the username from an specified user id.
|
||||||
|
*
|
||||||
|
* @param object $itemUsers Array with IDs and usernames
|
||||||
|
* @param int $id The user id to search for
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function getUsername(\Illuminate\Database\Eloquent\Collection $itemUsers, ?int $id)
|
||||||
|
{
|
||||||
|
if ($id && !isset($this->activeUsers[$id])) {
|
||||||
|
$this->activeUsers[$id] = $this->findName($itemUsers, $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a name from a specific id in a array
|
* Get a name from a specific id in a array
|
||||||
*
|
*
|
||||||
@@ -33,26 +78,4 @@ class HomeController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the application dashboard.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
$users = [];
|
|
||||||
$items = User::loggedIn()->items()->with('users')->get();
|
|
||||||
|
|
||||||
foreach ($items as $item) {
|
|
||||||
if ($item->used_by && !isset($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])) {
|
|
||||||
$users[$item->waiting_user_id] = $this->findName($item->users, $item->waiting_user_id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return view('home', compact('items', 'users'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,13 +5,21 @@ namespace App\Http\Controllers;
|
|||||||
use \App\Item;
|
use \App\Item;
|
||||||
use \App\User;
|
use \App\User;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use App\FlashMessage as flash;
|
||||||
|
|
||||||
class ItemController extends Controller
|
class ItemController extends Controller
|
||||||
{
|
{
|
||||||
public function show($id)
|
public function show($id)
|
||||||
{
|
{
|
||||||
$item = Item::find($id);
|
$item = Item::find($id);
|
||||||
if (!$item || $item->product->user_id != \Auth::id()) return back();
|
if (!$item || $item->product->user_id != \Auth::id()) {
|
||||||
|
session()->flash(flash::DANGER,
|
||||||
|
\Lang::getFromJson(
|
||||||
|
"The item doesn't exist."
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return back();
|
||||||
|
}
|
||||||
$users = $item->users()->get();
|
$users = $item->users()->get();
|
||||||
|
|
||||||
$otherItems = Item::where([['product_id', $item->product_id], ['id', '!=', $id]])->get();
|
$otherItems = Item::where([['product_id', $item->product_id], ['id', '!=', $id]])->get();
|
||||||
@@ -43,7 +51,7 @@ class ItemController extends Controller
|
|||||||
$authUser = User::loggedIn();
|
$authUser = User::loggedIn();
|
||||||
$authUser->items()->create(['name' => request('item'), 'product_id' => request('product_id')]);
|
$authUser->items()->create(['name' => request('item'), 'product_id' => request('product_id')]);
|
||||||
|
|
||||||
return redirect('product/'.request('product_id'));
|
return redirect('product/' . request('product_id'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function patch(Request $request)
|
public function patch(Request $request)
|
||||||
@@ -52,7 +60,7 @@ class ItemController extends Controller
|
|||||||
$item = User::loggedIn()->items()->find(request('item'));
|
$item = User::loggedIn()->items()->find(request('item'));
|
||||||
$item->name = request('name');
|
$item->name = request('name');
|
||||||
$item->save();
|
$item->save();
|
||||||
return redirect('item/'.request('item'));
|
return redirect('item/' . request('item'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete(Request $request)
|
public function delete(Request $request)
|
||||||
|
|||||||
91
app/Http/Controllers/LanguageController.php
Normal file
91
app/Http/Controllers/LanguageController.php
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App;
|
||||||
|
use Lang;
|
||||||
|
use App\User;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class LanguageController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param int $locale
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update($locale)
|
||||||
|
{
|
||||||
|
App::setLocale($locale);
|
||||||
|
User::setLanguage($locale);
|
||||||
|
|
||||||
|
session(['lang' => $locale]);
|
||||||
|
session()->save();
|
||||||
|
return back();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ use \App\Item;
|
|||||||
use \App\User;
|
use \App\User;
|
||||||
use \App\Product;
|
use \App\Product;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use App\FlashMessage as flash;
|
||||||
|
|
||||||
class ProductController extends Controller
|
class ProductController extends Controller
|
||||||
{
|
{
|
||||||
@@ -55,7 +56,7 @@ class ProductController extends Controller
|
|||||||
$product->name = request('name');
|
$product->name = request('name');
|
||||||
$product->url = request('url');
|
$product->url = request('url');
|
||||||
$product->save();
|
$product->save();
|
||||||
return redirect('product/'.request('product'));
|
return redirect('product/' . request('product'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -70,8 +71,13 @@ class ProductController extends Controller
|
|||||||
$product = Product::fromAuthUser()->find($id);
|
$product = Product::fromAuthUser()->find($id);
|
||||||
|
|
||||||
if (!$product) {
|
if (!$product) {
|
||||||
return back();
|
session()->flash(
|
||||||
|
flash::DANGER,
|
||||||
|
\Lang::getFromJson(
|
||||||
|
"The product doesn't exist or doesn't belongs to you."
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return redirect('/product');
|
||||||
}
|
}
|
||||||
return view('product.show', compact('product'));
|
return view('product.show', compact('product'));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,40 +2,51 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use \App\Item;
|
use Auth;
|
||||||
use \App\User;
|
use Lang;
|
||||||
use App\Mail\ItemAvailable;
|
use App\Item;
|
||||||
|
use App\User;
|
||||||
|
use App\Events\ReturnItem;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Responsible to Take and Return an Item.
|
||||||
|
*/
|
||||||
class TakeController extends Controller
|
class TakeController extends Controller
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The user take an item
|
||||||
|
*
|
||||||
|
* @param Request $request The form data
|
||||||
|
*
|
||||||
|
* @return home view
|
||||||
|
*/
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
$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();
|
||||||
return redirect('home');
|
return redirect('home');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User return an item
|
||||||
|
* Trigger an event: ReturnItem
|
||||||
|
*
|
||||||
|
* @param Request $request Form data
|
||||||
|
*
|
||||||
|
* @return View home
|
||||||
|
*/
|
||||||
public function delete(Request $request)
|
public function delete(Request $request)
|
||||||
{
|
{
|
||||||
$item = User::loggedIn()->items()->find(request('item'));
|
$item = User::loggedIn()->items()->find(request('item'));
|
||||||
$waiting_id = $item->waiting_user_id;
|
event(new ReturnItem($item));
|
||||||
$item->used_by = null;
|
$item->returnItem();
|
||||||
$item->waiting_user_id = null;
|
|
||||||
$item->save();
|
|
||||||
|
|
||||||
//Send e-mail to waiting user
|
|
||||||
if ($waiting_id) {
|
|
||||||
$user = User::find($waiting_id);
|
|
||||||
\Mail::to($user)->send(
|
|
||||||
new ItemAvailable($user->name, $item)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return redirect('home');
|
return redirect('home');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use \Lang;
|
||||||
use \App\User;
|
use \App\User;
|
||||||
use \App\Item;
|
use \App\Item;
|
||||||
use \App\Product;
|
use \App\Product;
|
||||||
@@ -42,14 +43,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 +76,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' => [
|
||||||
|
|||||||
22
app/Http/Middleware/Locale.php
Normal file
22
app/Http/Middleware/Locale.php
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use App;
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
12
app/Item.php
12
app/Item.php
@@ -38,4 +38,16 @@ class Item extends Model
|
|||||||
{
|
{
|
||||||
return (new static)->where('user_id', \Auth::id());
|
return (new static)->where('user_id', \Auth::id());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a specified item
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function returnItem()
|
||||||
|
{
|
||||||
|
$this->used_by = null;
|
||||||
|
$this->waiting_user_id = null;
|
||||||
|
$this->save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
41
app/Listeners/AlertReturnedItem.php
Normal file
41
app/Listeners/AlertReturnedItem.php
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Listeners;
|
||||||
|
|
||||||
|
use Mail;
|
||||||
|
use App\User;
|
||||||
|
use App\Events\ReturnItem;
|
||||||
|
use App\Mail\ItemAvailable;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
class AlertReturnedItem
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create the event listener.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send an email to the user that
|
||||||
|
* is waiting for the item
|
||||||
|
*
|
||||||
|
* @param ReturnItem $event The return event that contains an item
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle(ReturnItem $event)
|
||||||
|
{
|
||||||
|
if ($event->item->waiting_user_id) {
|
||||||
|
$user = User::find($event->item->waiting_user_id);
|
||||||
|
Mail::to($user)
|
||||||
|
->locale($user->language)
|
||||||
|
->send(new ItemAvailable($user->name, $event->item));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
34
app/Listeners/SetLanguage.php
Normal file
34
app/Listeners/SetLanguage.php
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Listeners;
|
||||||
|
|
||||||
|
use App\User;
|
||||||
|
use IlluminateAuthEventsLogin;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Auth\Events\Login;
|
||||||
|
|
||||||
|
class SetLanguage
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create the event listener.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*
|
||||||
|
* @param IlluminateAuthEventsLogin $event
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle(Login $event)
|
||||||
|
{
|
||||||
|
session(['lang' => User::loggedIn()->language]);
|
||||||
|
session()->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Mail;
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use Lang;
|
||||||
use \App\Item;
|
use \App\Item;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Mail\Mailable;
|
use Illuminate\Mail\Mailable;
|
||||||
@@ -34,7 +35,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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use App\Events\ReturnItem;
|
||||||
|
use App\Listeners\SetLanguage;
|
||||||
|
use App\Listeners\AlertReturnedItem;
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
use Illuminate\Auth\Events\Registered;
|
use Illuminate\Auth\Events\Registered;
|
||||||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||||
@@ -18,6 +21,14 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
Registered::class => [
|
Registered::class => [
|
||||||
SendEmailVerificationNotification::class,
|
SendEmailVerificationNotification::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
ReturnItem::class => [
|
||||||
|
AlertReturnedItem::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
'Illuminate\Auth\Events\Login' => [
|
||||||
|
SetLanguage::class,
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
20
app/User.php
20
app/User.php
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App;
|
namespace App;
|
||||||
|
|
||||||
|
use Auth;
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
@@ -46,6 +47,23 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||||||
*/
|
*/
|
||||||
public static function loggedIn()
|
public static function loggedIn()
|
||||||
{
|
{
|
||||||
return (new static)->findOrFail(\Auth::id());
|
return (new static)->findOrFail(Auth::id());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the default website language
|
||||||
|
* for the acual user
|
||||||
|
*
|
||||||
|
* @param string $language The language code
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public static function setLanguage(string $language)
|
||||||
|
{
|
||||||
|
if (Auth::check()) {
|
||||||
|
$user = self::loggedIn();
|
||||||
|
$user->language = $language;
|
||||||
|
$user->save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
297
composer.lock
generated
297
composer.lock
generated
@@ -211,16 +211,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "egulias/email-validator",
|
"name": "egulias/email-validator",
|
||||||
"version": "2.1.5",
|
"version": "2.1.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/egulias/EmailValidator.git",
|
"url": "https://github.com/egulias/EmailValidator.git",
|
||||||
"reference": "54859fabea8b3beecbb1a282888d5c990036b9e3"
|
"reference": "0578b32b30b22de3e8664f797cf846fc9246f786"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/54859fabea8b3beecbb1a282888d5c990036b9e3",
|
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0578b32b30b22de3e8664f797cf846fc9246f786",
|
||||||
"reference": "54859fabea8b3beecbb1a282888d5c990036b9e3",
|
"reference": "0578b32b30b22de3e8664f797cf846fc9246f786",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -264,7 +264,7 @@
|
|||||||
"validation",
|
"validation",
|
||||||
"validator"
|
"validator"
|
||||||
],
|
],
|
||||||
"time": "2018-08-16T20:49:45+00:00"
|
"time": "2018-09-25T20:47:26+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "erusev/parsedown",
|
"name": "erusev/parsedown",
|
||||||
@@ -368,32 +368,32 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jakub-onderka/php-console-color",
|
"name": "jakub-onderka/php-console-color",
|
||||||
"version": "0.1",
|
"version": "v0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/JakubOnderka/PHP-Console-Color.git",
|
"url": "https://github.com/JakubOnderka/PHP-Console-Color.git",
|
||||||
"reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1"
|
"reference": "d5deaecff52a0d61ccb613bb3804088da0307191"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1",
|
"url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191",
|
||||||
"reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1",
|
"reference": "d5deaecff52a0d61ccb613bb3804088da0307191",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2"
|
"php": ">=5.4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"jakub-onderka/php-code-style": "1.0",
|
"jakub-onderka/php-code-style": "1.0",
|
||||||
"jakub-onderka/php-parallel-lint": "0.*",
|
"jakub-onderka/php-parallel-lint": "1.0",
|
||||||
"jakub-onderka/php-var-dump-check": "0.*",
|
"jakub-onderka/php-var-dump-check": "0.*",
|
||||||
"phpunit/phpunit": "3.7.*",
|
"phpunit/phpunit": "~4.3",
|
||||||
"squizlabs/php_codesniffer": "1.*"
|
"squizlabs/php_codesniffer": "1.*"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-4": {
|
||||||
"JakubOnderka\\PhpConsoleColor": "src/"
|
"JakubOnderka\\PhpConsoleColor\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
@@ -403,11 +403,10 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Jakub Onderka",
|
"name": "Jakub Onderka",
|
||||||
"email": "jakub.onderka@gmail.com",
|
"email": "jakub.onderka@gmail.com"
|
||||||
"homepage": "http://www.acci.cz"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2014-04-08T15:00:19+00:00"
|
"time": "2018-09-29T17:23:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jakub-onderka/php-console-highlighter",
|
"name": "jakub-onderka/php-console-highlighter",
|
||||||
@@ -455,16 +454,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v5.7.2",
|
"version": "v5.7.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/framework.git",
|
"url": "https://github.com/laravel/framework.git",
|
||||||
"reference": "86e1f98a6d2aab018e0257a7cb2ef2110d64a873"
|
"reference": "0438455128c0850b5872c7f3c11b7ccdbbfcba3e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/framework/zipball/86e1f98a6d2aab018e0257a7cb2ef2110d64a873",
|
"url": "https://api.github.com/repos/laravel/framework/zipball/0438455128c0850b5872c7f3c11b7ccdbbfcba3e",
|
||||||
"reference": "86e1f98a6d2aab018e0257a7cb2ef2110d64a873",
|
"reference": "0438455128c0850b5872c7f3c11b7ccdbbfcba3e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -476,6 +475,7 @@
|
|||||||
"league/flysystem": "^1.0.8",
|
"league/flysystem": "^1.0.8",
|
||||||
"monolog/monolog": "^1.12",
|
"monolog/monolog": "^1.12",
|
||||||
"nesbot/carbon": "^1.26.3",
|
"nesbot/carbon": "^1.26.3",
|
||||||
|
"opis/closure": "^3.1",
|
||||||
"php": "^7.1.3",
|
"php": "^7.1.3",
|
||||||
"psr/container": "^1.0",
|
"psr/container": "^1.0",
|
||||||
"psr/simple-cache": "^1.0",
|
"psr/simple-cache": "^1.0",
|
||||||
@@ -592,7 +592,7 @@
|
|||||||
"framework",
|
"framework",
|
||||||
"laravel"
|
"laravel"
|
||||||
],
|
],
|
||||||
"time": "2018-09-06T14:01:05+00:00"
|
"time": "2018-10-02T14:12:00+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/tinker",
|
"name": "laravel/tinker",
|
||||||
@@ -659,26 +659,26 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem",
|
"name": "league/flysystem",
|
||||||
"version": "1.0.46",
|
"version": "1.0.47",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/flysystem.git",
|
"url": "https://github.com/thephpleague/flysystem.git",
|
||||||
"reference": "f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2"
|
"reference": "a11e4a75f256bdacf99d20780ce42d3b8272975c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2",
|
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a11e4a75f256bdacf99d20780ce42d3b8272975c",
|
||||||
"reference": "f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2",
|
"reference": "a11e4a75f256bdacf99d20780ce42d3b8272975c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
"ext-fileinfo": "*",
|
||||||
"php": ">=5.5.9"
|
"php": ">=5.5.9"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"league/flysystem-sftp": "<1.0.6"
|
"league/flysystem-sftp": "<1.0.6"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-fileinfo": "*",
|
|
||||||
"phpspec/phpspec": "^3.4",
|
"phpspec/phpspec": "^3.4",
|
||||||
"phpunit/phpunit": "^5.7.10"
|
"phpunit/phpunit": "^5.7.10"
|
||||||
},
|
},
|
||||||
@@ -739,7 +739,7 @@
|
|||||||
"sftp",
|
"sftp",
|
||||||
"storage"
|
"storage"
|
||||||
],
|
],
|
||||||
"time": "2018-08-22T07:45:22+00:00"
|
"time": "2018-09-14T15:30:29+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
@@ -821,16 +821,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nesbot/carbon",
|
"name": "nesbot/carbon",
|
||||||
"version": "1.33.0",
|
"version": "1.34.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||||
"reference": "55667c1007a99e82030874b1bb14d24d07108413"
|
"reference": "1dbd3cb01c5645f3e7deda7aa46ef780d95fcc33"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/55667c1007a99e82030874b1bb14d24d07108413",
|
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/1dbd3cb01c5645f3e7deda7aa46ef780d95fcc33",
|
||||||
"reference": "55667c1007a99e82030874b1bb14d24d07108413",
|
"reference": "1dbd3cb01c5645f3e7deda7aa46ef780d95fcc33",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -872,20 +872,20 @@
|
|||||||
"datetime",
|
"datetime",
|
||||||
"time"
|
"time"
|
||||||
],
|
],
|
||||||
"time": "2018-08-07T08:39:47+00:00"
|
"time": "2018-09-20T19:36:25+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/php-parser",
|
"name": "nikic/php-parser",
|
||||||
"version": "v4.0.3",
|
"version": "v4.0.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||||
"reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d"
|
"reference": "fa6ee28600d21d49b2b4e1006b48426cec8e579c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd088dc940a418f09cda079a9b5c7c478890fb8d",
|
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/fa6ee28600d21d49b2b4e1006b48426cec8e579c",
|
||||||
"reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d",
|
"reference": "fa6ee28600d21d49b2b4e1006b48426cec8e579c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -923,7 +923,68 @@
|
|||||||
"parser",
|
"parser",
|
||||||
"php"
|
"php"
|
||||||
],
|
],
|
||||||
"time": "2018-07-15T17:25:16+00:00"
|
"time": "2018-09-18T07:03:24+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "opis/closure",
|
||||||
|
"version": "3.1.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/opis/closure.git",
|
||||||
|
"reference": "d3209e46ad6c69a969b705df0738fd0dbe26ef9e"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/opis/closure/zipball/d3209e46ad6c69a969b705df0738fd0dbe26ef9e",
|
||||||
|
"reference": "d3209e46ad6c69a969b705df0738fd0dbe26ef9e",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^5.4 || ^7.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"jeremeamia/superclosure": "^2.0",
|
||||||
|
"phpunit/phpunit": "^4.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Opis\\Closure\\": "src/"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"functions.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Marius Sarca",
|
||||||
|
"email": "marius.sarca@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Sorin Sarca",
|
||||||
|
"email": "sarca_sorin@hotmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.",
|
||||||
|
"homepage": "https://opis.io/closure",
|
||||||
|
"keywords": [
|
||||||
|
"anonymous functions",
|
||||||
|
"closure",
|
||||||
|
"function",
|
||||||
|
"serializable",
|
||||||
|
"serialization",
|
||||||
|
"serialize"
|
||||||
|
],
|
||||||
|
"time": "2018-10-02T13:36:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "paragonie/random_compat",
|
"name": "paragonie/random_compat",
|
||||||
@@ -1272,16 +1333,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "swiftmailer/swiftmailer",
|
"name": "swiftmailer/swiftmailer",
|
||||||
"version": "v6.1.2",
|
"version": "v6.1.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/swiftmailer/swiftmailer.git",
|
"url": "https://github.com/swiftmailer/swiftmailer.git",
|
||||||
"reference": "7d760881d266d63c5e7a1155cbcf2ac656a31ca8"
|
"reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/7d760881d266d63c5e7a1155cbcf2ac656a31ca8",
|
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8ddcb66ac10c392d3beb54829eef8ac1438595f4",
|
||||||
"reference": "7d760881d266d63c5e7a1155cbcf2ac656a31ca8",
|
"reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1327,20 +1388,20 @@
|
|||||||
"mail",
|
"mail",
|
||||||
"mailer"
|
"mailer"
|
||||||
],
|
],
|
||||||
"time": "2018-07-13T07:04:35+00:00"
|
"time": "2018-09-11T07:12:52+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v4.1.4",
|
"version": "v4.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/console.git",
|
"url": "https://github.com/symfony/console.git",
|
||||||
"reference": "ca80b8ced97cf07390078b29773dc384c39eee1f"
|
"reference": "d3dbe91fd5b8b11ecb73508c844bc6a490de15b4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/console/zipball/ca80b8ced97cf07390078b29773dc384c39eee1f",
|
"url": "https://api.github.com/repos/symfony/console/zipball/d3dbe91fd5b8b11ecb73508c844bc6a490de15b4",
|
||||||
"reference": "ca80b8ced97cf07390078b29773dc384c39eee1f",
|
"reference": "d3dbe91fd5b8b11ecb73508c844bc6a490de15b4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1395,20 +1456,20 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony Console Component",
|
"description": "Symfony Console Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2018-07-26T11:24:31+00:00"
|
"time": "2018-09-30T03:38:13+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/css-selector",
|
"name": "symfony/css-selector",
|
||||||
"version": "v4.1.4",
|
"version": "v4.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/css-selector.git",
|
"url": "https://github.com/symfony/css-selector.git",
|
||||||
"reference": "2a4df7618f869b456f9096781e78c57b509d76c7"
|
"reference": "9ac515bde3c725ca46efa918d37e37c7cece6353"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/2a4df7618f869b456f9096781e78c57b509d76c7",
|
"url": "https://api.github.com/repos/symfony/css-selector/zipball/9ac515bde3c725ca46efa918d37e37c7cece6353",
|
||||||
"reference": "2a4df7618f869b456f9096781e78c57b509d76c7",
|
"reference": "9ac515bde3c725ca46efa918d37e37c7cece6353",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1448,20 +1509,20 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony CssSelector Component",
|
"description": "Symfony CssSelector Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2018-07-26T09:10:45+00:00"
|
"time": "2018-09-08T13:24:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/debug",
|
"name": "symfony/debug",
|
||||||
"version": "v4.1.4",
|
"version": "v4.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/debug.git",
|
"url": "https://github.com/symfony/debug.git",
|
||||||
"reference": "47ead688f1f2877f3f14219670f52e4722ee7052"
|
"reference": "b4a0b67dee59e2cae4449a8f8eabc508d622fd33"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/debug/zipball/47ead688f1f2877f3f14219670f52e4722ee7052",
|
"url": "https://api.github.com/repos/symfony/debug/zipball/b4a0b67dee59e2cae4449a8f8eabc508d622fd33",
|
||||||
"reference": "47ead688f1f2877f3f14219670f52e4722ee7052",
|
"reference": "b4a0b67dee59e2cae4449a8f8eabc508d622fd33",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1504,11 +1565,11 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony Debug Component",
|
"description": "Symfony Debug Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2018-08-03T11:13:38+00:00"
|
"time": "2018-09-22T19:04:12+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher",
|
"name": "symfony/event-dispatcher",
|
||||||
"version": "v4.1.4",
|
"version": "v4.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||||
@@ -1571,16 +1632,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/finder",
|
"name": "symfony/finder",
|
||||||
"version": "v4.1.4",
|
"version": "v4.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/finder.git",
|
"url": "https://github.com/symfony/finder.git",
|
||||||
"reference": "e162f1df3102d0b7472805a5a9d5db9fcf0a8068"
|
"reference": "f0b042d445c155501793e7b8007457f9f5bb1c8c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/finder/zipball/e162f1df3102d0b7472805a5a9d5db9fcf0a8068",
|
"url": "https://api.github.com/repos/symfony/finder/zipball/f0b042d445c155501793e7b8007457f9f5bb1c8c",
|
||||||
"reference": "e162f1df3102d0b7472805a5a9d5db9fcf0a8068",
|
"reference": "f0b042d445c155501793e7b8007457f9f5bb1c8c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1616,20 +1677,20 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony Finder Component",
|
"description": "Symfony Finder Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2018-07-26T11:24:31+00:00"
|
"time": "2018-09-21T12:49:42+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-foundation",
|
"name": "symfony/http-foundation",
|
||||||
"version": "v4.1.4",
|
"version": "v4.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-foundation.git",
|
"url": "https://github.com/symfony/http-foundation.git",
|
||||||
"reference": "3a5c91e133b220bb882b3cd773ba91bf39989345"
|
"reference": "2ce66353d0a6ea96bc54bc9ecf8bcea4eaf5896c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/3a5c91e133b220bb882b3cd773ba91bf39989345",
|
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/2ce66353d0a6ea96bc54bc9ecf8bcea4eaf5896c",
|
||||||
"reference": "3a5c91e133b220bb882b3cd773ba91bf39989345",
|
"reference": "2ce66353d0a6ea96bc54bc9ecf8bcea4eaf5896c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1670,20 +1731,20 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony HttpFoundation Component",
|
"description": "Symfony HttpFoundation Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2018-08-27T17:47:02+00:00"
|
"time": "2018-09-30T03:47:35+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-kernel",
|
"name": "symfony/http-kernel",
|
||||||
"version": "v4.1.4",
|
"version": "v4.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-kernel.git",
|
"url": "https://github.com/symfony/http-kernel.git",
|
||||||
"reference": "33de0a1ff2e1720096189e3ced682d7a4e8f5e35"
|
"reference": "74b1d37bf9a1cddc38093530c0a931a310994ea5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/33de0a1ff2e1720096189e3ced682d7a4e8f5e35",
|
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/74b1d37bf9a1cddc38093530c0a931a310994ea5",
|
||||||
"reference": "33de0a1ff2e1720096189e3ced682d7a4e8f5e35",
|
"reference": "74b1d37bf9a1cddc38093530c0a931a310994ea5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1757,7 +1818,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony HttpKernel Component",
|
"description": "Symfony HttpKernel Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2018-08-28T06:17:42+00:00"
|
"time": "2018-09-30T05:05:39+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
@@ -1933,16 +1994,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/process",
|
"name": "symfony/process",
|
||||||
"version": "v4.1.4",
|
"version": "v4.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/process.git",
|
"url": "https://github.com/symfony/process.git",
|
||||||
"reference": "86cdb930a6a855b0ab35fb60c1504cb36184f843"
|
"reference": "c64647828bc7733ba9427f1eeb1b542588635427"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/process/zipball/86cdb930a6a855b0ab35fb60c1504cb36184f843",
|
"url": "https://api.github.com/repos/symfony/process/zipball/c64647828bc7733ba9427f1eeb1b542588635427",
|
||||||
"reference": "86cdb930a6a855b0ab35fb60c1504cb36184f843",
|
"reference": "c64647828bc7733ba9427f1eeb1b542588635427",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1978,20 +2039,20 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony Process Component",
|
"description": "Symfony Process Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2018-08-03T11:13:38+00:00"
|
"time": "2018-09-08T13:24:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/routing",
|
"name": "symfony/routing",
|
||||||
"version": "v4.1.4",
|
"version": "v4.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/routing.git",
|
"url": "https://github.com/symfony/routing.git",
|
||||||
"reference": "a5784c2ec4168018c87b38f0e4f39d2278499f51"
|
"reference": "d998113cf6db1e8262fdd8d5db9774c9a7be33b0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/routing/zipball/a5784c2ec4168018c87b38f0e4f39d2278499f51",
|
"url": "https://api.github.com/repos/symfony/routing/zipball/d998113cf6db1e8262fdd8d5db9774c9a7be33b0",
|
||||||
"reference": "a5784c2ec4168018c87b38f0e4f39d2278499f51",
|
"reference": "d998113cf6db1e8262fdd8d5db9774c9a7be33b0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2055,20 +2116,20 @@
|
|||||||
"uri",
|
"uri",
|
||||||
"url"
|
"url"
|
||||||
],
|
],
|
||||||
"time": "2018-08-03T07:58:40+00:00"
|
"time": "2018-09-08T13:24:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/translation",
|
"name": "symfony/translation",
|
||||||
"version": "v4.1.4",
|
"version": "v4.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/translation.git",
|
"url": "https://github.com/symfony/translation.git",
|
||||||
"reference": "fa2182669f7983b7aa5f1a770d053f79f0ef144f"
|
"reference": "6e49130ddf150b7bfe9e34edb2f3f698aa1aa43b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/translation/zipball/fa2182669f7983b7aa5f1a770d053f79f0ef144f",
|
"url": "https://api.github.com/repos/symfony/translation/zipball/6e49130ddf150b7bfe9e34edb2f3f698aa1aa43b",
|
||||||
"reference": "fa2182669f7983b7aa5f1a770d053f79f0ef144f",
|
"reference": "6e49130ddf150b7bfe9e34edb2f3f698aa1aa43b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2124,20 +2185,20 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony Translation Component",
|
"description": "Symfony Translation Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2018-08-07T12:45:11+00:00"
|
"time": "2018-09-21T12:49:42+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/var-dumper",
|
"name": "symfony/var-dumper",
|
||||||
"version": "v4.1.4",
|
"version": "v4.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/var-dumper.git",
|
"url": "https://github.com/symfony/var-dumper.git",
|
||||||
"reference": "a05426e27294bba7b0226ffc17dd01a3c6ef9777"
|
"reference": "1509020968321c1d46408c11c142a2388b1c9b0c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/a05426e27294bba7b0226ffc17dd01a3c6ef9777",
|
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/1509020968321c1d46408c11c142a2388b1c9b0c",
|
||||||
"reference": "a05426e27294bba7b0226ffc17dd01a3c6ef9777",
|
"reference": "1509020968321c1d46408c11c142a2388b1c9b0c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2199,7 +2260,7 @@
|
|||||||
"debug",
|
"debug",
|
||||||
"dump"
|
"dump"
|
||||||
],
|
],
|
||||||
"time": "2018-08-02T09:24:26+00:00"
|
"time": "2018-09-18T12:45:12+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "tijsverkoyen/css-to-inline-styles",
|
"name": "tijsverkoyen/css-to-inline-styles",
|
||||||
@@ -2417,16 +2478,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "filp/whoops",
|
"name": "filp/whoops",
|
||||||
"version": "2.2.0",
|
"version": "2.2.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/filp/whoops.git",
|
"url": "https://github.com/filp/whoops.git",
|
||||||
"reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a"
|
"reference": "e79cd403fb77fc8963a99ecc30e80ddd885b3311"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/filp/whoops/zipball/181c4502d8f34db7aed7bfe88d4f87875b8e947a",
|
"url": "https://api.github.com/repos/filp/whoops/zipball/e79cd403fb77fc8963a99ecc30e80ddd885b3311",
|
||||||
"reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a",
|
"reference": "e79cd403fb77fc8963a99ecc30e80ddd885b3311",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2445,7 +2506,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.1-dev"
|
"dev-master": "2.2-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -2474,7 +2535,7 @@
|
|||||||
"throwable",
|
"throwable",
|
||||||
"whoops"
|
"whoops"
|
||||||
],
|
],
|
||||||
"time": "2018-03-03T17:56:25+00:00"
|
"time": "2018-06-30T13:14:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "fzaninotto/faker",
|
"name": "fzaninotto/faker",
|
||||||
@@ -2576,16 +2637,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mockery/mockery",
|
"name": "mockery/mockery",
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/mockery/mockery.git",
|
"url": "https://github.com/mockery/mockery.git",
|
||||||
"reference": "99e29d3596b16dabe4982548527d5ddf90232e99"
|
"reference": "100633629bf76d57430b86b7098cd6beb996a35a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/mockery/mockery/zipball/99e29d3596b16dabe4982548527d5ddf90232e99",
|
"url": "https://api.github.com/repos/mockery/mockery/zipball/100633629bf76d57430b86b7098cd6beb996a35a",
|
||||||
"reference": "99e29d3596b16dabe4982548527d5ddf90232e99",
|
"reference": "100633629bf76d57430b86b7098cd6beb996a35a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2594,8 +2655,7 @@
|
|||||||
"php": ">=5.6.0"
|
"php": ">=5.6.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpdocumentor/phpdocumentor": "^2.9",
|
"phpunit/phpunit": "~5.7.10|~6.5|~7.0"
|
||||||
"phpunit/phpunit": "~5.7.10|~6.5"
|
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@@ -2638,7 +2698,7 @@
|
|||||||
"test double",
|
"test double",
|
||||||
"testing"
|
"testing"
|
||||||
],
|
],
|
||||||
"time": "2018-05-08T08:54:48+00:00"
|
"time": "2018-10-02T21:52:37+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "myclabs/deep-copy",
|
"name": "myclabs/deep-copy",
|
||||||
@@ -3133,21 +3193,24 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-file-iterator",
|
"name": "phpunit/php-file-iterator",
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
||||||
"reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c"
|
"reference": "050bedf145a257b1ff02746c31894800e5122946"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cecbc684605bb0cc288828eb5d65d93d5c676d3c",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946",
|
||||||
"reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c",
|
"reference": "050bedf145a257b1ff02746c31894800e5122946",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1"
|
"php": "^7.1"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^7.1"
|
||||||
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
@@ -3176,7 +3239,7 @@
|
|||||||
"filesystem",
|
"filesystem",
|
||||||
"iterator"
|
"iterator"
|
||||||
],
|
],
|
||||||
"time": "2018-06-11T11:44:00+00:00"
|
"time": "2018-09-13T20:33:42+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-text-template",
|
"name": "phpunit/php-text-template",
|
||||||
@@ -3319,16 +3382,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "7.3.4",
|
"version": "7.3.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "0356331bf62896dc56e3a15030b23b73f38b2935"
|
"reference": "7b331efabbb628c518c408fdfcaf571156775de2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0356331bf62896dc56e3a15030b23b73f38b2935",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7b331efabbb628c518c408fdfcaf571156775de2",
|
||||||
"reference": "0356331bf62896dc56e3a15030b23b73f38b2935",
|
"reference": "7b331efabbb628c518c408fdfcaf571156775de2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3399,7 +3462,7 @@
|
|||||||
"testing",
|
"testing",
|
||||||
"xunit"
|
"xunit"
|
||||||
],
|
],
|
||||||
"time": "2018-09-05T09:58:53+00:00"
|
"time": "2018-09-08T15:14:29+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/code-unit-reverse-lookup",
|
"name": "sebastian/code-unit-reverse-lookup",
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class AddLocationToUsers extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->string('language')->after('email_verified_at')->default('en');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('language');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
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>
|
||||||
|
|||||||
@@ -1,44 +1,51 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
setInterval(function() {
|
||||||
|
window.location.reload(true);
|
||||||
|
}, 2*60000); //NOTE: period is passed in milliseconds
|
||||||
|
</script>
|
||||||
|
|
||||||
<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">
|
@if (!$loop->first)
|
||||||
{{ session('status') }}
|
<hr class="m-3">
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
|
<div class="row align-items-center p-2">
|
||||||
@forelse ($items as $item)
|
<div class="col col-xs-auto">
|
||||||
@if (!$loop->first)
|
|
||||||
<hr class="m-3">
|
|
||||||
@endif
|
|
||||||
<div class="my-4 p-2">
|
|
||||||
@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
|
|
||||||
|
|
||||||
@if ($item->used_by)
|
|
||||||
@include('home.usedItem')
|
|
||||||
@else
|
|
||||||
@include('home.unusedItem')
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
<div class="ml-auto align-self-end text-right">
|
||||||
|
@if ($item->used_by)
|
||||||
|
@include('home.usedItem')
|
||||||
|
@else
|
||||||
|
@include('home.unusedItem')
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@empty
|
@empty
|
||||||
<p>There are no items shared with you yet. <a href="/product">Share an item!</a></p>
|
|
||||||
@endforelse
|
@endforelse
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@empty
|
||||||
|
<p>@lang('home.no_messages') <a href="/product">@lang('home.share_item')</a></p>
|
||||||
|
@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">@lang('home.take')</button>
|
||||||
<button type="submit" class="btn btn-sm btn-success">Take It</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>
|
||||||
{{ csrf_field() }}
|
<div class="w-100 d-xm-block d-sm-none"></div>
|
||||||
@method('DELETE')
|
{{ csrf_field() }}
|
||||||
<input type="hidden" name="item" value="{{$item->id}}">
|
@method('DELETE')
|
||||||
<button type="submit" class="btn btn-sm btn-danger">Return It</button>
|
<input type="hidden" name="item" value="{{$item->id}}">
|
||||||
</form>
|
<button type="submit" class="btn btn-sm btn-danger ml-auto">@lang('home.return')</button>
|
||||||
</span>
|
</form>
|
||||||
<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() }}
|
{{str_limit($users[$item->used_by], 15, '...')}}
|
||||||
<input type="hidden" name="item" value="{{$item->id}}">
|
@if ($item->waiting_user_id && $item->waiting_user_id != \Auth::id())
|
||||||
@if ($item->waiting_user_id == \Auth::id())
|
<strong>> {{str_limit($users[$item->waiting_user_id], 15, '...')}}</strong>
|
||||||
@method('DELETE')
|
@endif
|
||||||
<button type="submit" class="btn btn-sm btn-outline-danger">Cancel Alert</button>
|
<small>({{$item->updated_at->diffForHumans()}})</small>
|
||||||
@elseif (!$item->waiting_user_id)
|
</em>
|
||||||
<button type="submit" class="btn btn-sm btn-outline-secondary">Alert me</button>
|
<div class="w-100 d-xm-block d-sm-none"></div>
|
||||||
@endif
|
{{ csrf_field() }}
|
||||||
</form>
|
<input type="hidden" name="item" value="{{$item->id}}">
|
||||||
</span>
|
@if ($item->waiting_user_id == \Auth::id())
|
||||||
<span class="float-right mr-3">
|
@method('DELETE')
|
||||||
<em>
|
<button type="submit" class="btn btn-sm btn-outline-danger ml-auto">@lang('home.cancel_alert')</button>
|
||||||
{{str_limit($users[$item->used_by], 15, '...')}}
|
@elseif (!$item->waiting_user_id)
|
||||||
@if ($item->waiting_user_id && $item->waiting_user_id != \Auth::id())
|
<button type="submit" class="btn btn-sm btn-outline-secondary ml-auto">@lang('home.alert_me')</button>
|
||||||
<strong>> {{str_limit($users[$item->waiting_user_id], 15, '...')}}</strong>
|
@endif
|
||||||
@endif
|
</form>
|
||||||
<small>({{$item->updated_at->diffForHumans()}})</small>
|
|
||||||
</em>
|
|
||||||
</span>
|
|
||||||
@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>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
@@ -7,7 +8,7 @@
|
|||||||
<!-- CSRF Token -->
|
<!-- CSRF Token -->
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
<title>{{ config('app.name', 'Laravel') }} {{ isset($usedItems) && $usedItems > 0 ? "(${usedItems})" : '' }}</title>
|
||||||
|
|
||||||
<!-- Scripts -->
|
<!-- Scripts -->
|
||||||
<script src="{{ asset('js/app.js') }}" defer></script>
|
<script src="{{ asset('js/app.js') }}" defer></script>
|
||||||
@@ -19,6 +20,7 @@
|
|||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<nav class="navbar navbar-expand-md navbar-light navbar-laravel">
|
<nav class="navbar navbar-expand-md navbar-light navbar-laravel">
|
||||||
@@ -26,7 +28,8 @@
|
|||||||
<a class="navbar-brand" href="{{ url('/') }}">
|
<a class="navbar-brand" href="{{ url('/') }}">
|
||||||
{{ config('app.name', 'Laravel') }}
|
{{ config('app.name', 'Laravel') }}
|
||||||
</a>
|
</a>
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||||
|
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -40,39 +43,49 @@
|
|||||||
<ul class="navbar-nav ml-auto">
|
<ul class="navbar-nav ml-auto">
|
||||||
<!-- Authentication Links -->
|
<!-- Authentication Links -->
|
||||||
@guest
|
@guest
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a>
|
<a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
|
<a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
|
||||||
</li>
|
</li>
|
||||||
@else
|
@else
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
|
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown"
|
||||||
{{ Auth::user()->name }} <span class="caret"></span>
|
aria-haspopup="true" aria-expanded="false" v-pre>
|
||||||
|
{{ Auth::user()->name }} <span class="caret"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
||||||
|
<a class="dropdown-item" href="{{ route('logout') }}" onclick="event.preventDefault();
|
||||||
|
document.getElementById('logout-form').submit();">
|
||||||
|
{{ __('Logout') }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
|
||||||
<a class="dropdown-item" href="{{ route('logout') }}"
|
@csrf
|
||||||
onclick="event.preventDefault();
|
</form>
|
||||||
document.getElementById('logout-form').submit();">
|
</div>
|
||||||
{{ __('Logout') }}
|
</li>
|
||||||
</a>
|
|
||||||
|
|
||||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
|
|
||||||
@csrf
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
@endguest
|
@endguest
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<main class="py-4">
|
@if ($flashMsg = session('primary'))
|
||||||
|
<div class="alert alert-primary text-center" role="alert">{{ $flashMsg }}</div>
|
||||||
|
@endif
|
||||||
|
@if ($flashMsg = session('danger'))
|
||||||
|
<div class="alert alert-danger text-center" role="alert">{{ $flashMsg }}</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<main class="py-4 mb-5">
|
||||||
@yield('content')
|
@yield('content')
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
@include('layouts.footer')
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
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,7 +15,9 @@ Route::get('/', function () {
|
|||||||
return view('welcome');
|
return view('welcome');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/product', 'ProductController@index')->middleware('auth');
|
Route::get('/lang/{locale}', 'LanguageController@update')->name('language');
|
||||||
|
|
||||||
|
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');
|
||||||
Route::patch('/product', 'ProductController@patch')->middleware('verified');
|
Route::patch('/product', 'ProductController@patch')->middleware('verified');
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#source ~/.zshrc
|
|
||||||
vagrant up
|
|
||||||
./ssh_homestead.sh
|
|
||||||
Reference in New Issue
Block a user