Snippets

Using PHP's Built-In Web Server

Playing
Using PHP's Built-In Web Server
6 mins8 years ago

Did you know PHP has a built-in web server we can run from the command line? Let's take a look at how it works.

Alex Garrett-Smith
Hey, I'm the founder of Codecourse!

Comments

No comments, yet. Be the first to leave a comment.

Suggested courses

PHP

Custom Laravel Query Builders

Using Eloquent query scopes in your project? Consider swapping them out for custom query builders. Custom query builders are model-specific, class-based builders that provide better organisation, IDE autocompletion, and more. We'll start this course by defining some standard scopes, refactor them, and discuss the benefits of custom builders. This course is for you if: - You're using query scopes, but they're bloating your models - You're working in a team and need more organisation in your project - You haven't used query scopes and want a primer, plus an alternative

4 episodes
23 mins
PHP

Soketi Basics

Learn to broadcast events in realtime with Soketi, a simple, fast, and resilient open-source WebSockets server. In this course, we'll set up a Soketi server, configure Laravel for Soketi, and create events for public and private channels. Then, we'll listen for these events on the client and dump the payload from the server. If you need realtime events in your app, this course will get you up and running in no time.

5 episodes
26 mins
PHP

Liking Things in Laravel with Redis

Let’s skip the database and build the ability to like any model in Laravel, using Redis. Traditionally you’d reach for the database for this kind of thing, but as you load more models and start performing checks within relationships — things begin to slow down. With a key-value store like Redis, tracking users who have liked comments (or anything) keeps everything ridiculously fast.

6 episodes
21 mins