<?php


namespace Mehrab\ContactUs\Repositories;


use Illuminate\Support\Str;
use Mehrab\City\Models\City;
use Mehrab\ContactUs\Models\ContactUs;

class contactUsRepo
{


    public function store($request)
    {
        return ContactUs::query()
            ->create([
                'user_id' => auth()->id() ?? '',
                'name' => $request->name,
                'mobile' =>  $request->mobile,
                'title' =>  $request->title,
                'content' => $request->content,
            ]);
    }

    public function list()
    {
        return ContactUs::query()->orderBy('created_at')->paginate();
    }
}
