<?php
/**
* @author Exadra37 <exadra37atgmailpointcom>
* @since 2014/07/02
*/
// Illuminate\Support\Facades\Artisan;
// First parameter it is the command
// Second parameter is an array of commands arguments
Artisan::call("brainsocket:start", array('--port' => 8081));
// Inside of command class you don't need to use the facade
$this->call("brainsocket:start", array('--port' => 8081));
/**
* @author Exadra37 <exadra37atgmailpointcom>
* @since 2014/07/02
*/
// call a route internally
$request = Request::create('/api/db/find/device/all.json?count=true', 'GET');
// We need to replace the input so that the query string will be available in facade Input
$request::replace($request->input());
// get the normal response from your controller as if if you have call it from the browser
$response = Route::dispatch($request)->getContent();
// Do whatever you need now with your $response
@Exadra37 - Found a minor typo...