-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathGetInvolvedPage.php
More file actions
60 lines (53 loc) · 1.46 KB
/
GetInvolvedPage.php
File metadata and controls
60 lines (53 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class GetInvolvedPage extends Model
{
protected $table = 'get_involved_page';
protected $fillable = [
'use_dynamic_content',
'intro_heading',
'intro_text',
'intro_button_text',
'intro_button_link',
'movement_heading',
'movement_text_1',
'movement_text_2',
'start_heading',
'start_text',
'card_community_title',
'card_community_text',
'card_community_link',
'card_community_new_tab',
'card_activity_title',
'card_activity_text',
'card_activity_link',
'card_activity_new_tab',
'card_ambassadors_title',
'card_ambassadors_text',
'card_ambassadors_link',
'card_ambassadors_new_tab',
'card_stories_title',
'card_stories_text',
'card_stories_link',
'card_stories_new_tab',
];
protected $casts = [
'use_dynamic_content' => 'boolean',
'card_community_new_tab' => 'boolean',
'card_activity_new_tab' => 'boolean',
'card_ambassadors_new_tab' => 'boolean',
'card_stories_new_tab' => 'boolean',
];
public static function config(): self
{
$page = self::first();
if ($page) {
return $page;
}
return self::create([
'use_dynamic_content' => false,
'intro_button_link' => '/guide',
]);
}
}