Craftable

Installation

Craftable comes with custom Artisan install commands which make the installation like a breeze. You can install either on existing project or use our command-line tool to easily create new Craftable project.


Requirements

Craftable requires:

  • PHP 7.4+
  • Supported databases:
    • MySQL 5.7+
    • PostgreSQL 9.5+
  • npm 5.3+
  • node 8.4+

Craftable uses Laravel so you should check out its requirements too. It is compatible with Laravel 8:

New Craftable project

If you want to start on fresh Laravel, you can use our brackets/craftable-installer that do all the tricks for you. Let's install it globally:

composer global require "brackets/craftable-installer"

Create an empty database of your choice (PostgreSQL or MySQL). We're using a PostgreSQL here:

createdb my_database

Now you can create a new Craftable project:

craftable new my_project

{primary} This will install Craftable using latest Laravel version (currently 8). If you prefer tu use latest LTS Laravel version (currently 6), use --lts flag:

craftable new --lts my_project

The command is going to ask for a database settings and then it will setup everything (install all dependencies, publish all important vendor configs, migrate the database, setup some configuration files, updates webpack configuration).

Command is going to generate and print the password for the default administrator account. Save this password to your clipboard, we are going to need it soon.

In order to install Craftable with some cases of Windows distributions, your server should meets the Exif PHP Extension requirement before Craftable installation process occurs. This extension is required by the Laravel-Medialibrary package and on most systems is installed by default. The issue and its fix is already discussed here.

{warning} On Windows platform you may experience problems with installing Craftable.

In that case, instead of running single:

craftable new my_project

run all the commands manually:

craftable new --no-install my_project
php artisan craftable:init-env
php artisan craftable:install
npm install
npm run dev

Add Craftable to existing project

Or alternatively, you can use your existing Laravel application. Start with requiring these two main packages:

composer require brackets/craftable
composer require --dev brackets/admin-generator

To install this package use:

php artisan craftable:install

This is going to install all dependencies, publish all important vendor configs, migrate, setup some configs, webpack config and run migrations.

{warning} Generator prints the password for the default administrator account, save it to clipboard. Alternatively, you can find the password in migrations.

Finally we need to compile all the assets using npm:

npm install && npm run dev

Login

Once installed, navigate your browser to /admin/login. You should be able to see a login screen.

Use these credentials to log in:

  • E-mail: administrator@brackets.sk
  • Password: use password from you clipboard

After authorization you should be able to see a default homepage and two menu items:

  • Manage access
  • Translations

Admin homepage