TermsController::terms()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
c 0
b 0
f 0
dl 0
loc 11
rs 10
cc 1
nc 1
nop 0
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