【Laravel入門】DB::transactionでRequestを使うには?

DB::transactionとは 「DB::transaction」とは、Laravelフレームワークにおけるデータベーストランザクションを操作するためのメソッドです。トランザクションは、一連のデータベース操作が「全て成功する」か「失敗する」のどちらかのプログラムの動きになりま ...
【git】fetchとmergeについて!git pullとの違いは?

git fetch リモートブランチ最新状態を、追跡しているローカルブランチへ最新の情報を取得できます。リモート先は接続先を指定するかHEADです。 HEADからリモートを取得 git fetch git fetchでorigin remote branchを取得 git fet ...
【npmでエラー】node-sass command failedの対応方法

今回は「【npmでエラー】node-sass command failedの対応方法」について解説です。 node-sass command failedとは? 「npm install」や「npm run dev」などのnpmコマンドで、node-sassでcommand fa ...
ERROR Error: error:0308010C:digital envelope routines::unsupported

error:0308010C:digital envelope とはroutines::unsupported 「error:0308010C:digital envelope routines::unsupported」のエラーメッセージは、Node.jsのcryptoモジュー ...
【Git】リモートブランチからローカルブランチを切る【git checkout -b feature/develop origin/feature/develop】

今回はリモートブランチからローカルブランチを切る紹介です。 ローカルブランチ確認 「git branch」でローカルのブランチを確認することができます。複数ブランチがあれば、カレントブランチも確認できます。 % git branch * main リモートのブランチ確認 「git ...
【Laravel入門】middleware(ミドルウェア)とは

middleware(ミドルウェア)とは middlewareとは、HTTPリクエストが送られたタイミングで、受信されてからレスポンスが返されるまでの間に実行される処理をカプセル化したものです。 ミドルウェアはコントローラークラスの前後で処理を行えます。 URL(リクエスト) ↓ ...
【Laravel入門】Route::groupについて学ぶ

Route::groupとは groupとはURIの接頭部や名前空間の接頭部を共通化できます。ルートをグループ化し、共通の属性や中間ウェアを適用するための機能です。この機能を使用することで、同じ属性や中間ウェアを持つ複数のルートをまとめて設定し、コードの重複を減少させることができ ...
SQLSTATE[HY000] [1044] Access denied for user ‘sail’@’%’ to database ‘laravel’

今回は「SQLSTATE Access denied for user 'sail'@'%' to database 'laravel'」についての紹介です。 runするとエラーに Laravel sailのアプリケーションでrun実行時にエラーが発生。 npm run dev ...
【Laravel sailでDB接続エラー】SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘laravel.sessions’ doesn’t exist

エラー文 「run」を実行したときにエラーが発生しました。その原因と解決方法を見ていきましょう。 SQLSTATE: Base table or view not found: 1146 Table 'laravel.sessions' doesn't e ...
【Laravel Sail】Inertia.jsを使ってReactとTypeScript環境構築

今回はLaravel sailを使ってReactとTypeScriptの環境構築の紹介です。 Inertiaとは? Inertia.jsは、クライアントサイドとサーバーサイドの間でデータを非同期的に交換することで、SPAの利点を活用しつつ、従来のサーバーサイドレンダリングの利点を ...