added facades and made other ioc improvements.
This commit is contained in:
@@ -57,8 +57,6 @@ class Response_Factory {
|
||||
*/
|
||||
public function error($code, $data = array())
|
||||
{
|
||||
$data['homepage'] = IoC::resolve('laravel.config')->get('application.url');
|
||||
|
||||
return new Response($this->view->make('error/'.$code, $data), $code);
|
||||
}
|
||||
|
||||
@@ -154,6 +152,34 @@ class Response {
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new response instance.
|
||||
*
|
||||
* @param mixed $content
|
||||
* @param int $status
|
||||
* @return Response
|
||||
*/
|
||||
public static function make($content, $status = 200)
|
||||
{
|
||||
return IoC::container()->resolve('laravel.response')->make($content, $status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new error response instance.
|
||||
*
|
||||
* The response status code will be set using the specified code.
|
||||
*
|
||||
* Note: The specified error code should correspond to a view in your views/error directory.
|
||||
*
|
||||
* @param int $code
|
||||
* @param array $data
|
||||
* @return Response
|
||||
*/
|
||||
public static function error($code, $data = array())
|
||||
{
|
||||
return IoC::container()->resolve('laravel.response')->error($code, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the evaluated string contents of the response.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user