Add an initial test for counting past talks
This commit is contained in:
parent
8a05b19fd4
commit
26a632608b
4 changed files with 2260 additions and 2 deletions
17
src/TwigExtension/TalkExtension.php
Normal file
17
src/TwigExtension/TalkExtension.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\TwigExtension;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
final class TalkExtension
|
||||
{
|
||||
public function getPastTalksCount(array $talks = []): int
|
||||
{
|
||||
$talkCollection = new Collection($talks);
|
||||
|
||||
return $talkCollection->count();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue