You're viewing an older version of this documentation. View the latest version (3.x)
Quick Start
Let's go!#
If you've already got your environment set up to build mobile apps using Xcode and/or Android Studio, then you can get building your first mobile app with NativePHP in minutes:
1. Update your composer.json#
Add the NativePHP Composer repository:
Copied!
"repositories": [ { "type": "composer", "url": "https://nativephp.composer.sh" }]
Running Composer 2.9+?
If you're running Composer 2.9 or above, you can just use a single command, instead of copy-pasting the above:
Copied!
composer repo add nativephp composer https://nativephp.composer.sh
2. Set your app's identifier#
You must set a NATIVEPHP_APP_ID in your .env file:
Copied!
NATIVEPHP_APP_ID=com.cocacola.cokezero
3. Install & run#
Copied!
# Install NativePHP for Mobile into a new Laravel appcomposer require nativephp/mobile # Ready your app to go nativephp artisan native:install # Run your app on a mobile devicephp artisan native:run
The native command
When you run native:install, NativePHP installs a native script helper that can be used as a convenient wrapper to
the native Artisan command namespace. Once this is installed you can do the following:
Copied!
# Instead of...php artisan native:run # Dophp native run # Or./native run
Need help?#
Plugin Dev Kit
Build native plugins with
Claude Code
Learn More
NativePHP Ultra
All NativePHP plugins, teams & priority support from
$35/mo
Learn More
The Vibes
The unofficial Laracon US
Day 3
Grab Your Spot
Only 100 tickets!
The Masterclass
Go from zero to
published app
in no time
in no time
Learn More
Early Bird Pricing