Update Laravel to v12
This commit is contained in:
parent
f2025b801b
commit
1dfa17abca
83 changed files with 1324 additions and 2323 deletions
|
@ -111,7 +111,7 @@ class Note extends Model
|
|||
{
|
||||
if ($value !== null) {
|
||||
$normalized = normalizer_normalize($value, Normalizer::FORM_C);
|
||||
if ($normalized === '') { //we don’t want to save empty strings to the db
|
||||
if ($normalized === '') { // we don’t want to save empty strings to the db
|
||||
$normalized = null;
|
||||
}
|
||||
$this->attributes['note'] = $normalized;
|
||||
|
|
|
@ -59,7 +59,7 @@ class Place extends Model
|
|||
* sin(radians(places.latitude))))";
|
||||
|
||||
return $query
|
||||
->select() //pick the columns you want here.
|
||||
->select() // pick the columns you want here.
|
||||
->selectRaw("{$haversine} AS distance")
|
||||
->whereRaw("{$haversine} < ?", [$distance]);
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ class WebMention extends Model
|
|||
$host = parse_url($url, PHP_URL_HOST);
|
||||
|
||||
if ($host === 'pbs.twimg.com') {
|
||||
//make sure we use HTTPS, we know twitter supports it
|
||||
// make sure we use HTTPS, we know twitter supports it
|
||||
return str_replace('http://', 'https://', $url);
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ class WebMention extends Model
|
|||
$codebird = resolve(Codebird::class);
|
||||
$info = $codebird->users_show(['screen_name' => $username]);
|
||||
$profile_image = $info->profile_image_url_https;
|
||||
Cache::put($url, $profile_image, 10080); //1 week
|
||||
Cache::put($url, $profile_image, 10080); // 1 week
|
||||
|
||||
return $profile_image;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue