added contact filter for transactions #33ywwz1

This commit is contained in:
Denis Duliçi
2022-07-22 12:50:15 +03:00
parent 7886355a50
commit 80dc7707ef
3 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,33 @@
<?php
namespace App\Http\Controllers\Common;
use App\Abstracts\Http\Controller;
use App\Models\Common\Contact;
class Contacts extends Controller
{
/**
* Instantiate a new controller instance.
*/
public function __construct()
{
// Add CRUD permission check
$this->middleware('permission:read-sales-customers|read-purchases-vendors')->only('index');
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return response()->json([
'success' => true,
'error' => false,
'data' => Contact::collect(),
'message' => '',
]);
}
}