1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00
invoiceninja/app/Http/Controllers/ActivityController.php
2019-09-27 14:31:13 +10:00

47 lines
1.0 KiB
PHP

<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Http\Controllers;
use App\Models\Activity;
use App\Transformers\ActivityTransformer;
use Illuminate\Http\Request;
class ActivityController extends BaseController
{
protected $entity_type = Activity::class;
protected $entity_transformer = ActivityTransformer::class;
public function __construct()
{
parent::__construct();
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$activities = Activity::whereCompanyId(auth()->user()->company()->id)
->orderBy('created_at', 'DESC')
->take(50);
return $this->listResponse($activities);
}
}