Archived
1
0
Fork 0

Initial Commit

This commit is contained in:
Henrik Hautakoski 2021-10-18 11:53:33 +02:00
commit ddf09fe00c
113 changed files with 187148 additions and 0 deletions

View file

@ -0,0 +1,54 @@
<?php
namespace App\View\Components;
use Illuminate\View\Component;
use App\Models\Card as CardModel;
class Card extends Component
{
/**
* Card number
*/
public int $number;
/**
* The card
*/
public CardModel $card;
/**
* If the card is flipped
*/
public bool $flipped;
/**
* If the card is flagged as winning.
*/
public bool $win;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(int $number, CardModel $card, bool $flipped = false, bool $win = false)
{
$this->number = $number;
$this->card = $card;
$this->flipped = $flipped;
$this->win = $win;
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|\Closure|string
*/
public function render()
{
return view('components.card');
}
}