This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {message} from 'antd' | |
export const errorMessage = (error: any, printErrorMessage: boolean = true) => { | |
if (!error.response) { | |
return | |
} | |
let response = error.response | |
let data = response.data | |
let statusCode = response.status | |
const defaultMessage = 'Bir şeyler ters gitti. Lütfen daha sonra tekrar dene.' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Builder::macro('search', function ($attributes, $searchTerm, $compact = false): Builder { | |
$this->where(function (Builder $query) use ($compact, $attributes, $searchTerm): void { | |
if ($compact) { | |
$joinedAttributes = '`'.implode('`, " " ,`', $attributes).'`'; | |
$query->orWhereRaw('upper('.\DB::raw("concat({$joinedAttributes})").') LIKE ?', ["%{$searchTerm}%"]); | |
} else { | |
foreach ($attributes as $attribute) { | |
$query->when( | |
str_contains($attribute, '.'), | |
function (Builder $query) use ($attribute, $searchTerm): void { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Builder, By, until} from 'selenium-webdriver'; | |
import fs from 'fs'; | |
// Tarayıcıyı başlat (bu örnekte Chrome kullanılıyor) | |
/** @type {WebDriver} */ | |
let driver = await new Builder() | |
.forBrowser('chrome') | |
.setLoggingPrefs({performance: 'ALL'}) | |
.build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Create a simplified object suitable for straightforward | |
* conversion to JSON. This is relatively expensive | |
* due to the usage of reflection, but shouldn't be called | |
* a whole lot, and is the most straightforward way to filter. | |
*/ | |
public function toSimpleObject() | |
{ |
OlderNewer