TRF Certest first commit

This commit is contained in:
2025-02-26 08:57:46 +01:00
commit 3ce064a108
2524 changed files with 475404 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace Vanguard\Presenters;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
abstract class Presenter
{
public function __construct(protected Model $model)
{
}
public function __isset($property): bool
{
return method_exists($this, Str::camel($property));
}
public function __get($property): mixed
{
$camel_property = Str::camel($property);
if (method_exists($this, $camel_property)) {
return $this->{$camel_property}();
}
return $this->model->{Str::snake($property)};
}
}