Remove deprecated global helper functions (issue #99)
Squashed commit of the following: commit 8ff29a8ab51ee5057ef786614ab95b005bf8918c Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Feb 1 18:42:05 2019 +0000 Replace deprecated global helpers with their facade equivalents
This commit is contained in:
parent
7a4ba43b4d
commit
fb44afd7ad
15 changed files with 104 additions and 90 deletions
|
@ -6,6 +6,7 @@ namespace App\Services;
|
|||
|
||||
use App\Models\Like;
|
||||
use App\Jobs\ProcessLike;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
class LikeService
|
||||
{
|
||||
|
@ -17,12 +18,12 @@ class LikeService
|
|||
*/
|
||||
public function createLike(array $request): Like
|
||||
{
|
||||
if (array_get($request, 'properties.like-of.0')) {
|
||||
if (Arr::get($request, 'properties.like-of.0')) {
|
||||
//micropub request
|
||||
$url = normalize_url(array_get($request, 'properties.like-of.0'));
|
||||
$url = normalize_url(Arr::get($request, 'properties.like-of.0'));
|
||||
}
|
||||
if (array_get($request, 'like-of')) {
|
||||
$url = normalize_url(array_get($request, 'like-of'));
|
||||
if (Arr::get($request, 'like-of')) {
|
||||
$url = normalize_url(Arr::get($request, 'like-of'));
|
||||
}
|
||||
|
||||
$like = Like::create(['url' => $url]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue