laravelを学習していた際のことなのですが、ルーティングで使用される「whereメソッド」について、お聞きしたい点があります。
php
1<?php 2 3/* 4|-------------------------------------------------------------------------- 5| Web Routes 6|-------------------------------------------------------------------------- 7| 8| Here is where you can register web routes for your application. These 9| routes are loaded by the RouteServiceProvider within a group which 10| contains the "web" middleware group. Now create something great! 11| 12*/ 13 14Route::get('/', 'PostsController@index'); 15// Route::get('/posts/{id}', 'PostsController@show'); 16Route::get('/posts/{post}', 'PostsController@show')->where('post', '[0-9]+'); 17Route::get('/posts/create', 'PostsController@create');
上記のwhereメソッドなのですが、laravelの公式マニュアルで調べていたのですが、Illuminate\Support\Collectionクラスのwhereメソッドしか見当たりませんでした。
Illuminate\Support\Collectionクラスのwhereメソッドであるとするならば、ファイルに「use Illuminate\Support\Collection」として、使用しなければならないと思った為、Collectionクラスのメソッドではないのではないかと思いました。
whereメソッドにつきまして、ご存じの方いましたら教えてください。
よろしくお願いします
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/06/08 10:56
2019/06/08 11:01
2019/06/08 11:03
2019/06/08 11:06
2019/06/08 11:10
2019/06/08 11:21 編集
2019/06/08 11:23
2019/06/08 20:43
2019/06/08 20:57
2019/06/08 22:10
2019/06/08 22:57 編集