前提
Laravelを用いてアプリを作り、fly.ioでデプロイしています。
実現したいこと
エラーを解決し、正しいページ(トップページ)を表示したい
発生している問題・エラーメッセージ
(1/1) ParseError syntax error, unexpected token "=", expecting "," or ";"``` in TrustProxies.php line 15
試したこと
TrustProxies.phpのファイル内を確認すると、15行目に=があったのですが、括弧の閉じ忘れや誤字があるようには見えませんでした。TrustProxies.phpの書き方をLaravelの公式サイトを確認しても、解決には至りませんでした。初歩的なミスかもしれませんが、ご教授いただけると嬉しいです...。
<?php namespace App\Http\Middleware; use Fideloper\Proxy\TrustProxies as Middleware; use Illuminate\Http\Request; class TrustProxies extends Middleware { /** * The trusted proxies for this application. * * @var array|string */ protected $proxies = '*'; /** * The headers that should be used to detect proxies. * * @var int */ protected $headers = Request::HEADER_X_FORWARDED_ALL; }
補足情報(FW/ツールのバージョンなど)
PHP 8.0.18
Lravel 6.20.44
あなたの回答
tips
プレビュー