@@ -117,8 +117,8 @@ public function customCollection(): void
117117 {
118118 // Builder chain → custom collection via #[CollectedBy]
119119 $ reviews = Review::where ('published ' , true )->get ();
120- $ reviews ->topRated (); // custom method from ReviewCollection
121- $ reviews ->averageRating (); // custom method from ReviewCollection
120+ $ top = $ reviews ->topRated (); // custom method from ReviewCollection
121+ $ avg = $ reviews ->averageRating (); // custom method from ReviewCollection
122122 $ reviews ->first (); // inherited — returns Review|null
123123
124124 // Relationship properties also use the custom collection
@@ -133,7 +133,7 @@ public function eloquentClosure(): void
133133 {
134134 // Eloquent chunk — $orders inferred as Collection
135135 BlogAuthor::where ('active ' , true )->chunk (100 , function ($ orders ) {
136- $ orders ->count (); // resolves to Eloquent Collection
136+ $ total = $ orders ->count (); // resolves to Eloquent Collection
137137 });
138138
139139 // Explicit bare type hint inherits inferred generic args for foreach
@@ -162,8 +162,8 @@ public function eloquentClosure(): void
162162 *
163163 * Try:
164164 * 1. Ctrl+Click "app.name" to jump to config/app.php.
165- * 2. Ctrl+Click "APP_KEY " to jump to .env.
166- * 3. "Find All References" on "app.name" to see all usage sites.
165+ * 2. Ctrl+Click "app.key " to jump to config/app.php, then Ctrl+Click env('APP_KEY') to .env.
166+ * 3. "Find All References" on "app.name" to see all usage sites (including Blade views) .
167167 */
168168 public function laravelConfigEnv (): void
169169 {
@@ -174,9 +174,10 @@ public function laravelConfigEnv(): void
174174 Config::get ('app.name ' );
175175 Config::set ('app.env ' , 'production ' );
176176
177- // Env helper
178- env ('APP_KEY ' );
179- env ('DB_PASSWORD ' , 'secret ' );
177+ // Config keys that use env() — Ctrl+Click jumps to the config file,
178+ // then Ctrl+Click the env() call there to jump to .env
179+ config ('app.key ' ); // uses env('APP_KEY')
180+ config ('database.connections.mysql.password ' ); // uses env('DB_PASSWORD')
180181 }
181182
182183
@@ -193,10 +194,11 @@ public function laravelConfigEnv(): void
193194 */
194195 public function laravelNavigation (): void
195196 {
196- // Blade Views
197- view ('welcome ' );
198- View::make ('admin.users.index ' );
199- View::exists ('emails.order_shipped ' );
197+ // Blade Views — passing typed data for in-template completion
198+ $ posts = BlogPost::where ('published ' , true )->get ();
199+ view ('welcome ' , compact ('posts ' ));
200+ View::make ('admin.users.index ' , ['users ' => BlogAuthor::all ()]);
201+ View::exists ('emails.blog_published ' );
200202
201203 // Named Routes
202204 route ('home ' );
0 commit comments