Laravel Artisan

A command line interface

Laravel Artisan is a command line application that allows for running commands that help with the management of a Laravel application.

See the Laravel documentation for further details.

Most of the in-built commands currently have little relevance for use in a Zen Cart application, although that may change over time.

You can run the artisan command by changing into the laravel directory and running the ./artisan command

This will list all of the commands available.

For Zen Cart, we have added the following command(s).


zencart:convertdefines command

The zencart:convertdefines command is used to convert legacy language files into the new php array format.

The command accepts the following options


At least one of --file, --dir, --config must be set.


This option accepts the path to a single file.

e.g admin/includes/languages/english/index.php

and will convert that file to



This option accepts the path to a directory.

It will attempt to convert all files within the directory renaming files with a lang. prefix.


This option accepts the path to a file containing an array definition used to decide which files to convert.

The config file is an array return file, so should look like

return [];

The array can have 2 root elements, files and directories

files is a list of files to convert, and similarly directories is a list of directories to convert.


return [
    'files' => ['file1.php', 'file2.php],
    'directories' => ['dir1', 'dir2']

Last modified August 9, 2020 by Ian Wilson (3d65d66).