Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
christophrumpel committed Apr 3, 2024
1 parent a9cf341 commit 91dd08e
Show file tree
Hide file tree
Showing 56 changed files with 22,272 additions and 3,406 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Livewire;
namespace App\Livewire;

use App\Facades\YouTube;
use App\Jobs\ImportYoutubeChannelStreamsJob;
Expand All @@ -14,14 +14,9 @@ class ImportYouTubeChannel extends Component
public string $youTubeChannelId = '';
public string $languageCode = 'en';

public static function getName(): string
{
return 'import-youtube-channel';
}

public function render(): View
{
return view('livewire.import-youtube-channel');
return view('livewire.import-you-tube-channel');
}

public function importChannel(): void
Expand All @@ -37,7 +32,7 @@ public function importChannel(): void

dispatch(new ImportYoutubeChannelStreamsJob($this->youTubeChannelId, $this->languageCode));

session()->flash('channel-message', 'Channel "'.$this->youTubeChannelId.'" was added successfully.');
session()->flash('channel-message', 'Channel "' . $this->youTubeChannelId . '" was added successfully.');

$this->reset(['youTubeChannelId', 'languageCode']);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Livewire;
namespace App\Livewire;

use App\Actions\ImportVideoAction;
use App\Services\YouTube\YouTubeException;
Expand All @@ -27,7 +27,7 @@ public function importStream(): void
return;
}

session()->flash('stream-message', 'Stream "'.$this->youTubeId.'" was added successfully.');
session()->flash('stream-message', 'Stream "' . $this->youTubeId . '" was added successfully.');

$this->reset(['youTubeId']);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Livewire;
namespace App\Livewire;

use App\Actions\SortStreamsByDateAction;
use App\Models\Stream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Livewire;
namespace App\Livewire;

use App\Models\Channel;
use App\Models\Stream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Livewire;
namespace App\Livewire;

use App\Actions\Submission\SubmitStreamAction;
use App\Rules\YouTubeRule;
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public function duration(): Attribute

$startTime = $this->actual_start_time ?? $this->scheduled_start_time;

return $startTime->diffInHours($this->actual_end_time) . 'h ' . $startTime->diff($this->actual_end_time)->format('%i') . 'm';
return $startTime->diffInHours((int)$this->actual_end_time) . 'h ' . $startTime->diff($this->actual_end_time)->format('%i') . 'm';
});
}

Expand Down
8 changes: 1 addition & 7 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,11 @@
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Fortify\TwoFactorAuthenticatable;
use Laravel\Jetstream\HasProfilePhoto;
use Laravel\Sanctum\HasApiTokens;

class User extends Authenticatable
{
use HasApiTokens;
use HasFactory;
use HasProfilePhoto;
use Notifiable;
use TwoFactorAuthenticatable;


protected $fillable = [
Expand All @@ -33,7 +27,7 @@ class User extends Authenticatable
'two_factor_recovery_codes',
'two_factor_secret',
];

protected $appends = [
'profile_photo_url',
];
Expand Down
43 changes: 0 additions & 43 deletions app/Providers/FortifyServiceProvider.php

This file was deleted.

43 changes: 0 additions & 43 deletions app/Providers/JetstreamServiceProvider.php

This file was deleted.

13 changes: 5 additions & 8 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,19 @@
return Application::configure(basePath: dirname(__DIR__))
->withProviders()
->withRouting(
web: __DIR__.'/../routes/web.php',
// api: __DIR__.'/../routes/api.php',
commands: __DIR__.'/../routes/console.php',
web: __DIR__ . '/../routes/web.php',
api: __DIR__ . '/../routes/api.php',
commands: __DIR__ . '/../routes/console.php',
// channels: __DIR__.'/../routes/channels.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
$middleware->redirectGuestsTo(fn () => route('login'));
$middleware->redirectGuestsTo(fn() => route('login'));
$middleware->redirectUsersTo(AppServiceProvider::HOME);

$middleware->web(\Laravel\Jetstream\Http\Middleware\AuthenticateSession::class);

$middleware->throttleApi();
})
->withExceptions(function (Exceptions $exceptions) {
$exceptions->reportable(function(Throwable $e) {
$exceptions->reportable(function (Throwable $e) {
//
});
})->create();
14 changes: 4 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@
"php": "^8.2",
"abraham/twitteroauth": "^5.0",
"calebporzio/sushi": "^2.4",
"doctrine/dbal": "^3.5",
"guzzlehttp/guzzle": "^7.4",
"laravel/framework": "^11.0",
"laravel/jetstream": "^5.0",
"laravel/sanctum": "^4.0",
"laravel/tinker": "^2.9",
"league/flysystem-ftp": "^3.0",
"livewire/livewire": "^3.3",
Expand All @@ -29,22 +26,19 @@
"vinkla/hashids": "^12.0"
},
"require-dev": {
"brianium/paratest": "^7.0",
"christophrumpel/missing-livewire-assertions": "^2.5",
"fakerphp/faker": "^1.23",
"friendsofphp/php-cs-fixer": "^3.6",
"laravel/sail": "^1.26",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^6.1",
"nunomaduro/collision": "^8.0",
"nunomaduro/larastan": "^2.8",
"nunomaduro/patrol": "^1.1",
"pestphp/pest": "^2.23",
"pestphp/pest-plugin-laravel": "^2.2",
"pestphp/pest-plugin-parallel": "^1.0",
"pestphp/pest": "^2.34",
"phpunit/phpunit": "^10.0",
"roave/security-advisories": "dev-latest",
"spatie/laravel-ray": "^1.35",
"spatie/test-time": "^1.3",
"phpunit/phpunit": "^9.5.19"
"spatie/test-time": "^1.3"
},
"config": {
"optimize-autoloader": true,
Expand Down
Loading

0 comments on commit 91dd08e

Please sign in to comment.