progress
This commit is contained in:
@@ -7,6 +7,13 @@ use Illuminate\Http\Request;
|
||||
|
||||
class CelebrityController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$celebrities = Person::paginate(25);
|
||||
|
||||
return view('celebrity.index', compact('celebrities'));
|
||||
}
|
||||
|
||||
public function show(string $slug)
|
||||
{
|
||||
$celebrity = Person::where('slug', $slug)->first();
|
||||
|
||||
@@ -7,5 +7,8 @@ use Illuminate\Http\Request;
|
||||
|
||||
class ThreadsController extends Controller
|
||||
{
|
||||
//
|
||||
public function show(string $threadSlug)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ProfileController extends Controller
|
||||
{
|
||||
public function show(string $slug)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Timeline extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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('timelines', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('timelines');
|
||||
}
|
||||
};
|
||||
@@ -60,3 +60,20 @@ $('.like-btn').on('click', function (e) {
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.remove-from-watchlist').on('click', function(e){
|
||||
e.preventDefault();
|
||||
let url = '/lists/watched/' + $(this).data('id') + '/' + $(this).data('type');
|
||||
var self = this
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: 'GET',
|
||||
success: function(data){
|
||||
if(!data.added) {
|
||||
$(self).closest('.large-list-item').remove();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -43,8 +43,8 @@ body.light-mode{
|
||||
.user-avatar{
|
||||
width: 125px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid white;
|
||||
box-shadow: 1px 1px 1px #b5b3b3;
|
||||
border: 2px solid #eeecec;
|
||||
box-shadow: 2px 2px 9px #979696;
|
||||
}
|
||||
h1{
|
||||
display: inline-block;
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid celebrity-page">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Celebrities
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
@foreach($celebrities as $celebrity)
|
||||
<div class="col-md-2">
|
||||
<div class="celebrity-card">
|
||||
<a href="{{ route('celebrity.show', $celebrity->slug) }}">
|
||||
<img src="http://image.tmdb.org/t/p/w185/{{ $celebrity->profile_path }}" alt="">
|
||||
</a>
|
||||
<span>
|
||||
<a href="{{ route('celebrity.show', $celebrity->slug) }}">
|
||||
{{ $celebrity->name }}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ $celebrities->links() }}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="card">
|
||||
<div class="user-actions">
|
||||
<ul>
|
||||
<li>
|
||||
<a href=""><span class="iconify" data-icon="mdi-eye-check-outline"></span> Mark as seen</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href=""><span class="iconify" data-icon="mdi-thumb-up-outline"></span> Like</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href=""><span class="iconify" data-icon="mdi-playlist-check"></span> add to list</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
rate
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<li class="nav-item"><a href="/" class="nav-link">Home</a></li>
|
||||
<li class="nav-item"><a href="{{ route('movie.index') }}" class="nav-link">Movies</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link">Tv Shows</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link">Celebrities</a></li>
|
||||
<li class="nav-item"><a href="{{ route('celebrity.index') }}" class="nav-link">Celebrities</a></li>
|
||||
<li class="nav-item"><a href="{{ route('forums.index') }}" class="nav-link">Forums</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link">Contact</a></li>
|
||||
@guest
|
||||
|
||||
@@ -33,7 +33,28 @@
|
||||
{{ $item->item()->first()->overview }}
|
||||
</span>
|
||||
<div class="meta">
|
||||
Rate | favorite | add to list | remove
|
||||
<ul class="list-inline">
|
||||
<li class="d-inline">
|
||||
<a href="">
|
||||
<i class="fas fa-star"></i> Rate
|
||||
</a>
|
||||
</li>
|
||||
<li class="d-inline">
|
||||
<a href="">
|
||||
<i class="fas fa-heart"></i> Favorite
|
||||
</a>
|
||||
</li>
|
||||
<li class="d-inline">
|
||||
<a href="">
|
||||
<i class="fas fa-plus"></i> Add to list ↓
|
||||
</a>
|
||||
</li>
|
||||
<li class="d-inline">
|
||||
<a href="" class="remove-from-watchlist" data-id="{{ $item->item_id }}" data-type="{{ $item->item_type }}">
|
||||
<i class="fas fa-times"></i> Remove
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-page-menu">
|
||||
<div class="row justify-content-center">
|
||||
<div class="row justify-content-center" style="margin-right: 0;">
|
||||
<div class="col-md-10">
|
||||
<div class="profile-nav">
|
||||
<div class="menu-nav">
|
||||
|
||||
@@ -17,6 +17,7 @@ Route::prefix('movies')->group(function () {
|
||||
});
|
||||
|
||||
Route::prefix('celebrities')->group(function () {
|
||||
Route::get('/', [\App\Http\Controllers\CelebrityController::class, 'index'])->name('celebrity.index');
|
||||
Route::get('/{slug}', [\App\Http\Controllers\CelebrityController::class, 'show'])->name('celebrity.show');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user