Reader Stacks

GUIDES

Guides — Page 22

Reader Stacks covers PHP, Laravel, Angular, Flutter, DevOps, and security tutorials for working developers.

Removing "public" From the Laravel URL

Three real approaches — virtual host document root, a root .htaccess rewrite, and symlinking — with the tradeoffs that actually matter for picking one.

Generating Controllers, Models, and More With Artisan

The -a flag on make:model generates a controller, factory, seeder, migration, and policy in one single command — genuinely faster than running five separate generator commands for a brand-new resource.

How to Get the Last Insert ID in Laravel

Eloquent's create() already returns the new model with its ID populated — reaching for a separate lastInsertId() call is really only needed with the raw query builder, not Eloquent.

Understanding OnPush Change Detection in Angular

OnPush doesn't disable change detection — it narrows when it runs, to input reference changes, an event inside the component, or an async pipe emission, instead of every single tick.

break and continue in PHP: What They Actually Do

break exits the loop entirely; continue skips just the current iteration — a small distinction that's easy to mix up, plus the numeric-argument form for breaking out of nested loops.

The break and continue Statements in PHP

break exits the loop entirely; continue only skips to the next iteration — mixing the two up is a subtle logic bug, not a syntax error, since both are valid anywhere inside a loop.

How to Upload Multiple Files in Angular

The multiple attribute on a file input returns a FileList, not a single File — looping through it to build the FormData is the one real difference from a single-file upload.