Installation
Suggest Edit15.x requires PHP 8.3 or later and Laravel ^12.4 || ^13.0. These are development-version instructions.
For an existing application, read the upgrade guide before changing dependencies.
Before you can use the Laravel Orchid, you need to install it. This guide should help you perform a simple installation to start the project.
Create a New Laravel Project
Note. If you already have Laravel installation, you can skip this step.
Being a package for the framework, you must first install Laravel. This can be done using the Composer dependency
management tool by running the composer create-project command in your terminal:
composer create-project laravel/laravel orchid-project "12.*"
Or if you would prefer Laravel Installer:
composer global require laravel/installer
laravel new orchid-project
For more information on how to install Laravel, follow Official Laravel Installation Guide.
Don’t you have Composer? It’s easy to install by following the instructions on the download page.
It will create a new orchid-project directory, load the dependencies, and generate the leading directories and files
you need to get started. In other words, install your new framework project.
Do not forget:
- Give the application server user write access to
storageandbootstrap/cache; avoid world-writable permissions. - Edit the
.envfile
Note. If you just installed Laravel, you may need to generate a key with command
php artisan key:generate
Add Dependency
Go to the created project directory and run the command:
composer require orchid/platform:^15.0
Note. You also need to create a new database, update the
.envfile with credentials, and add your application’s URL to the variableAPP_URL.
The command above applies once 15.0 is released. For preview testing, install the current development branch explicitly instead of expecting an unreleased stable version.
composer require orchid/platform:dev-master --with-all-dependencies
Package Installation
The installer publishes resources, runs migrations, and writes the application’s User model.
Commit or back up existing application files first. Do not use a fresh installation as a production data migration.
The generated User extends Orchid\Platform\Models\User, inheriting permissions, casts, presenter, and filter attributes.
Keep your own methods and merge custom casts through parent::casts() when adapting an existing model.
Run the installation process by running the command:
php artisan orchid:install
Create an Admin User
To create a user with maximum permissions, you can run the following command with a username, email, and password:
php artisan orchid:admin
Start the Development Server
If you haven’t installed a server (Nginx, Apache, etc.) to run the project, you can use the built-in server:
php artisan serve
Open a browser and go to http://localhost:8000/admin. If everything works, you will see the control panel login page.
Later you can stop the server by pressing Ctrl + C in the terminal.
Note. The default URL path is
/admin. If you change theprefixoption inconfig/orchid.php, use that path instead (for example,http://localhost:8000/dashboardif prefix isdashboard).
Updating
While in the project directory, use Composer to update the package:
composer update orchid/platform --with-dependencies
Note. You can also update all your dependencies listed in the
composer.jsonfile by runningcomposer update.
After updating to a new release, you should update JavaScript and CSS assets using orchid:publish and clear any cached
views with view:clear. This ensures the newly updated version is using the latest assets.
php artisan orchid:publish
php artisan view:clear
Keeping Assets Updated
To make sure that your assets are promptly updated whenever a new version is downloaded, you can easily add a Composer
hook to your project’s composer.json file. This will automatically publish the latest assets for you:
{
"scripts": {
"post-update-cmd": ["@php artisan orchid:publish --ansi"]
}
}
Once you have added this hook, you can rest assured that your assets will always be up-to-date and functioning properly.
And if you ever want to verify that the assets are indeed current, you can simply use the artisan console command to
check:
php artisan about
This command will provide you with an importance of information, including some of the details about the package itself. It’s ensuring that your environment is correctly configured and running as expected.
Problems encountered during installation? It is possible that someone already had this problem https://github.com/orchidsoftware/platform/issues. If not, you can send a message or ask for help.
What to Do Next?
A newly installed package already has several screens that show various input fields, masks, states, as well as some interface layout. You can try them out or go directly to the step-by-step examples on the Quick Start page, or read the Configuration and Screens documentation.