1. POSTBonus in/out
2. POSTPresale in/out
3. Переработана форма гостя
This commit is contained in:
miroman-afk
2022-12-14 12:42:39 +03:00
parent 4d3ad7727d
commit d24bba305f
49 changed files with 2525 additions and 772 deletions

View File

@@ -4,12 +4,25 @@ namespace App\Component\Models;
use Illuminate\Database\Eloquent\Model;
class Units extends Model {
protected $table = 'units';
/**
* The attributes that aren't mass assignable.
*
* @var array
*/
protected $guarded = [];
class Units extends Model
{
protected $table = 'units';
/**
* The attributes that aren't mass assignable.
*
* @var array
*/
protected $guarded = [];
public static function getName($data)
{
$unit_in_list = UnitsList::where('id', $data)->first();
$unit_name = Units::where('id', $unit_in_list['unit_id'])->first();
if ($unit_name) {
$unit_name = $unit_name['name'];
} else {
$unit_name = 'шт';
}
return $unit_name;
}
}