Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
96f15d3
WIP
dvlpp Feb 6, 2024
25ef283
WIP
dvlpp Feb 6, 2024
ae6fcbd
WIP
dvlpp Feb 6, 2024
d041b04
Work on Media and Seeder
dvlpp Feb 7, 2024
4342c5b
Handle is_creatable / is_deletable
dvlpp Feb 19, 2024
7dd523f
Fix client
dvlpp Feb 19, 2024
baa0390
Handle CDN thumbnails
dvlpp Feb 23, 2024
2585a27
Handle CDN thumbnails
dvlpp Feb 23, 2024
4dba2bb
Handle post <-> media relation in production
dvlpp Feb 23, 2024
1ca4101
Handle post <-> media relation in production
dvlpp Feb 23, 2024
f8bc349
wip
Feb 26, 2024
0dbcc88
Merge remote-tracking branch 'origin/jocko-v3' into jocko-v3
Feb 26, 2024
1f00074
Merge branch 'main' into jocko-v3
Feb 26, 2024
6b47143
Handle collection key
Feb 26, 2024
f7f02fb
Add media fixtures
dvlpp Feb 27, 2024
ac60726
Handle fit thumbnails
dvlpp Feb 27, 2024
f67c133
Fix client version
dvlpp Feb 27, 2024
5e1d179
remove issue template
Feb 27, 2024
e6e92ac
Merge remote-tracking branch 'origin/jocko-v3' into jocko-v3
Feb 27, 2024
a3af5ca
Fix CDN fit thumb
dvlpp Feb 27, 2024
4446ab9
Merge remote-tracking branch 'origin/jocko-v3' into jocko-v3
dvlpp Feb 27, 2024
a65b6d7
Fix CDN fit thumb
dvlpp Feb 28, 2024
3ada413
Handle pagination
dvlpp Mar 1, 2024
f4d2394
Merge branch 'main' into jocko-v3
Mar 8, 2024
bf147b5
update composer.json
Mar 8, 2024
456b501
Merge branch 'main' into jocko-v3
Mar 8, 2024
1c05693
Rename to ozu + update to L11
May 6, 2024
478309d
more rename
May 6, 2024
c9ec2d3
Merge branch 'refs/heads/main' into ozu
May 6, 2024
6a30013
Merge pull request #1 from code16/ozu
May 6, 2024
87a9c5c
fix dir name
May 6, 2024
3b2a8d2
Merge branch 'refs/heads/ozu'
May 6, 2024
fe93f99
handle slug
May 6, 2024
224f9d9
fix configure command
May 6, 2024
841ab15
Handle cdn_url
dvlpp May 13, 2024
e884235
fix config
May 13, 2024
7b10444
Real models
dvlpp May 13, 2024
fcc5301
wip
dvlpp May 13, 2024
6e29235
Better defaults
dvlpp May 15, 2024
23dec91
wip
dvlpp May 16, 2024
3adbc70
wip
dvlpp May 16, 2024
eb8b876
Handle relative assets
dvlpp May 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Changelog

All notable changes to `Jocko Client` will be documented in this file.
All notable changes to `Ozu Client` will be documented in this file.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Jocko Client
# ozu Client

[![Latest Version on Packagist](https://img.shields.io/packagist/v/code16/jocko-client.svg?style=flat-square)](https://packagist.org/packages/code16/jocko-client)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/code16/jocko-client/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/code16/jocko-client/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/code16/jocko-client/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/code16/jocko-client/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/code16/jocko-client.svg?style=flat-square)](https://packagist.org/packages/code16/jocko-client)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/code16/ozu-client.svg?style=flat-square)](https://packagist.org/packages/code16/ozu-client)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/code16/ozu-client/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/code16/ozu-client/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/code16/ozu-client/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/code16/ozu-client/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/code16/ozu-client.svg?style=flat-square)](https://packagist.org/packages/code16/ozu-client)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

## Support us

[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/Jocko Client.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/Jocko Client)
[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/ozu Client.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/ozu Client)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

Expand All @@ -20,13 +20,13 @@ We highly appreciate you sending us a postcard from your hometown, mentioning wh
You can install the package via composer:

```bash
composer require code16/jocko-client
composer require code16/ozu-client
```

You can publish the config file with:

```bash
php artisan vendor:publish --tag="jocko-client-config"
php artisan vendor:publish --tag="ozu-client-config"
```

This is the contents of the published config file:
Expand Down
32 changes: 16 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "code16/jocko-client",
"description": "Client to access to Jocko API (https://github.com/code16/jocko)",
"name": "code16/ozu-client",
"description": "Client to access to Ozu API (https://github.com/code16/jocko)",
"keywords": [
"code16",
"laravel",
"jocko-client"
"ozu-client"
],
"homepage": "https://github.com/code16/jocko-client",
"homepage": "https://github.com/code16/ozu-client",
"license": "MIT",
"authors": [
{
Expand All @@ -16,31 +16,31 @@
}
],
"require": {
"php": "^8.1",
"calebporzio/sushi": "^2.5",
"php": "^8.2",
"code16/laravel-content-renderer": "^1.1.0",
"illuminate/contracts": "^10.0",
"spatie/laravel-export": "^1.1.1",
"spatie/laravel-package-tools": "^1.14.0"
"illuminate/contracts": "^11.0",
"intervention/image-laravel": "^1.0",
"spatie/laravel-package-tools": "^1.14.0",
"spatie/laravel-sluggable": "^3.6"
},
"require-dev": {
"laravel/pint": "^1.0",
"nunomaduro/collision": "^7.9",
"orchestra/testbench": "^8.0",
"nunomaduro/collision": "^8.0",
"orchestra/testbench": "^9.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-arch": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"spatie/laravel-ray": "^1.26"
},
"autoload": {
"psr-4": {
"Code16\\JockoClient\\": "src",
"Code16\\JockoClient\\Database\\Factories\\": "database/factories"
"Code16\\OzuClient\\": "src",
"Code16\\OzuClient\\Database\\Factories\\": "database/factories"
}
},
"autoload-dev": {
"psr-4": {
"Code16\\JockoClient\\Tests\\": "tests"
"Code16\\OzuClient\\Tests\\": "tests"
}
},
"scripts": {
Expand All @@ -60,10 +60,10 @@
"extra": {
"laravel": {
"providers": [
"Code16\\JockoClient\\JockoServiceProvider"
"Code16\\OzuClient\\OzuServiceProvider"
],
"aliases": {
"Jocko": "Code16\\JockoClient\\Facades\\Jocko"
"Ozu": "Code16\\OzuClient\\Facades\\Ozu"
}
}
},
Expand Down
10 changes: 0 additions & 10 deletions config/jocko-client.php

This file was deleted.

11 changes: 11 additions & 0 deletions config/ozu-client.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

// config for Code16/OzuClient
return [
'api_host' => env('OZU_API_HOST', 'https://ozu.code16.fr/'),
'api_key' => env('OZU_API_KEY'),
'api_version' => env('OZU_API_VERSION', 'v1'),
'cdn_url' => env('OZU_CDN_URL'),
'website_key' => env('OZU_WEBSITE_KEY'),
'collections' => [],
];
57 changes: 57 additions & 0 deletions database/factories/MediaFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

namespace Code16\OzuClient\Database\Factories;

use Code16\OzuClient\Eloquent\Media;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Storage;

class MediaFactory extends Factory
{
protected $model = Media::class;

public function definition()
{
return [
];
}

public function image(string $key): Factory
{
return $this
->state(function (array $attributes) use ($key) {
return [
'model_key' => $key,
'file_name' => sprintf('data/medias/%s.jpg', $this->faker->unique()->slug()),
'mime_type' => 'image/jpeg',
'disk' => 'local',
'size' => $this->faker->numberBetween(100, 100000),
];
});
}

public function withFile(?string $fileName = null)
{
return $this->state(function (array $attributes) use ($fileName) {
$fileName = $fileName ?: fake()->slug() . '.jpg';
$path = $this->getRandomFixtureImagePath();

Storage::disk('local')
->put("/data/medias/$fileName", file_get_contents($path));

return [
'file_name' => "data/medias/$fileName",
];
});
}

private function getRandomFixtureImagePath(): string
{
return base_path(
sprintf(
'vendor/code16/ozu-client/database/fixtures/images/%s.jpeg',
rand(1, 26)
)
);
}
}
19 changes: 0 additions & 19 deletions database/factories/ModelFactory.php

This file was deleted.

Binary file added database/fixtures/images/1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/10.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/11.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/12.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/13.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/14.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/15.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/16.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/17.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/18.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/19.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/20.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/21.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/22.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/23.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/24.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/25.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/26.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/3.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/4.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/5.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/6.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/7.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/8.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added database/fixtures/images/9.jpeg
19 changes: 0 additions & 19 deletions database/migrations/create_jocko_client_table.php.stub

This file was deleted.

24 changes: 24 additions & 0 deletions database/migrations/create_ozu_tables.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
public function up()
{
Schema::create('medias', function (Blueprint $table) {
$table->id();
$table->morphs('model');
$table->string('model_key')->nullable();
$table->string('file_name')->nullable();
$table->string('mime_type')->nullable();
$table->string('disk')->default('local')->nullable();
$table->unsignedInteger('size')->nullable();
$table->text('custom_properties')->nullable();
$table->unsignedInteger('order')->nullable();
$table->timestamps();
});
}
};
2 changes: 1 addition & 1 deletion resources/views/components/file.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@php
/**
* @see \Code16\JockoClient\View\Components\Image
* @see \Code16\OzuClient\View\Components\Image
*/
@endphp

Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/image.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@php
/**
* @see \Code16\JockoClient\View\Components\Image
* @see \Code16\OzuClient\View\Components\Image
*/
@endphp

Expand Down
16 changes: 8 additions & 8 deletions resources/views/components/preview-alert.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

@if(\Code16\JockoClient\Facades\Jocko::isPreview())
<div style="background-color: #ffb; color: #222; padding: .5rem; text-align: center; position: sticky; top: 0; z-index: 1000">
Prévisualisation du site. Pour appliquer les changements, rendez-vous dans la
<a style="text-decoration: underline" href="{{ rtrim(config('jocko-client.api_host'), '/') }}/sharp/s-show/deploy" target="_blank">
page publication
</a>.
</div>
@endif
{{--@if(\Code16\OzuClient\Facades\Ozu::isPreview())--}}
{{-- <div style="background-color: #ffb; color: #222; padding: .5rem; text-align: center; position: sticky; top: 0; z-index: 1000">--}}
{{-- Prévisualisation du site. Pour appliquer les changements, rendez-vous dans la--}}
{{-- <a style="text-decoration: underline" href="{{ rtrim(config('ozu-client.api_host'), '/') }}/sharp/s-show/deploy" target="_blank">--}}
{{-- page publication--}}
{{-- </a>.--}}
{{-- </div>--}}
{{--@endif--}}
2 changes: 1 addition & 1 deletion resources/views/preview-unauthorized.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<body>
<div style="display: flex; justify-content: center; align-items: center; height: 100vh">
<div style="padding: 2rem; background-color: #ffb; max-width: 400px">
Le lien de prévisualisation a expiré, veuillez l’ouvrir de nouveau depuis le menu de votre <a href="{{ rtrim(config('jocko-client.api_host'), '/') }}/sharp">tableau de bord</a>.
Le lien de prévisualisation a expiré, veuillez l’ouvrir de nouveau depuis le menu de votre <a href="{{ rtrim(config('ozu-client.api_host'), '/') }}/sharp">tableau de bord</a>.
</div>
</div>
</body>
Expand Down
14 changes: 0 additions & 14 deletions routes/web.php

This file was deleted.

Loading