#240

Product support

Visit this product's website for support.

Categories

  • Developer Tools
  • Utility

Web artisan plugin allows you to run artisan commands by public URL. You can call this URL by http, curl or wget.

Example: http://www.domain.com/artisan/v1/cache/clear/secret-hash

This could be useful:

  • when you don't have SSH access to your server and wants to run some commands
  • when you don't have access to /etc/crontab and want to run scheduled tasks from outside
  • when you want to run scheduled tasks by online CRON tools like webcron.org etc.
  • when you want to run commands by services like IFTTT, Zapier, etc.
  • for deployment and automated tasks

Available commands:

  • auth:clear-resets - domain.com/artisan/v1/auth/clear-reserts/<abcde>
  • cache:clear - domain.com/artisan/v1/cache/clear/<abcde>
  • october:update - domain.com/artisan/v1/october/update/<abcde>
  • plugin:refresh - domain.com/artisan/v1/plugin/refresh/acme/site/<abcde>
  • queue:flush - domain.com/artisan/v1/queue/flush/<abcde>
  • queue:forget - domain.com/artisan/v1/queue/forget/<abcde>
  • queue:restart - domain.com/artisan/v1/queue/restart/<abcde>
  • queue:retry - domain.com/artisan/v1/queue/retry/<abcde>
  • queue:work - domain.com/artisan/v1/queue/work/<abcde>
  • route:clear - domain.com/artisan/v1/route/clear/<abcde>
  • schedule:run - domain.com/artisan/v1/schedule/run/<abcde>
  • view:clear - domain.com/artisan/v1/view/clear/<abcde>

Before call any command you have to set secret hash at Backend > Settings > System > Web Artisan. Run without secret hash is not possible due to security reasons.

For generating secret hash use some random generator.

It is highly recommend to use SSL (https://) when invoking commands with Web Artisan. The secret hash can be stolen if SSL is not used.

Usage

General pattern is:

http://www.domain.com/artisan/v1/{group}/{command}/{secret}

Run command cache:clear by URL:

http://www.domain.com/artisan/v1/cache/clear/1234567890abcdef

Run command schedule:run by curl:

curl http://www.domain.com/artisan/v1/schedule/run/1234567890abcdef

Plugin command plugin:refresh by URL:

http://www.domain.com/artisan/v1/plugin/refresh/acme/site/1234567890abcdef

Available commands

auth:clear-resets, cache:clear, october:update, plugin:refresh, queue:flush, queue:forget, queue:restart, queue:retry, queue:work,route:clear, schedule:run, view:clear

Wants more? Override plugin's config file and add your commands as you wish.

Queued commands

You can queue commands so they are processed in the background by your queue workers. Before using this method, make sure you have configured your queue and are running a queue listener.

For running queue commands just put prefix queued before command

http://www.domain.com/artisan/v1/queued/{group}/{command}/{secret}

for example

http://www.domain.com/artisan/v1/queued/october/update/1234567890abcdef

Code check

Codacy

Contributing

Please send Pull Request to the master branch.

License

Web artisan plugin is open-sourced software licensed under the MIT license same as OctoberCMS platform.

Icon made by Freepik from www.flaticon.com.

  • Found the plugin useful on 17 Feb, 2017

    A Very nice and dangerous plugin. Be careful and only use if you know what you are doing. Delete URL from address bar or close page after executing, as chrome most of the time resend page automatically if page is kept inactive. these can lead do very serious problems. A basic can Auth can solve this issue by some extent as it will as password every time a url is executed.

  • Found the plugin useful on 24 Jan, 2017

    Some hostings does not support console, and this plugin solves the problem. Many thanks!

  • Found the plugin useful on 18 Jan, 2017

    I love this plugin! Life savior!

1.0.3

Show available commands at backend.

Jul 28, 2017

1.0.2

Add plugin:refresh command.

Dec 22, 2016

1.0.1

First version of Web Artisan

Dec 16, 2016