43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\HtmlString;
|
|
|
|
class Plan extends Model
|
|
{
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var list<string>
|
|
*/
|
|
protected $fillable = [
|
|
'name',
|
|
'payment',
|
|
'description',
|
|
'preis',
|
|
'limit_user',
|
|
'limit_auftraggeber',
|
|
'limit_gutachter',
|
|
'limit_gutachten',
|
|
'icon',
|
|
];
|
|
|
|
public static function options()
|
|
{
|
|
$arr = Plan::all()->toArray();
|
|
foreach ($arr as $key => $value) {
|
|
$str = '<div class="text-primary-500 text-lg">'.$value['payment'].'</div>';
|
|
$str .= '<div class="text-xl font-black">'.number_format($value['preis'], 2).'€</div>';
|
|
$str .= '<ol class="font-light text-xs leading-3 m-0 p-3">';
|
|
$str .= '<li>'.$value['limit_user'].' Benutzer</li>';
|
|
$str .= '<li>'.$value['limit_gutachter'].' Gutachter</li>';
|
|
$str .= '</ol>';
|
|
$arr[$key + 1] = new HtmlString($str);
|
|
}
|
|
|
|
return $arr;
|
|
}
|
|
}
|