first change
This commit is contained in:
40
Modules/Sitemap/app/Models/SitemapConfig.php
Normal file
40
Modules/Sitemap/app/Models/SitemapConfig.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?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();
|
||||
// }
|
||||
}
|
Reference in New Issue
Block a user