Artisan task for running the PHP development server with Laravel
<?php
class Runserver_Task {
public function run($arguments)
{
$port = !isset($arguments[0]) ? 8000: $arguments[0];
echo 'Running PHP development server on port '.$port.'...';
passthru('php -S localhost:'.$port.' -t '.getcwd().'/public');
}
}
?>
Written by Matthew Daly
Related protips
1 Response
Please note this was for Laravel 3 - Laravel 4 already includes a task for this
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#