Archived
1
0
Fork 0
This repository has been archived on 2026-06-16. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
wow-raid-bingo/app/View/Components/Card.php
2021-10-18 11:56:52 +02:00

54 lines
967 B
PHP

<?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');
}
}