41 lines
835 B
PHP
41 lines
835 B
PHP
<?php
|
|
|
|
namespace Modules\Sitemap\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
// use Modules\Sitemap\Database\Factories\SitemapFactory;
|
|
|
|
class SitemapConfig extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*/
|
|
protected $fillable = [
|
|
"title",
|
|
"sitemap_excludes",
|
|
"ignore_robot",
|
|
"max_depth",
|
|
"max_crawl_count",
|
|
"order",
|
|
"status"
|
|
];
|
|
|
|
protected function casts(): array {
|
|
return [
|
|
"ignore_robot" => "boolean",
|
|
];
|
|
}
|
|
|
|
public function scopeActive($builder) {
|
|
$builder->where("status", 1);
|
|
}
|
|
|
|
// protected static function newFactory(): SitemapFactory
|
|
// {
|
|
// // return SitemapFactory::new();
|
|
// }
|
|
}
|