some progress
This commit is contained in:
@@ -81,7 +81,7 @@ class GameController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$games = $query->paginate(12)->withQueryString();
|
$games = $query->paginate(36)->withQueryString();
|
||||||
|
|
||||||
// Get data for filter dropdowns
|
// Get data for filter dropdowns
|
||||||
$platforms = \App\Models\Platform::orderBy('name')->get();
|
$platforms = \App\Models\Platform::orderBy('name')->get();
|
||||||
|
|||||||
@@ -6,12 +6,13 @@ use App\Models\Game;
|
|||||||
use App\Models\GameList;
|
use App\Models\GameList;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Gate;
|
||||||
|
|
||||||
class GameListController extends Controller
|
class GameListController extends Controller
|
||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->middleware('auth');
|
//$this->middleware('auth');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,7 +55,8 @@ class GameListController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function show(GameList $list)
|
public function show(GameList $list)
|
||||||
{
|
{
|
||||||
$this->authorize('view', $list);
|
//$this->authorize('view', $list);
|
||||||
|
Gate::authorize('view', $list);
|
||||||
|
|
||||||
$games = $list->games()->paginate(12);
|
$games = $list->games()->paginate(12);
|
||||||
return view('lists.show', compact('list', 'games'));
|
return view('lists.show', compact('list', 'games'));
|
||||||
@@ -106,7 +108,7 @@ class GameListController extends Controller
|
|||||||
|
|
||||||
public function addGame(Request $request, GameList $list)
|
public function addGame(Request $request, GameList $list)
|
||||||
{
|
{
|
||||||
$this->authorize('update', $list);
|
Gate::authorize('update', $list);
|
||||||
|
|
||||||
$request->validate([
|
$request->validate([
|
||||||
'game_id' => 'required|exists:games,id'
|
'game_id' => 'required|exists:games,id'
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class HomeController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
return view('index');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Listeners;
|
||||||
|
|
||||||
|
use App\Models\Wishlist;
|
||||||
|
use Illuminate\Auth\Events\Registered;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
|
||||||
|
class CreateDefaultUsersListListener
|
||||||
|
{
|
||||||
|
public const DEFAULT_LISTS = [
|
||||||
|
'played',
|
||||||
|
'playing',
|
||||||
|
'backlog',
|
||||||
|
'wishlist',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the event listener.
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*/
|
||||||
|
public function handle(Registered $event): void
|
||||||
|
{
|
||||||
|
foreach (self::DEFAULT_LISTS as $listName) {
|
||||||
|
Wishlist::create([
|
||||||
|
'user_id' => $event->user->id,
|
||||||
|
'name' => $listName,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -40,6 +40,8 @@ class GameList extends Model
|
|||||||
|
|
||||||
public function games(): BelongsToMany
|
public function games(): BelongsToMany
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(Game::class)->withTimestamps();
|
return $this->belongsToMany(Game::class)
|
||||||
|
->with(['platforms'])
|
||||||
|
->withTimestamps();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class Rating extends Model
|
|||||||
'user_id',
|
'user_id',
|
||||||
'game_id',
|
'game_id',
|
||||||
'rating',
|
'rating',
|
||||||
|
'platform',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ class Review extends Model
|
|||||||
'content',
|
'content',
|
||||||
'recommended',
|
'recommended',
|
||||||
'rating',
|
'rating',
|
||||||
|
'platform',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Wishlist extends Model
|
||||||
|
{
|
||||||
|
public const VISIBILITY_PUBLIC = 'public';
|
||||||
|
public const VISIBILITY_PRIVATE = 'private';
|
||||||
|
public const VISIBILITY_FRIENDS_ONLY = 'friends_only';
|
||||||
|
|
||||||
|
public const VISIBILITIES = [
|
||||||
|
self::VISIBILITY_PUBLIC,
|
||||||
|
self::VISIBILITY_PRIVATE,
|
||||||
|
self::VISIBILITY_FRIENDS_ONLY,
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'user_id',
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'visibility',
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -16,15 +16,17 @@ class GameListPolicy
|
|||||||
*/
|
*/
|
||||||
public function viewAny(User $user): bool
|
public function viewAny(User $user): bool
|
||||||
{
|
{
|
||||||
|
// check if list is public
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine whether the user can view the model.
|
* Determine whether the user can view the model.
|
||||||
*/
|
*/
|
||||||
public function view(User $user, GameList $list)
|
public function view(User $user, GameList $list): bool
|
||||||
{
|
{
|
||||||
return $user->id === $list->user_id;
|
//return $user->id === $list->user_id;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,10 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use App\Models\GameList;
|
||||||
|
use App\Policies\GameListPolicy;
|
||||||
use Illuminate\Pagination\Paginator;
|
use Illuminate\Pagination\Paginator;
|
||||||
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
@@ -21,5 +24,6 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
public function boot(): void
|
public function boot(): void
|
||||||
{
|
{
|
||||||
Paginator::useBootstrap();
|
Paginator::useBootstrap();
|
||||||
|
Gate::policy(GameList::class, GameListPolicy::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"marcreichel/igdb-laravel": "^5.3"
|
"marcreichel/igdb-laravel": "^5.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"barryvdh/laravel-debugbar": "^3.15",
|
||||||
"fakerphp/faker": "^1.23",
|
"fakerphp/faker": "^1.23",
|
||||||
"laravel/breeze": "^2.3",
|
"laravel/breeze": "^2.3",
|
||||||
"laravel/pail": "^1.2.2",
|
"laravel/pail": "^1.2.2",
|
||||||
|
|||||||
Generated
+156
-1
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "7b46d7d171bc99166a5acfa33ef476cb",
|
"content-hash": "0814da2c93b6041a9dc275ff1eda9043",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
@@ -5894,6 +5894,91 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
|
{
|
||||||
|
"name": "barryvdh/laravel-debugbar",
|
||||||
|
"version": "v3.15.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/barryvdh/laravel-debugbar.git",
|
||||||
|
"reference": "c0667ea91f7185f1e074402c5788195e96bf8106"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/c0667ea91f7185f1e074402c5788195e96bf8106",
|
||||||
|
"reference": "c0667ea91f7185f1e074402c5788195e96bf8106",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"illuminate/routing": "^9|^10|^11|^12",
|
||||||
|
"illuminate/session": "^9|^10|^11|^12",
|
||||||
|
"illuminate/support": "^9|^10|^11|^12",
|
||||||
|
"php": "^8.1",
|
||||||
|
"php-debugbar/php-debugbar": "~2.1.1",
|
||||||
|
"symfony/finder": "^6|^7"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "^1.3.3",
|
||||||
|
"orchestra/testbench-dusk": "^7|^8|^9|^10",
|
||||||
|
"phpunit/phpunit": "^9.5.10|^10|^11",
|
||||||
|
"squizlabs/php_codesniffer": "^3.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"aliases": {
|
||||||
|
"Debugbar": "Barryvdh\\Debugbar\\Facades\\Debugbar"
|
||||||
|
},
|
||||||
|
"providers": [
|
||||||
|
"Barryvdh\\Debugbar\\ServiceProvider"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.15-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/helpers.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Barryvdh\\Debugbar\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Barry vd. Heuvel",
|
||||||
|
"email": "barryvdh@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHP Debugbar integration for Laravel",
|
||||||
|
"keywords": [
|
||||||
|
"debug",
|
||||||
|
"debugbar",
|
||||||
|
"dev",
|
||||||
|
"laravel",
|
||||||
|
"profiler",
|
||||||
|
"webprofiler"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/barryvdh/laravel-debugbar/issues",
|
||||||
|
"source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.15.4"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://fruitcake.nl",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/barryvdh",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2025-04-16T06:32:06+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "fakerphp/faker",
|
"name": "fakerphp/faker",
|
||||||
"version": "v1.24.1",
|
"version": "v1.24.1",
|
||||||
@@ -6707,6 +6792,76 @@
|
|||||||
},
|
},
|
||||||
"time": "2022-02-21T01:04:05+00:00"
|
"time": "2022-02-21T01:04:05+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "php-debugbar/php-debugbar",
|
||||||
|
"version": "v2.1.6",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-debugbar/php-debugbar.git",
|
||||||
|
"reference": "16fa68da5617220594aa5e33fa9de415f94784a0"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-debugbar/php-debugbar/zipball/16fa68da5617220594aa5e33fa9de415f94784a0",
|
||||||
|
"reference": "16fa68da5617220594aa5e33fa9de415f94784a0",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^8",
|
||||||
|
"psr/log": "^1|^2|^3",
|
||||||
|
"symfony/var-dumper": "^4|^5|^6|^7"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"dbrekelmans/bdi": "^1",
|
||||||
|
"phpunit/phpunit": "^8|^9",
|
||||||
|
"symfony/panther": "^1|^2.1",
|
||||||
|
"twig/twig": "^1.38|^2.7|^3.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"kriswallsmith/assetic": "The best way to manage assets",
|
||||||
|
"monolog/monolog": "Log using Monolog",
|
||||||
|
"predis/predis": "Redis storage"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.0-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"DebugBar\\": "src/DebugBar/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Maxime Bouroumeau-Fuseau",
|
||||||
|
"email": "maxime.bouroumeau@gmail.com",
|
||||||
|
"homepage": "http://maximebf.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Barry vd. Heuvel",
|
||||||
|
"email": "barryvdh@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Debug bar in the browser for php application",
|
||||||
|
"homepage": "https://github.com/php-debugbar/php-debugbar",
|
||||||
|
"keywords": [
|
||||||
|
"debug",
|
||||||
|
"debug bar",
|
||||||
|
"debugbar",
|
||||||
|
"dev"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/php-debugbar/php-debugbar/issues",
|
||||||
|
"source": "https://github.com/php-debugbar/php-debugbar/tree/v2.1.6"
|
||||||
|
},
|
||||||
|
"time": "2025-02-21T17:47:03+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
"version": "11.0.9",
|
"version": "11.0.9",
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('ratings', function (Blueprint $table) {
|
||||||
|
$table->string('platform');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('ratings', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('platform');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('reviews', function (Blueprint $table) {
|
||||||
|
$table->string('platform');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('reviews', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('platform');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('wishlists', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->bigInteger('user_id');
|
||||||
|
$table->string('name');
|
||||||
|
$table->text('description')->nullable();
|
||||||
|
$table->enum('visibility', ['public', 'private', 'friends_only'])->default('public');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('wishlists');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -228,3 +228,19 @@ body {
|
|||||||
.dropdown-divider {
|
.dropdown-divider {
|
||||||
border-top: 1px solid #334155;
|
border-top: 1px solid #334155;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cover-container{
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cover-container a:hover+.game-info-cover{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.cover-container .game-info-cover{
|
||||||
|
border: 1px solid #000;
|
||||||
|
margin-left: 10px;
|
||||||
|
position: absolute; top: 0; left: 0;
|
||||||
|
width: 100%; height: 100%;
|
||||||
|
color: #fff; background: rgba(0, 0, 0, 0.7);
|
||||||
|
display: none; justify-content: center; align-items: center;
|
||||||
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if(request()->hasAny(['platform', 'genre', 'year', 'rating_range']))
|
@if(request()->hasAny(['platform', 'genre', 'year ', 'rating_range']))
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<div class="d-flex flex-wrap gap-2">
|
<div class="d-flex flex-wrap gap-2">
|
||||||
@if(request('platform'))
|
@if(request('platform'))
|
||||||
@@ -123,35 +123,48 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4 g-4">
|
<div class="row g-4">
|
||||||
@foreach($games as $game)
|
@foreach($games as $game)
|
||||||
<div class="col">
|
<div class="col-md-2">
|
||||||
<div class="card gradient-border h-100">
|
<div class="cover-container">
|
||||||
|
<a href="{{ route('games.show', $game->slug) }}">
|
||||||
<img src="{{ $game->cover_url ?? 'https://via.placeholder.com/300x400' }}"
|
<img src="{{ $game->cover_url ?? 'https://via.placeholder.com/300x400' }}"
|
||||||
class="card-img-top"
|
class="card-img-top"
|
||||||
alt="{{ $game->name }}"
|
alt="{{ $game->name }}"
|
||||||
style="height: 300px; object-fit: cover;">
|
style="height: 300px; object-fit: cover;">
|
||||||
<div class="card-body">
|
<div class="game-info-cover">
|
||||||
<h5 class="card-title">{{ $game->name }}</h5>
|
text here
|
||||||
<p class="card-text text-gray-400 small">
|
|
||||||
{{ Str::limit($game->summary, 100) }}
|
|
||||||
</p>
|
|
||||||
<div class="d-flex gap-2 mb-3">
|
|
||||||
@if($game->rating)
|
|
||||||
<span class="badge bg-primary"><i class="fas fa-star me-1"></i> {{ number_format($game->rating, 1) }}</span>
|
|
||||||
@endif
|
|
||||||
@if($game->first_release_date)
|
|
||||||
<span class="badge bg-secondary">
|
|
||||||
<i class="fas fa-calendar-alt me-1"></i> {{ \Carbon\Carbon::parse($game->first_release_date)->format('Y') }}
|
|
||||||
</span>
|
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
<a href="{{ route('games.show', $game->slug) }}" class="btn btn-gradient w-100">
|
|
||||||
<i class="fas fa-info-circle me-1"></i> View Details
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{-- <div class="col">--}}
|
||||||
|
{{-- <div class="card gradient-border h-100">--}}
|
||||||
|
{{-- <img src="{{ $game->cover_url ?? 'https://via.placeholder.com/300x400' }}"--}}
|
||||||
|
{{-- class="card-img-top"--}}
|
||||||
|
{{-- alt="{{ $game->name }}"--}}
|
||||||
|
{{-- style="height: 300px; object-fit: cover;">--}}
|
||||||
|
{{-- <div class="card-body">--}}
|
||||||
|
{{-- <h5 class="card-title">{{ $game->name }}</h5>--}}
|
||||||
|
{{-- <p class="card-text text-gray-400 small">--}}
|
||||||
|
{{-- {{ Str::limit($game->summary, 100) }}--}}
|
||||||
|
{{-- </p>--}}
|
||||||
|
{{-- <div class="d-flex gap-2 mb-3">--}}
|
||||||
|
{{-- @if($game->rating)--}}
|
||||||
|
{{-- <span class="badge bg-primary"><i class="fas fa-star me-1"></i> {{ number_format($game->rating, 1) }}</span>--}}
|
||||||
|
{{-- @endif--}}
|
||||||
|
{{-- @if($game->first_release_date)--}}
|
||||||
|
{{-- <span class="badge bg-secondary">--}}
|
||||||
|
{{-- <i class="fas fa-calendar-alt me-1"></i> {{ \Carbon\Carbon::parse($game->first_release_date)->format('Y') }}--}}
|
||||||
|
{{-- </span>--}}
|
||||||
|
{{-- @endif--}}
|
||||||
|
{{-- </div>--}}
|
||||||
|
{{-- <a href="{{ route('games.show', $game->slug) }}" class="btn btn-gradient w-100">--}}
|
||||||
|
{{-- <i class="fas fa-info-circle me-1"></i> View Details--}}
|
||||||
|
{{-- </a>--}}
|
||||||
|
{{-- </div>--}}
|
||||||
|
{{-- </div>--}}
|
||||||
|
{{-- </div>--}}
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -47,27 +47,39 @@
|
|||||||
|
|
||||||
<div class="card bg-dark text-white mb-4">
|
<div class="card bg-dark text-white mb-4">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h5 class="mb-0">Details</h5>
|
<h5 class="mb-0">Released on</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<h6 class="text-muted">Platforms</h6>
|
|
||||||
<div class="d-flex flex-wrap gap-2">
|
<div class="d-flex flex-wrap gap-2">
|
||||||
@foreach($game->platforms()->get() as $platform)
|
@foreach($game->platforms()->get() as $platform)
|
||||||
<span class="badge bg-secondary">{{ $platform->name }}</span>
|
<span class="badge bg-secondary">{{ $platform->name }}</span>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card bg-dark text-white mb-4">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">Genres</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<h6 class="text-muted">Genres</h6>
|
|
||||||
<div class="d-flex flex-wrap gap-2">
|
<div class="d-flex flex-wrap gap-2">
|
||||||
@foreach($game->genres()->get() as $genre)
|
@foreach($game->genres()->get() as $genre)
|
||||||
<span class="badge bg-primary">{{ $genre->name }}</span>
|
<span class="badge bg-primary">{{ $genre->name }}</span>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card bg-dark text-white mb-4">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">Details</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
@if($game->rating)
|
@if($game->rating)
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<h6 class="text-muted">Rating</h6>
|
<h6 class="text-muted">Rating</h6>
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('title', 'ClearGame - Track Your Games. Level Up Your Backlog.')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<section class="text-center py-5">
|
||||||
|
<h1 class="display-4 fw-bold mb-4">
|
||||||
|
<span class="gradient-text">Track Your Games.</span><br>
|
||||||
|
Level Up Your Backlog.
|
||||||
|
</h1>
|
||||||
|
<p class="lead text-gray-400 mb-5 mx-auto" style="max-width: 600px;">
|
||||||
|
Organize your gaming journey, discover new titles, and connect with fellow gamers.
|
||||||
|
Your ultimate companion for managing and completing your game collection.
|
||||||
|
</p>
|
||||||
|
<div class="d-flex justify-content-center gap-3">
|
||||||
|
<a href="#" class="btn btn-gradient btn-lg">Get Started</a>
|
||||||
|
<a href="#" class="btn btn-outline-gradient btn-lg">Learn More</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="py-5">
|
||||||
|
<div class="row g-4">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="gradient-border p-4 rounded-3 h-100">
|
||||||
|
<div class="display-4 mb-3 gradient-text">🎮</div>
|
||||||
|
<h3 class="h4 fw-semibold mb-2">Track Your Progress</h3>
|
||||||
|
<p class="text-gray-400">Keep tabs on your gaming journey and celebrate your achievements.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="gradient-border p-4 rounded-3 h-100">
|
||||||
|
<div class="display-4 mb-3 gradient-text">📊</div>
|
||||||
|
<h3 class="h4 fw-semibold mb-2">Discover New Games</h3>
|
||||||
|
<p class="text-gray-400">Find your next favorite game with personalized recommendations.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="gradient-border p-4 rounded-3 h-100">
|
||||||
|
<div class="display-4 mb-3 gradient-text">👥</div>
|
||||||
|
<h3 class="h4 fw-semibold mb-2">Connect with Gamers</h3>
|
||||||
|
<p class="text-gray-400">Share your experiences and connect with like-minded gamers.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="text-center py-5">
|
||||||
|
<h2 class="display-5 fw-bold mb-4">Ready to Level Up Your Gaming Experience?</h2>
|
||||||
|
<a href="#" class="btn btn-gradient btn-lg">Join ClearGame Today</a>
|
||||||
|
</section>
|
||||||
|
@endsection
|
||||||
@@ -33,15 +33,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<nav class="navbar navbar-expand-lg">
|
@include('layouts.navigation')
|
||||||
<div class="container">
|
|
||||||
<a class="navbar-brand text-2xl fw-bold gradient-text" href="#">ClearGame</a>
|
|
||||||
<div class="d-flex">
|
|
||||||
<a href="#" class="text-gray-300 text-decoration-none me-3">Login</a>
|
|
||||||
<a href="#" class="btn btn-gradient">Sign Up</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<main class="container">
|
<main class="container">
|
||||||
<section class="text-center py-5">
|
<section class="text-center py-5">
|
||||||
|
|||||||
@@ -19,7 +19,29 @@
|
|||||||
|
|
||||||
<!-- Bootstrap CSS -->
|
<!-- Bootstrap CSS -->
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--primary: #7F00FF;
|
||||||
|
--accent: #00C9FF;
|
||||||
|
--background: #121212;
|
||||||
|
--text: #EAEAEA;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: 'Inter', sans-serif;
|
||||||
|
background-color: var(--background);
|
||||||
|
color: var(--text);
|
||||||
|
}
|
||||||
|
.gradient-text {
|
||||||
|
background: linear-gradient(90deg, var(--primary), var(--accent));
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
}
|
||||||
|
.gradient-border {
|
||||||
|
border: 2px solid transparent;
|
||||||
|
background: linear-gradient(var(--background), var(--background)) padding-box,
|
||||||
|
linear-gradient(90deg, var(--primary), var(--accent)) border-box;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="font-sans antialiased">
|
<body class="font-sans antialiased">
|
||||||
<div class="min-h-screen bg-gray-100 dark:bg-gray-900">
|
<div class="min-h-screen bg-gray-100 dark:bg-gray-900">
|
||||||
@@ -44,6 +66,9 @@
|
|||||||
<i class="fas fa-user me-1"></i> {{ Auth::user()->name }}
|
<i class="fas fa-user me-1"></i> {{ Auth::user()->name }}
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-end">
|
<ul class="dropdown-menu dropdown-menu-end">
|
||||||
|
<li>
|
||||||
|
<a href="">My lists</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<form method="POST" action="{{ route('logout') }}">
|
<form method="POST" action="{{ route('logout') }}">
|
||||||
@csrf
|
@csrf
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Settings Dropdown -->
|
<!-- Settings Dropdown -->
|
||||||
|
@auth
|
||||||
<div class="hidden sm:flex sm:items-center sm:ms-6">
|
<div class="hidden sm:flex sm:items-center sm:ms-6">
|
||||||
<x-dropdown align="right" width="48">
|
<x-dropdown align="right" width="48">
|
||||||
<x-slot name="trigger">
|
<x-slot name="trigger">
|
||||||
@@ -51,6 +52,13 @@
|
|||||||
</x-slot>
|
</x-slot>
|
||||||
</x-dropdown>
|
</x-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
@endauth
|
||||||
|
@guest
|
||||||
|
<div class="d-flex">
|
||||||
|
<a href="#" class="text-gray-300 text-decoration-none me-3">Login</a>
|
||||||
|
<a href="#" class="btn btn-gradient">Sign Up</a>
|
||||||
|
</div>
|
||||||
|
@endguest
|
||||||
|
|
||||||
<!-- Hamburger -->
|
<!-- Hamburger -->
|
||||||
<div class="-me-2 flex items-center sm:hidden">
|
<div class="-me-2 flex items-center sm:hidden">
|
||||||
|
|||||||
@@ -4,14 +4,21 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="container py-4">
|
<div class="container py-4">
|
||||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
||||||
<h1 class="text-gradient">My Lists</h1>
|
|
||||||
|
<div class="row g-4">
|
||||||
|
@if($lists->count())
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h1 class="text-gradient d-block float-start">My Lists</h1>
|
||||||
|
<span class="float-end">
|
||||||
<a href="{{ route('lists.create') }}" class="btn btn-gradient">
|
<a href="{{ route('lists.create') }}" class="btn btn-gradient">
|
||||||
<i class="fas fa-plus me-2"></i>Create New List
|
<i class="fas fa-plus me-2"></i>Create New List
|
||||||
</a>
|
</a>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
<div class="row g-4">
|
<div class="row">
|
||||||
@foreach($lists as $list)
|
@foreach($lists as $list)
|
||||||
<div class="col-md-6 col-lg-4">
|
<div class="col-md-6 col-lg-4">
|
||||||
<div class="card bg-dark text-white h-100">
|
<div class="card bg-dark text-white h-100">
|
||||||
@@ -50,5 +57,12 @@
|
|||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@else
|
||||||
|
no lists exists
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
+6
-3
@@ -1,14 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use App\Http\Controllers\HomeController;
|
||||||
use App\Http\Controllers\ProfileController;
|
use App\Http\Controllers\ProfileController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use App\Http\Controllers\GameController;
|
use App\Http\Controllers\GameController;
|
||||||
use App\Http\Controllers\ReviewController;
|
use App\Http\Controllers\ReviewController;
|
||||||
use App\Http\Controllers\GameListController;
|
use App\Http\Controllers\GameListController;
|
||||||
|
|
||||||
Route::get('/', function () {
|
//Route::get('/', function () {
|
||||||
return view('landing');
|
// return view('landing');
|
||||||
});
|
//});
|
||||||
|
|
||||||
|
Route::get('/', [HomeController::class, 'index']);
|
||||||
|
|
||||||
Route::get('/dashboard', function () {
|
Route::get('/dashboard', function () {
|
||||||
return view('dashboard');
|
return view('dashboard');
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
Reference in New Issue
Block a user