<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Laravel on POPWEB</title>
    <link>https://pop-web.github.io/categories/laravel/</link>
    <description>Recent content in Laravel on POPWEB</description>
    <generator>Hugo</generator>
    <language>ja</language>
    <lastBuildDate>Wed, 17 Mar 2021 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://pop-web.github.io/categories/laravel/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>【Laravel】中間テーブルのカラムに対して検索をかけたい時【whereHas】</title>
      <link>https://pop-web.github.io/programming/laravel/%E3%80%90laravel%E3%80%91%E4%B8%AD%E9%96%93%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%AE%E3%82%AB%E3%83%A9%E3%83%A0%E3%81%AB%E5%AF%BE%E3%81%97%E3%81%A6%E6%A4%9C%E7%B4%A2%E3%82%92%E3%81%8B%E3%81%91/</link>
      <pubDate>Wed, 17 Mar 2021 00:00:00 +0000</pubDate>
      <guid>https://pop-web.github.io/programming/laravel/%E3%80%90laravel%E3%80%91%E4%B8%AD%E9%96%93%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%AE%E3%82%AB%E3%83%A9%E3%83%A0%E3%81%AB%E5%AF%BE%E3%81%97%E3%81%A6%E6%A4%9C%E7%B4%A2%E3%82%92%E3%81%8B%E3%81%91/</guid>
      <description>&lt;p&gt;タイトル通りだが、まずはやりたいことの説明&lt;/p&gt;
&lt;h2 id=&#34;やりたいこと&#34;&gt;やりたいこと&lt;/h2&gt;
&lt;p&gt;リレーション先の中間テーブルのカラムの値に対して検索をかけたい。&lt;/p&gt;
&lt;h2 id=&#34;状況&#34;&gt;状況&lt;/h2&gt;
&lt;p&gt;menus、stores、menu_store（中間テーブル）とうテーブルを作成しており、&lt;/p&gt;</description>
    </item>
    <item>
      <title>LaravelでスクレイピングしてHerokuで定期実行する方法</title>
      <link>https://pop-web.github.io/programming/laravel/laravel%E3%81%A7%E3%82%B9%E3%82%AF%E3%83%AC%E3%82%A4%E3%83%94%E3%83%B3%E3%82%B0%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/</link>
      <pubDate>Fri, 22 Jan 2021 00:00:00 +0000</pubDate>
      <guid>https://pop-web.github.io/programming/laravel/laravel%E3%81%A7%E3%82%B9%E3%82%AF%E3%83%AC%E3%82%A4%E3%83%94%E3%83%B3%E3%82%B0%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/</guid>
      <description>&lt;p&gt;まず、LaravelでWebスクレイピングするため、ライブラリである「&lt;a href=&#34;https://github.com/FriendsOfPHP/Goutte&#34;&gt;FriendsOfPHP/Goutte&lt;/a&gt;」をインストールする。&lt;/p&gt;
&lt;p&gt;LaravelのバージョンはLaravel6.20。&lt;/p&gt;
&lt;h2 id=&#34;インストール&#34;&gt;インストール&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ composer require fabpot/goutte
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;以前のLaravelのバージョンではconfigファイルを設定する必要があるが、Laravel5.5以降はAutoDiscoveryがあるのでそのまま使える。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Laravelで1ページ内に複数のpaginateを分けてページング方法</title>
      <link>https://pop-web.github.io/programming/laravel/laravel-multiple-paginate/</link>
      <pubDate>Mon, 16 Mar 2020 00:00:00 +0000</pubDate>
      <guid>https://pop-web.github.io/programming/laravel/laravel-multiple-paginate/</guid>
      <description>&lt;p&gt;Laravelでpaginateを1つのページで複数設置すると、ページングするに際にすべてが同時にページングされてしまう。&lt;/p&gt;
&lt;p&gt;以下のようにすると、paginateの第3引数に設定したパラメータでそれぞれでリクエストがなされる。&lt;/p&gt;</description>
    </item>
    <item>
      <title>MacにComposerをインストール手順</title>
      <link>https://pop-web.github.io/programming/laravel/mac-composer/</link>
      <pubDate>Tue, 01 Oct 2019 00:00:00 +0000</pubDate>
      <guid>https://pop-web.github.io/programming/laravel/mac-composer/</guid>
      <description>&lt;p&gt;MacOSにComposerをインストールする手順を説明する。&lt;/p&gt;
&lt;p&gt;OpenSSLがないと、composerコマンドでライブラリダウンロードをするとエラーを起こすので手動でOpenSSLをインストールする。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Laravelのやっておいた方がいい初期設定</title>
      <link>https://pop-web.github.io/programming/laravel/laravel-initial-setting/</link>
      <pubDate>Fri, 28 Jun 2019 00:00:00 +0000</pubDate>
      <guid>https://pop-web.github.io/programming/laravel/laravel-initial-setting/</guid>
      <description>&lt;p&gt;Laravelをインストール後の、やってほい方がいい初期設定&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;タイムゾーンを日本時間に&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;エラーメッセージを日本語化&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;タイムゾーンを日本時間に&#34;&gt;&lt;strong&gt;タイムゾーンを日本時間に&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;「/config/app.php」を編集します。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Eloquentモデルでtimestampがないテーブルに保存・更新でエラーが出たときの対処</title>
      <link>https://pop-web.github.io/programming/laravel/eloquent-timestamp-error/</link>
      <pubDate>Wed, 19 Jun 2019 00:00:00 +0000</pubDate>
      <guid>https://pop-web.github.io/programming/laravel/eloquent-timestamp-error/</guid>
      <description>&lt;p&gt;日付情報が必要がなくタイムスタンプを作ってないテーブルへデータを更新・保存しようとすると、以下のようなエラーが出た。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Column not found: 1054 Unknown column ‘updated_at’ in ‘field list’
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;「updated_atカラムがない」と言っている。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Laravel リレーション先の値がなくて、Trying to get property of non-objectがでちゃった</title>
      <link>https://pop-web.github.io/programming/laravel/laravel-relation-erroe/</link>
      <pubDate>Mon, 10 Jun 2019 00:00:00 +0000</pubDate>
      <guid>https://pop-web.github.io/programming/laravel/laravel-relation-erroe/</guid>
      <description>&lt;p&gt;DBのメインテーブルからサブテーブルへリレーションさせて、メインテーブル側から値を取得しようとしたらエラー**「Trying to get property &amp;rsquo;time&amp;rsquo; of non-object」**が出た。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Laravelでルート以外のページが404（Not Found）になっちゃった時の対処</title>
      <link>https://pop-web.github.io/programming/laravel/laravel-404-not-found/</link>
      <pubDate>Fri, 07 Jun 2019 00:00:00 +0000</pubDate>
      <guid>https://pop-web.github.io/programming/laravel/laravel-404-not-found/</guid>
      <description>&lt;p&gt;Laravelで、トップページは表示できるけど他のページに飛ぶとなぜか404になっちゃう時に確認すべきことのメモ。&lt;/p&gt;
&lt;h2 id=&#34;httpdconfを確認する&#34;&gt;httpd.confを確認する&lt;/h2&gt;
&lt;p&gt;ドキュメントルートのディレクティブ内の「AllowOverride」が「None」になってたら、「All」に変更しておく。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Laravelでログイン機能の作り方手順【XAMPP】</title>
      <link>https://pop-web.github.io/programming/laravel/laravel-login/</link>
      <pubDate>Wed, 05 Jun 2019 00:00:00 +0000</pubDate>
      <guid>https://pop-web.github.io/programming/laravel/laravel-login/</guid>
      <description>&lt;p&gt;Laravelの認証機能をつかって、よくあるログイン機能を作っていきます。&lt;/p&gt;
&lt;h2 id=&#34;laravelインストール&#34;&gt;Laravelインストール&lt;/h2&gt;
&lt;p&gt;適当なプロジェクト名でLaravelをインストールします。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;composer create-project --prefer-dist laravel/laravel laravel_login
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;データベースの設定&#34;&gt;データベースの設定&lt;/h2&gt;
&lt;p&gt;データベースは、MySQLを使用します。&lt;/p&gt;</description>
    </item>
    <item>
      <title>共有するLaravelプロジェクトをgit cloneしてきた後の設定手順</title>
      <link>https://pop-web.github.io/programming/laravel/laravel-project-git-clone/</link>
      <pubDate>Tue, 28 May 2019 00:00:00 +0000</pubDate>
      <guid>https://pop-web.github.io/programming/laravel/laravel-project-git-clone/</guid>
      <description>&lt;p&gt;Laravelのチーム開発で、途中から参加する場合、リモートリポジトリからプロジェクトデータをgit cloneすることはよくあります。&lt;/p&gt;
&lt;p&gt;Laravelは、元から「.gitignore」ファイルが存在している為、gitリポジトリからデータを落としてきても不完全なわけです。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Laravelプロジェクトをインストールエラー（zip、unzip、gitがないため）</title>
      <link>https://pop-web.github.io/programming/laravel/laravel-install-error/</link>
      <pubDate>Mon, 27 May 2019 00:00:00 +0000</pubDate>
      <guid>https://pop-web.github.io/programming/laravel/laravel-install-error/</guid>
      <description>&lt;p&gt;vagrantのCentOS7環境で、Laravelを「cmposer create-project …」でインストールしようとしたら以下のエラーがでた。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# composer create-project --prefer-dist laravel/laravel /var/www/html/laravelapp
Installing laravel/laravel (v5.5.28)
    Failed to download laravel/laravel from dist: The zip extension and unzip command are both missing, skipping.
Your command-line PHP is using multiple ini files. Run `php --ini` to show them.
    Now trying to download from source
  - Installing laravel/laravel (v5.5.28): Cloning f4cba4f2b2

  [RuntimeException]
  Failed to clone https://github.com/laravel/laravel.git, git was not found, check that it is installed and in your P
  ATH env.

  sh: git: command not found

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [&amp;lt;package&amp;gt;] [&amp;lt;directory&amp;gt;] [&amp;lt;version&amp;gt;]
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;エラーを見ると、**zipとunzipがない。そして、gitもない。**と言っています。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Laravelのインストール方法、方法は2パターン</title>
      <link>https://pop-web.github.io/programming/laravel/laravel-install/</link>
      <pubDate>Fri, 24 May 2019 00:00:00 +0000</pubDate>
      <guid>https://pop-web.github.io/programming/laravel/laravel-install/</guid>
      <description>&lt;p&gt;事前にComposerをインストールしておいてください。&lt;/p&gt;
&lt;p&gt;Laravelをインストール方法は、2パターン。&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Laravelインストーラを使う方法&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Laravelインストーラを使わない方法&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;laravelインストーラを使う方法&#34;&gt;&lt;strong&gt;Laravelインストーラを使う方法&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;composerコマンドで、Laravelインストーラをダウンロードします。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Laravel &#43; XAMPP環境で「Hello World」を表示させるまで【Windows10】</title>
      <link>https://pop-web.github.io/programming/laravel/laravel-xampp-hello-world/</link>
      <pubDate>Wed, 22 May 2019 00:00:00 +0000</pubDate>
      <guid>https://pop-web.github.io/programming/laravel/laravel-xampp-hello-world/</guid>
      <description>&lt;p&gt;事前に&lt;strong&gt;XAMPP&lt;/strong&gt;と&lt;strong&gt;Laravel&lt;/strong&gt;と&lt;strong&gt;Composer&lt;/strong&gt;をインストールしておいてください。&lt;/p&gt;
&lt;p&gt;Laravelのインストールは&lt;a href=&#34;https://blog.popweb.dev/programming/laravel/laravel-install/&#34;&gt;Laravelのインストール方法、方法は2パターン【Windows10】&lt;/a&gt;を参考にしてみてください。&lt;/p&gt;
&lt;h2 id=&#34;プロジェクトフォルダの作成&#34;&gt;プロジェクトフォルダの作成&lt;/h2&gt;
&lt;p&gt;まずは、作業するためのフォルダを作成します。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
