- 
	
		
 Next.js
	【Next.js】axiosを使ってSWRで取得する
Next.jsのSWRでデータを取得するときにaxiosを使った方法をご紹介します。 APIサーバーはLaravelを想定しています。また、Laravelでデータを返すときはEloquentのAPI Resourcesを使用しているものとします。 https://laravel.com/docs/8.x/eloquent-resour... - 
	
		
 Laravel
	Laravel でtwitterのフォロー機能を実装する
Laravelでtwitterのフォローのような機能を作る時は、以下のようなパッケージをcomposerでインストールして実装ができます。 overtrue/laravel-followhareku/laravel-follow しかし、このようなパッケージを入れなくてもtwitterのようなフォロー機能をシン... - 
	
		
 Laravel
	Laravelでリレーションの外部キーにnullを許可する
この記事でLaravelのリレーションで外部キーにnullを許可する以下の2つの方法をご紹介します。 バージョンに関係ない共通の書き方Laravel >= 7.x でforeignId()を使う方法 Laravel >= 7.x を使っている場合はforeignId()を使用した方法をおすすめし... - 
	
		
 Laravel
	EC2のLaravelにintervention/imageをインストール
あるウェブサービスで容量の大きい画像(2〜数十MB)の画像加工をして保存するロジックで、 「500 リクエストを処理できません。」 とエラーが出て画像を加工・保存できないことがあります。 この記事ではLaravelでintervention/imageを使って画像を加工・... - 
	
		
 AWS
	EC2(Amazon Linux2)でPHP8.0にバージョンアップしてLaravelをインストール
Amazon Linux2を使ったEC2のPHP7.2をPHP8.0にバージョンアップしてLaravelをインストールしました。その方法をご紹介します。 使用するコマンド この記事内で使用するコマンドを軽い説明付きでまとめました。お急ぎの方は以下のコマンドを参考にしてくださ... - 
	
		
 React
	Controlling Material UI v4 Form with React Hook Form v7
In this article, I will show you how to control a Material UI v4 form with React Hook Form v7. Material UI's TextField, Radio, and Select work just fine, but Checkbox requires some tricks and ingenuity.Here is a sample code for your refe... - 
	
		
 React
	Controlling Material UI v4’s Checkbox with React Hook Form v7
In Controlling Material UI's Checkbox with React Hook Form, I introduced how to control Material UI's Checkbox with React Hook Form v6. After that, React Hook Form v7 was released.The way to control Material-UI has changed a little in Re... - 
	
		
 Next.js
	How to use Next.js and Material-UI’s Link together
Next.js links and Material-UI links cannot normally be used together.However, with a little ingenuity, they can be used together. The following are the requirements for the Link component that we will create using Next.js and Material-UI... - 
	
		
 Next.js
	Use material-table in Next.js
Next.js and material-table are very easy to use and I use them a lot.However, they don't work well together, and material-table doesn't work straightforwardly with Next.js. There is a sticking point for using material-table in Next.js, a... - 
	
		
 React
	React Hook Form v7でMaterial UI v4のフォームを制御する
今回はReact Hook Form v7でMaterial UI v4のフォームを制御する方法をご紹介します。 Material UIのTextFieldやRadio、Selectは素直に動いてくれますが、Checkboxはちょっとしたコツ、工夫が必要です。サンプルコードをご紹介しますので是非参考にしてく...