Skip to content

Commit

Permalink
Change how we pass data into the presentation slide
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBernskiold committed Feb 16, 2024
1 parent f41c9a9 commit a988fe2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/Presentation/PresentationSlide.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
use BernskioldMedia\LaravelPpt\Concerns\Makeable;

/**
* @method static BaseSlide make(array $data)
* @method static BaseSlide make()
*/
abstract class PresentationSlide
{
use Makeable;

abstract public function __invoke(array $data): BaseSlide;
public function __construct()
{
}

abstract public function __invoke(): BaseSlide;
}
7 changes: 6 additions & 1 deletion stubs/Slide.stub
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ use BernskioldMedia\LaravelPpt\SlideMasters\Blank;
class {{ $name }} extends PresentationSlide
{

public function __invoke(array $data): BaseSlide
public function __construct()
{
// ...
}

public function __invoke(): BaseSlide
{
return Blank::make();
}
Expand Down

0 comments on commit a988fe2

Please sign in to comment.