<?php

namespace App\Http\Controllers;

use App\Models\BlogBanner;
use App\Http\Requests\StoreBlogBannerRequest;
use App\Http\Requests\UpdateBlogBannerRequest;

class BlogBannerController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        return BlogBanner::orderBy('id', 'DESC')->get();
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \App\Http\Requests\StoreBlogBannerRequest  $request
     * @return \Illuminate\Http\Response
     */
    public function store(StoreBlogBannerRequest $request)
    {
        BlogBanner::insert([
            'blogId' => $request->blogId,
            'name' => $request->name,
            'image' => $request->image,
            'created_at' => now(),
            'updated_at' => now(),
        ]);
    }

    /**
     * Display the specified resource.
     *
     * @param  \App\Models\BlogBanner  $blogBanner
     * @return \Illuminate\Http\Response
     */
    public function show(BlogBanner $blogBanner)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Models\BlogBanner  $blogBanner
     * @return \Illuminate\Http\Response
     */
    public function edit(BlogBanner $blogBanner)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \App\Http\Requests\UpdateBlogBannerRequest  $request
     * @param  \App\Models\BlogBanner  $blogBanner
     * @return \Illuminate\Http\Response
     */
    public function update(UpdateBlogBannerRequest $request, BlogBanner $blogBanner)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\BlogBanner  $blogBanner
     * @return \Illuminate\Http\Response
     */
    public function destroy(BlogBanner $blogBanner)
    {
        //
    }
}
