mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-09-22 00:13:46 -04:00
36 lines
740 B
PHP
36 lines
740 B
PHP
<?php
|
|
|
|
namespace Modules\FrontendCMS\Repositories;
|
|
|
|
use \Modules\FrontendCMS\Entities\ContactContent;
|
|
|
|
class ContactContentRepository
|
|
{
|
|
|
|
protected $contactContent;
|
|
|
|
public function __construct(ContactContent $contactContent)
|
|
{
|
|
$this->contactContent = $contactContent;
|
|
}
|
|
|
|
|
|
public function all(){
|
|
return $this->contactContent::firstOrfail();
|
|
|
|
}
|
|
|
|
public function update($data, $id)
|
|
{
|
|
$contactContent = $this->contactContent::where('id', $id)->first();
|
|
$contactContent->fill($data)->save();
|
|
return $contactContent;
|
|
}
|
|
|
|
public function edit($id)
|
|
{
|
|
$contactContent = $this->contactContent->findOrFail($id);
|
|
return $contactContent;
|
|
}
|
|
}
|