Advertisement
Guest User

yes

a guest
Apr 24th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.59 KB | None | 0 0
  1. <-- Auth -->
  2. @extends('layouts.front.@layout')
  3.  
  4. @section('title', 'Login')
  5.  
  6. @section('content')
  7.  
  8.     <div class="col-lg-8 col-md-12 col-sm-12">
  9.         <div class="card">
  10.             <div class="card-header">
  11.                 <h3 class="d-inline-block text-header"><i class="fas fa-share"></i> Login</h3>
  12.             </div>
  13.             <div class="card-body">
  14.                 <div class="row">
  15.                     <div class="col-lg-6 col-md-6 col-sm-12 border-right">
  16.                         <form action="{{ route('login') }}" method="post">
  17.                             @csrf
  18.                             <label for="email">Email*</label>
  19.                             <input type="text" id="email" placeholder="Email" class="form-control mb-3" name="email">
  20.                             <label for="password">Heslo*</label>
  21.                             <input type="password" id="password" placeholder="Heslo" class="form-control mb-3" name="password">
  22.                             <button type="submit" class="btn btn-primary btn-sm"><i class="fas fa-share"></i> Přihlásit se</button>
  23.                         </form>
  24.                     </div>
  25.                     <div class="col-lg-6 col-md-6 col-sm-12">
  26.                         <div class="text-center">
  27.                             <h3 class="d-block text-header">Přihlášení + registrace</h3>
  28.                             <small class="d-block">Noví uživatelé se musí registrovat skrz tento Twitch odkaz</small>
  29.                             <hr>
  30.                         </div>
  31.                         <a class="btn btn-lg btn-twitch" href="{{ $urlAuth }}"><i class="fab fa-twitch"></i> Twitch</a>
  32.                     </div>
  33.                 </div>
  34.             </div>
  35.         </div>
  36.         <div class="card">
  37.             <div class="card-header">
  38.                 <h3 class="d-inline-block text-header"><i class="fas fa-shopping-cart"></i> Featured products</h3>
  39.             </div>
  40.             <div class="card-body">
  41.                 <div class="row">
  42.                     <div class="col-lg-3 col-md-3 col-sm-3">
  43.                         <div class="featured-product">
  44.                             @foreach($products as $product)
  45.                                 <div class="featured-product__info">
  46.                                     <div class="featured-product__title">
  47.                                         <h4>{{ $product->name }}</h4>
  48.                                     </div>
  49.                                     <div class="featured-product__image">
  50.                                         <img src="{{ asset('images/products/' . $product->image) }}" alt="{{ $product->name }}">
  51.                                     </div>
  52.                                 </div>
  53.                             @endforeach
  54.                         </div>
  55.                     </div>
  56.                 </div>
  57.             </div>
  58.         </div>
  59.     </div>
  60. @endsection
  61.  
  62. <-- Login route -->
  63. Route::post('/login', [
  64.     'uses'  =>  'Auth\LoginController@login',
  65.     'as'    =>  'login'
  66. ]);
  67.  
  68. <-- btn twitch -->
  69.  
  70. .btn-twitch {
  71.     display: block;
  72.     background: #6441a5;
  73.     text-align: left;
  74.     font-size: 16px;
  75.     color: #fff;
  76. }
  77.  
  78. .btn-twitch:hover {
  79.     color: #fff;
  80.     background: rgba(100, 65, 165, 0.9);
  81. }
  82.  
  83.  
  84. <-- Product repo -->
  85. <?php
  86.  
  87. namespace App\Repositories;
  88.  
  89. use App\Model\Product;
  90.  
  91. class ProductRepository
  92. {
  93.  
  94.     protected $product;
  95.  
  96.     public function __construct(Product $product)
  97.     {
  98.         $this->product = $product;
  99.     }
  100.  
  101.     public function getAll()
  102.     {
  103.         return $this->product->all();
  104.     }
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement