laravel storage saving tmp/php… and not saving i wanted folder

I’m trying to upload an image from my admin panel, but the file isn’t uploading or saving in the database.

I’m using the latest version of Laravel for my project. For your reference, I’m providing the full code of my ProjectController.php below. I would really appreciate any advice or solutions you could offer to resolve this issue.

Thank you!

class ProjectController extends Controller
{
    public function index()
    {
        $projects = Project::all();
        return view('projects.index', compact('projects'));
    }

    public function create()
    {
        return view('projects.create');
    }

    public function store(Request $request)
    {
        $request->validate([
            'title' => 'required|string|max:255',
            'content' => 'required|string',
            'thumbnail' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
        ]);

        $thumbnailPath = $request->file('thumbnail')->store('thumbnails', 'public');


        return redirect()->route('admin.projects.index')->with('success', 'Proje başarıyla oluşturuldu.');
    }

    public function edit(Project $project)
    {
        return view('projects.edit', compact('project'));
    }

    public function update(Request $request, Project $project)
    {
        $request->validate([
            'title' => 'required|string|max:255',
            'content' => 'required|string',
            'thumbnail' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
        ]);

        $thumbnailPath = $project->thumbnail; // Eski görsel yolunu koruyun
        if ($request->hasFile('thumbnail')) {
            if ($thumbnailPath) {
                Storage::disk('public')->delete($thumbnailPath); // Eski görseli sil
            }
            $thumbnailPath = $request->file('thumbnail')->store('thumbnails', 'public'); // Yeni görseli yükle
        }

        $project->update([
            'title' => $request->title,
            'content' => $request->content,
            'thumbnail' => $thumbnailPath,
        ]);

        return redirect()->route('admin.projects.index')->with('success', 'Proje başarıyla güncellendi.');
    }

    public function destroy(Project $project)
    {
        if ($project->thumbnail) {
            Storage::disk('public')->delete($project->thumbnail); // Eski görseli sil
        }

        $project->delete();

        return redirect()->route('admin.projects.index')->with('success', 'Proje başarıyla silindi.');
    }
}

blade:

@extends('layouts.admin')

@section('content')
<!-- Edit Project -->
<div class="max-w-[85rem] px-4 py-10 sm:px-6 lg:px-8 lg:py-14 mx-auto"> 
  <div class="mx-auto max-w-8xl">
    <div class="text-center">
      <h2 class="text-xl text-gray-800 text-left font-bold sm:text-3xl dark:text-white">
        Proje Düzenle
      </h2>
    </div>

    <!-- Card -->
    <div class="mt-5 p-4 relative z-10 bg-white border rounded-xl sm:mt-10 md:p-10 dark:bg-neutral-900 dark:border-neutral-700">
      <form action="{{ route('admin.projects.update', $project->id) }}" method="POST" enctype="multipart/form-data">
        @csrf
        @method('PUT')
        
        <div class="mb-4 sm:mb-8">
          <label for="title" class="block mb-2 text-sm font-medium dark:text-white">Proje Adı</label>
          <input type="text" id="title" name="title" value="{{ old('title', $project->title) }}" class="py-3 px-4 block w-full border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600" required>
        </div>

        <div class="mb-4 sm:mb-8">
          <label for="content" class="block mb-2 text-sm font-medium dark:text-white">İçerik</label>
          <textarea id="content" name="content" rows="5" class="py-3 px-4 block w-full border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600">{{ old('content', $project->content) }}</textarea>
        </div>

        <div class="mb-4 sm:mb-8">
          <label for="thumbnail" class="block mb-2 text-sm font-medium dark:text-white">Thumbnail</label>
          <input type="file" id="thumbnail" name="thumbnail" class="py-3 px-4 block w-full border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600">
          @if ($project->thumbnail)
            <img src="{{ asset('images/' . $project->thumbnail) }}" alt="Thumbnail" class="mt-4 w-32 h-32 rounded-lg">
          @endif
        </div>

        <div class="mt-6 grid">
          <button type="submit" class="w-full py-3 px-4 inline-flex justify-center items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none">Güncelle</button>
        </div>
      </form>
    </div>
    <!-- End Card -->
  </div>
</div>
<!-- End Edit Project Form -->

<script src="https://cdn.ckeditor.com/4.16.0/standard/ckeditor.js"></script>

<script>

  CKEDITOR.replace('content', {
    filebrowserUploadUrl: "{{ route('admin.projects.upload', ['_token' => csrf_token() ]) }}",
    filebrowserUploadMethod: 'form'
  });
  
  CKEDITOR.on('instanceReady', function(ev) {
    // CKEditor instance'ını al
    var editor = ev.editor;

    // Beyaz metin ve koyu gri arka plan rengi için stil ekle
    editor.document.$.head.insertAdjacentHTML('beforeend', `
      <style>
        body {
          color: #ffffff !important; /* Metin rengini beyaz yapar */
          background-color: #262626 !important; /* Arka plan rengini koyu gri yapar */
        }
        .cke_editable {
          color: #ffffff !important; /* Editördeki metin rengini beyaz yapar */
          background-color: #262626 !important; /* Editördeki arka plan rengini koyu gri yapar */
        }
      </style>
    `);
  });
</script>
@endsection

Model:

<?php

namespace AppModels;

use IlluminateDatabaseEloquentFactoriesHasFactory;
use IlluminateDatabaseEloquentModel;

class Project extends Model
{
    use HasFactory;

    protected $fillable = [
        'title',
        'content',
        'thumbnail',
    ];
}

I tried storage:link but dosen’t worked.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật