TermsController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
c 0
b 0
f 0
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A terms() 0 11 1
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use Illuminate\View\View;
6
7
class TermsController extends BasePageController
8
{
9
    /**
10
     * Display the terms and conditions page.
11
     */
12
    public function terms(): View
13
    {
14
        $title = 'Terms and Conditions';
15
        $meta_title = config('app.name').' - Terms and conditions';
16
        $meta_keywords = 'terms,conditions';
17
        $meta_description = 'Terms and Conditions for '.config('app.name');
18
19
        // Get terms content from settings
20
        $terms_content = $this->settings->tandc ?? '<p>No terms and conditions have been set yet.</p>';
0 ignored issues
show
Bug introduced by
The property tandc does not seem to exist on App\Models\Settings. Are you sure there is no database migration missing?

Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.

Loading history...
21
22
        return view('terms', compact('title', 'meta_title', 'meta_keywords', 'meta_description', 'terms_content'));
23
    }
24
}
25