Download the PHP package ez-it-solutions/app-serve without Composer
On this page you can find all versions of the php package ez-it-solutions/app-serve. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ez-it-solutions/app-serve
More information about ez-it-solutions/app-serve
Files in ez-it-solutions/app-serve
Package app-serve
Short Description A Laravel command for serving your application on the first available port
License MIT
Informations about the package app-serve
Laravel App Serve Command

A smart Laravel Artisan command for serving your application on the first available port with automatic browser opening.
📋 Overview
The app:serve command provides an intelligent solution for serving your Laravel application. It automatically finds an available port within a specified range and launches your application server. It can also automatically open your default web browser to the application URL.
✨ Features
- Port Auto-Detection: Automatically finds the first available port in a specified range
- Browser Auto-Launch: Opens your default browser to the application URL
- Customizable Host: Specify a custom host address to serve your application on
- Configurable Port Range: Set your preferred starting port and maximum attempts
- Cross-Platform Support: Works on Windows, macOS, and Linux
🚀 Installation
Option 1: Install via Composer (Recommended)
That's it! The package will automatically register the command with Laravel.
Compatibility
This package is compatible with Laravel 6.x, 7.x, 8.x, 9.x, and 10.x.
Option 2: Manual Installation
- Download the
AppServeCommand.phpfile from our GitHub repository - Place it in your Laravel project at
app/Console/Commands/AppServeCommand.php - Laravel's auto-discovery should automatically register the command
📦 Creating Your Own Package
If you want to create your own version of this package, follow these steps:
1. Set Up Package Structure
Create the following directory structure:
2. Create composer.json
3. Create Service Provider
Create a file at src/AppServeServiceProvider.php:
4. Update Namespace in Command
Update the namespace in your AppServeCommand.php file to match your package:
5. Publish to GitHub
6. Register with Packagist
- Visit Packagist
- Submit your GitHub repository URL:
https://github.com/ez-it-solutions/app-serve - Once approved, your package will be available via Composer
7. Set Up GitHub Webhooks for Packagist
To automatically update your package on Packagist when you push to GitHub:
- Go to your GitHub repository settings
- Click on "Webhooks" > "Add webhook"
- Set Payload URL to:
https://packagist.org/api/github?username=your-packagist-username - Set Content type to:
application/json - Select "Just the push event"
- Click "Add webhook"
8. Add GitHub Actions for Testing (Optional)
Create a file at .github/workflows/tests.yml:
📝 Usage
Basic Usage
This will start the application server on the first available port starting from 8001.
Custom Host
This will serve the application on the specified host address.
Custom Port Range
This will try ports 3000 through 3004 until it finds an available one.
Without Browser Auto-Launch
This will start the server without automatically opening the browser.
🔧 Customization
Modifying Port Range
You can easily customize the default port range by modifying the $signature property in the command:
Enhancing Browser Opening Logic
You can customize the browser opening logic by modifying the openBrowser() method:
Changing the Command Name
If you want to change the command name, modify the $signature property:
📊 Output Example
The command will automatically open your default web browser to http://127.0.0.1:8001 (or whichever port was available).
💡 Upcoming Features
We're planning to add the following features in future releases:
HTTPS Support
Enable HTTPS with self-signed certificates for local development:
Environment-Specific Configuration
Specify which environment file to load:
Custom Document Root
Specify a custom document root directory:
Specific Browser Selection
Open a specific browser instead of the default one:
QR Code Display
Generate and display a QR code in the terminal for easy mobile testing:
Multiple Host Binding
Bind to multiple interfaces simultaneously:
Auto-Reload on File Changes
Watch for file changes and reload the browser automatically:
Performance Metrics
Display basic performance metrics for requests:
Request Logging
Enhanced request logging with filtering options:
API Testing Mode
Optimize output for API development:
Custom Server Headers
Add custom headers to all responses:
🤝 Contributing
Contributions are welcome! Feel free to submit a pull request or open an issue.
📄 License
This project is open-sourced software licensed under the MIT license.
👨💻 Author
Ez IT Solutions
https://github.com/ez-it-solutions
Made with ❤️ by Ez IT Solutions © 2025