Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| DeploymentController | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| guide | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Http\Controllers\admin; |
| 4 | |
| 5 | use App\Http\Controllers\Controller; |
| 6 | use Illuminate\View\View; |
| 7 | |
| 8 | /** |
| 9 | * Settings → Deployment Guide. Shows what to actually paste into cron/ |
| 10 | * Supervisor/.env for the hosting type picked in Settings → Deployment |
| 11 | * (config/settings/deployment.php, `deployment.mode`). This page only |
| 12 | * ever *displays* recommended values — it never edits .env or runs a |
| 13 | * command itself, matching this app's standing rule that server-level |
| 14 | * changes (migrate, cache:clear, storage:link) stay CLI-only, never |
| 15 | * HTTP-triggerable (see the removed /reboot, /fix-storage, /migrate |
| 16 | * routes' note in routes/web.php). |
| 17 | */ |
| 18 | class DeploymentController extends Controller |
| 19 | { |
| 20 | public function guide(): View |
| 21 | { |
| 22 | return view('admin.deployment.guide', [ |
| 23 | 'mode' => settings('deployment.mode', 'shared_cpanel'), |
| 24 | 'path' => base_path(), |
| 25 | // Deliberately just "php", not PHP_BINARY — that's whatever SAPI |
| 26 | // happens to be serving *this* request (on a dev box, often a |
| 27 | // php-cgi.exe path that would be actively wrong pasted into a |
| 28 | // production Linux crontab). Every real host puts a plain `php` |
| 29 | // on PATH; that's the portable, correct default to show. |
| 30 | 'phpBinary' => 'php', |
| 31 | ]); |
| 32 | } |
| 33 | } |