Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <-- Auth -->
- @extends('layouts.front.@layout')
- @section('title', 'Login')
- @section('content')
- <div class="col-lg-8 col-md-12 col-sm-12">
- <div class="card">
- <div class="card-header">
- <h3 class="d-inline-block text-header"><i class="fas fa-share"></i> Login</h3>
- </div>
- <div class="card-body">
- <div class="row">
- <div class="col-lg-6 col-md-6 col-sm-12 border-right">
- <form action="{{ route('login') }}" method="post">
- @csrf
- <label for="email">Email*</label>
- <input type="text" id="email" placeholder="Email" class="form-control mb-3" name="email">
- <label for="password">Heslo*</label>
- <input type="password" id="password" placeholder="Heslo" class="form-control mb-3" name="password">
- <button type="submit" class="btn btn-primary btn-sm"><i class="fas fa-share"></i> Přihlásit se</button>
- </form>
- </div>
- <div class="col-lg-6 col-md-6 col-sm-12">
- <div class="text-center">
- <h3 class="d-block text-header">Přihlášení + registrace</h3>
- <small class="d-block">Noví uživatelé se musí registrovat skrz tento Twitch odkaz</small>
- <hr>
- </div>
- <a class="btn btn-lg btn-twitch" href="{{ $urlAuth }}"><i class="fab fa-twitch"></i> Twitch</a>
- </div>
- </div>
- </div>
- </div>
- <div class="card">
- <div class="card-header">
- <h3 class="d-inline-block text-header"><i class="fas fa-shopping-cart"></i> Featured products</h3>
- </div>
- <div class="card-body">
- <div class="row">
- <div class="col-lg-3 col-md-3 col-sm-3">
- <div class="featured-product">
- @foreach($products as $product)
- <div class="featured-product__info">
- <div class="featured-product__title">
- <h4>{{ $product->name }}</h4>
- </div>
- <div class="featured-product__image">
- <img src="{{ asset('images/products/' . $product->image) }}" alt="{{ $product->name }}">
- </div>
- </div>
- @endforeach
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- @endsection
- <-- Login route -->
- Route::post('/login', [
- 'uses' => 'Auth\LoginController@login',
- 'as' => 'login'
- ]);
- <-- btn twitch -->
- .btn-twitch {
- display: block;
- background: #6441a5;
- text-align: left;
- font-size: 16px;
- color: #fff;
- }
- .btn-twitch:hover {
- color: #fff;
- background: rgba(100, 65, 165, 0.9);
- }
- <-- Product repo -->
- <?php
- namespace App\Repositories;
- use App\Model\Product;
- class ProductRepository
- {
- protected $product;
- public function __construct(Product $product)
- {
- $this->product = $product;
- }
- public function getAll()
- {
- return $this->product->all();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement