0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ローカル環境でLaravelをダウンロードしblade.phpをプレビューするための備忘録

0
Posted at

起動参考サイト
▼インストール関連
・XAMPPはすでにインストールしていたため自分は省略

▼Composerのインストール手順
・MAMPのパスは記述なしで進めた

▼Laravelのプロジェクトと階層について

Laravelをダウンロード

エラーへの対処

composer create-project laravel/laravel hogehoge
上記のみだと Your requirements could not be resolved to an installable set of packages.とエラーに。
php.iniファイル内で、;extension=fileinfoの行を探します。この行の先頭にあるセミコロン(;)を削除したうえで、コマンドプロンプトを再起動して再度Larabelのプロジェクトをインストールで成功。

プロジェクトがインストールできたら cd hogehoge でディレクトリを移動。
php artisan serveでサーバーを起動。

サーバーを起動してアクセスすると初期画面は表示されず PRAGMA foreign_keys = ON; とエラーに。
XAMPPにあるphpではなく、別途ダウンロードしたphpを読み込んでいたためXAMPPを参照するように変更。

SQLSTATE[HY000]: General error: 1 no such table: sessions
SELECT
*
FROM
"sessions"
WHERE
"id" = 7eEq71Go6pG20y7A9eQFKu32eB03YwbpXgwVYFMZ
limit
1

という別のエラーになったため php artisan migrate をターミナルで実行したところ画面が正常に表示された。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?