30 lines
695 B
PHP
30 lines
695 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Earn;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\View\View;
|
|
|
|
class EarnLegalPageController extends Controller
|
|
{
|
|
public function terms(): View
|
|
{
|
|
return $this->page('terms');
|
|
}
|
|
|
|
public function privacy(): View
|
|
{
|
|
return $this->page('privacy');
|
|
}
|
|
|
|
private function page(string $document): View
|
|
{
|
|
return view('earn-legal.document', [
|
|
'document' => $document,
|
|
'content' => __('earn_legal.'.$document),
|
|
'version' => config('earn.legal.'.$document.'.version'),
|
|
'effectiveDate' => config('earn.legal.'.$document.'.effective_date'),
|
|
]);
|
|
}
|
|
}
|