Add generic api schema and scripts model
This commit is contained in:
@@ -31,9 +31,17 @@ class Bot extends Model
|
||||
);
|
||||
}
|
||||
|
||||
public function cronToHuman(): Attribute
|
||||
public function cronToHuman(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn () => CronTranslator::translate($this->schedule));
|
||||
get: fn() => CronTranslator::translate($this->schedule)
|
||||
);
|
||||
}
|
||||
|
||||
public function className(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn() => class_basename($this->class)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
10
app/Models/Scripts.php
Normal file
10
app/Models/Scripts.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Scripts extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
Reference in New Issue
Block a user