first commit

This commit is contained in:
denisdulici
2017-09-14 22:21:00 +03:00
commit 515bdaf5cd
598 changed files with 48030 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Filters\Customers;
use EloquentFilter\ModelFilter;
class Invoices extends ModelFilter
{
/**
* Related Models that have ModelFilters as well as the method on the ModelFilter
* As [relatedModel => [input_key1, input_key2]].
*
* @var array
*/
public $relations = [];
public function search($query)
{
return $this->whereLike('customer_name', $query);
}
public function status($status)
{
return $this->where('invoice_status_code', $status);
}
}

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Filters\Customers;
use EloquentFilter\ModelFilter;
class Payments extends ModelFilter
{
/**
* Related Models that have ModelFilters as well as the method on the ModelFilter
* As [relatedModel => [input_key1, input_key2]].
*
* @var array
*/
public $relations = [];
public function search($query)
{
return $this->whereLike('description', $query);
}
public function category($category)
{
return $this->where('category_id', $category);
}
public function paymentMethod($payment_method)
{
return $this->where('payment_method', $payment_method);
}
}

View File

@@ -0,0 +1,21 @@
<?php
namespace App\Filters\Customers;
use EloquentFilter\ModelFilter;
class Transactions extends ModelFilter
{
/**
* Related Models that have ModelFilters as well as the method on the ModelFilter
* As [relatedModel => [input_key1, input_key2]].
*
* @var array
*/
public $relations = [];
public function search($query)
{
return $this->whereLike('payment.name', $query)->whereLike('revenue.name', $query);
}
}