w0bm.com v1.5z FULL.RETARD.BUILD.BUT.STILL.WORKS
This commit is contained in:
20
app/Models/Donation.php
Normal file
20
app/Models/Donation.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Donation extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
public static $needed = 150;
|
||||
|
||||
public static function getPercentage() {
|
||||
return (static::getFunds() / static::$needed) * 100;
|
||||
}
|
||||
|
||||
public static function getFunds() {
|
||||
return static::sum('amount') ?? 0;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user