public function list(CompanyDatatableSearch $request): JsonResponse 	{ 		$companies = Company::select([ 			'id', 			'name', 			'industry', 			'tax_number', 			'approved', 			'created_at', 		])->where('domain_id', auth()->user()->user->activeDomain?->getKey());  		return DataTables::eloquent($companies) 		->order(function ($query) use ($request) { 			$order_array = $request->get('order') ?? []; 			$columns_array = $request->columns;  			if (!empty($order_array)) { 				foreach (array_column($order_array, 'dir', 'column') as $column_index => $order_direction) { 					$query->orderBy($columns_array[$column_index]['name'], $order_direction); 				} 			} else { 				$query->orderBy('name'); 			} 		}) 		->filter(function ($query) use ($request) { 			$search_term = $request->search['value'] ?? null;  			if ($search_term) { 				$query->search($search_term); 			}  			$query->where('approved', !$request->boolean('approved')); 		}) 		->addColumn('approved', function (Company $row) { 			$state = $row->approved ? 'success' : 'danger'; 			$label = $row->approved ? __('global.yes') : __('global.no');  			return '<span class="label label-' . $state . ' label-inline">' . $label . '</span>'; 		}) 		->addColumn('edit', function (Company $row) { 			return '<a href="' . route('companies.edit', ['id' => $row->id]) . '" title="' . __('global.edit') . '" data-container="body" data-toggle="tooltip" data-placement="left" class="btn btn-icon btn-light btn-hover-primary btn-sm"> 				<i class="fa fa-edit text-primary"></i> 			</a>'; 		}) 		->addColumn('checkbox', function (Company $row) { 			return '<label class="checkbox checkbox-single checkbox-primary"> 				<input type="checkbox" name="values[]" value="' . $row->id . '" class="options-form"><span></span> 			</label>'; 		}) 		->rawColumns(['edit', 'approved', 'checkbox']) 		->toJson(); 	}