-wip
This commit is contained in:
parent
127ebe79ae
commit
54db2e8e2b
@ -1,17 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Http\Resources;
|
namespace App\Http\Resources;
|
||||||
|
|
||||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||||
|
|
||||||
class CategoryCollection extends ResourceCollection
|
class CategoryCollection extends ResourceCollection
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Transform the resource collection into an array.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
|
||||||
*/
|
|
||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
return CategoryResource::collection($this->collection);
|
return CategoryResource::collection($this->collection);
|
||||||
|
@ -1,21 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Http\Resources;
|
namespace App\Http\Resources;
|
||||||
|
|
||||||
use Illuminate\Http\Resources\Json\JsonResource;
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
|
|
||||||
class CategoryResource extends JsonResource
|
class CategoryResource extends JsonResource
|
||||||
{
|
{
|
||||||
|
|
||||||
public static $wrap = null;
|
public static $wrap = null;
|
||||||
|
|
||||||
/**
|
public function toArray($request): array
|
||||||
* Transform the resource into an array.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
|
||||||
*/
|
|
||||||
public function toArray($request)
|
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
|
@ -4,14 +4,13 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace App\Http\Resources;
|
namespace App\Http\Resources;
|
||||||
|
|
||||||
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||||
|
|
||||||
class FullCVCollection extends ResourceCollection
|
class FullCVCollection extends ResourceCollection
|
||||||
{
|
{
|
||||||
public function toArray($request): array
|
public function toArray($request): array|JsonResource
|
||||||
{
|
{
|
||||||
return [
|
return FullCVResource::collection($this->collection);
|
||||||
'data' => $this->collection,
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Http\Resources;
|
namespace App\Http\Resources;
|
||||||
|
|
||||||
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||||
|
|
||||||
class ProjectCollection extends ResourceCollection
|
class ProjectCollection extends ResourceCollection
|
||||||
{
|
{
|
||||||
/**
|
public function toArray($request): JsonResource
|
||||||
* Transform the resource collection into an array.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
|
||||||
*/
|
|
||||||
public function toArray($request)
|
|
||||||
{
|
{
|
||||||
return ProjectResource::collection($this->collection);
|
return ProjectResource::collection($this->collection);
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Http\Resources;
|
namespace App\Http\Resources;
|
||||||
|
|
||||||
use Illuminate\Http\Resources\Json\JsonResource;
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
|
|
||||||
class ProjectResource extends JsonResource
|
class ProjectResource extends JsonResource
|
||||||
{
|
{
|
||||||
|
|
||||||
public static $wrap = null;
|
public static $wrap = null;
|
||||||
|
|
||||||
/**
|
public function toArray($request): array
|
||||||
* Transform the resource into an array.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
|
||||||
*/
|
|
||||||
public function toArray($request)
|
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
@ -30,5 +25,4 @@ class ProjectResource extends JsonResource
|
|||||||
'description' => $this->description,
|
'description' => $this->description,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -68,12 +68,6 @@ function copySlug(slug) {
|
|||||||
<td class="hidden md:table-cell p-2">{{ cv.locations.join(' / ') }}</td>
|
<td class="hidden md:table-cell p-2">{{ cv.locations.join(' / ') }}</td>
|
||||||
<td class="p-2">{{ cv.phone.formattedNumber }}</td>
|
<td class="p-2">{{ cv.phone.formattedNumber }}</td>
|
||||||
<td class="flex items-center justify-center gap-2 p-3 z-50">
|
<td class="flex items-center justify-center gap-2 p-3 z-50">
|
||||||
<a
|
|
||||||
class="px-3 py-3 text-blue-600 hover:text-blue-800"
|
|
||||||
:href="`https://cv.kamilcraft.com/show/${cv.token}`"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
title="Przekieruj do CV"><FontAwesomeIcon :icon="['fas', 'arrow-up-right-from-square']" /></a>
|
|
||||||
<InertiaLink
|
<InertiaLink
|
||||||
as="button"
|
as="button"
|
||||||
class="px-3 py-3 text-lime-600 hover:text-lime-800 border-t-2 border-b-2 border-transparent hover:border-b-lime-600"
|
class="px-3 py-3 text-lime-600 hover:text-lime-800 border-t-2 border-b-2 border-transparent hover:border-b-lime-600"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user