Skip to main content Skip to navigation

Guides: Installation

Create a new Laravel project (optional)

Follow Laravel's instructions for a fresh Laravel install.

laravel new hiker-app

Once that's done, cd into the project directory:

cd hiker-app

Install Hiker

Important {.alert.alert--info} In order to install Hiker, you'll need a (free) license. Request your beta key by sending us an email! This unique license will also provide access to all plugins & packages available in Hiker's marketplace (coming soon).

Run the following command to add Hiker's composer repository to the composer.json file:

composer config repositories.hiker composer https://repo.hiker.dev

As we're still in alpha at the moment, make sure the composer's minimum-stability is set to alpha:

composer config minimum-stability alpha

You can now run the require command to install Hiker:

composer require hiker-dev/hiker

Composer will automatically prompt for your user (account email) and password (license key). If you don't want to type them every time, we'd recommend storing your credentials.

composer config --global --auth http-basic.repo.hiker.dev [ACCOUNT E-MAIL] [LICENSE]

Beta release {.alert.alert--info} Early-access users are required to activate their license with a GitHub account. Use your GitHub account's e-mail address when authenticating your Hiker license with composer.

This command will store your account name and license key globally. If you need to store them locally, just remove the --global flag, but don't forget to add the generated auth.json file to your project's .gitignore!

Now that composer has installed hiker-dev/hiker and its dependencies, let's setup the project.

Setup Hiker

Now, let's run Hiker's installation command.

php artisan hiker:install

This will publish the components that compose the base layout of Hiker's interface. Refer to the Chrome documentation for more information.

It will then automatically run these two commands:

php artisan hiker:assets

This command copies Hiker's front-end assets to the public/vendor/hiker directory and needs to be ran whenerver you update Hiker.

php artisan hiker:config

This command copies Hiker's config files to the config directory.

Update your user model

Next, update the App\Models\User model so that it extends Hiker's base User class instead of Laravel's:

namespace App\Models;

use Hiker\Models\User as Authenticatable;

class User extends Authenticatable
{
    // ...
}

Please note that the base Hiker User model itself extends Laravel's, so you can expect it to work just like you're used to. Hiker simply adds a few relations and internal methods.

Migrate and seed

In order to log in, we'll need to have a user, so let's seed one.

<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        User::factory()->create([
            'name' => 'Test User',
            'email' => '[email protected]',
            'password' => bcrypt('test')
        ]);
    }
}
php artisan migrate --seed

You're all set! Visit Hiker's login page (/admin/login by default, see the .env file to change the admin prefix) and use the seeded credentials, you should now be able to access your brand new Hiker installation: it's your blank canvas to create something amazing.
Happy coding!