Welcome Guest, Not a member yet? Register   Sign In
Craftsman - Interactive CLI
#6

Craftsman v4+ comes with a built in REPL command that makes it easy to explore your application in an interactive console. You can start the interactive console using:

Code:
php craftsman console

This will bootstrap your application and start an interactive console. At this point you can interact with your application code and execute queries using your application’s models:

Code:
php craftsman console

Craftsman v4.2.1 Console
---------------------------------------------------------------
Codeigniter : $CI
Path: ~/codeigniter/application
---------------------------------------------------------------
Psy Shell v0.7.2 (PHP 7.0.12 — cli) by Justin Hileman
>>> $CI->load->model('foo_model');
=> CI_Loader {#153}
>>> $Foo = $CI->foo_model;
=> Foo_model {#313}
>>> $Foo->find_all();

To quit you can use CTRL-C or by typing exit.
Reply


Messages In This Thread
Craftsman - Interactive CLI - by dsv - 08-18-2015, 03:34 AM
RE: Craftsman CLI - by dsv - 04-07-2016, 09:16 AM
RE: Craftsman CLI - by dsv - 07-09-2016, 11:00 AM
RE: Craftsman CLI - by dsv - 12-08-2016, 04:52 PM
RE: Craftsman - Interactive CLI - by dsv - 01-09-2017, 10:51 AM
RE: Craftsman - Interactive CLI - by abmcr - 02-05-2017, 10:08 AM
RE: Craftsman - Interactive CLI - by dsv - 02-20-2017, 02:08 PM
RE: Craftsman - Interactive CLI - by cvetan - 04-03-2018, 03:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB