1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-23 18:01:35 +02:00
invoiceninja/app/controllers/HomeController.php

36 lines
704 B
PHP
Raw Normal View History

2013-11-26 13:45:07 +01:00
<?php
class HomeController extends BaseController {
protected $layout = 'master';
public function showWelcome()
{
2013-12-07 19:45:00 +01:00
return View::make('splash');
2013-11-26 13:45:07 +01:00
}
2014-01-02 14:21:15 +01:00
2014-01-08 21:09:47 +01:00
public function showComingSoon()
{
return View::make('coming_soon');
}
2014-01-02 14:21:15 +01:00
public function logError()
{
$count = Session::get('error_count', 0);
Session::put('error_count', ++$count);
if ($count > LOGGED_ERROR_LIMIT) return 'logged';
$data = [
'context' => 'JavaScript',
'user_id' => Auth::check() ? Auth::user()->id : 0,
'url' => Input::get('url'),
'user_agent' => $_SERVER['HTTP_USER_AGENT'],
'ip' => Request::getClientIp(),
'count' => $count
];
Log::error(Input::get('error'), $data);
return 'logged';
}
2013-11-26 13:45:07 +01:00
}