Fewo Mails / Booking Country Services
This commit is contained in:
parent
b9c26d06d0
commit
48a6eb2282
154 changed files with 7761 additions and 1643 deletions
|
|
@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
|||
use App\Models\Draft;
|
||||
use App\Models\DraftItem;
|
||||
use App\Models\DraftType;
|
||||
use Request;
|
||||
|
||||
class DraftController extends Controller
|
||||
{
|
||||
|
|
@ -28,7 +29,7 @@ class DraftController extends Controller
|
|||
|
||||
public function detail($id)
|
||||
{
|
||||
if($id == "new") {
|
||||
if($id === "new") {
|
||||
$draft = new Draft();
|
||||
$draft->active = true;
|
||||
$id = 'new';
|
||||
|
|
@ -48,7 +49,7 @@ class DraftController extends Controller
|
|||
public function store($id)
|
||||
{
|
||||
$data = Request::all();
|
||||
if($id == "new") {
|
||||
if($id === "new") {
|
||||
$draft = new Draft();
|
||||
}else{
|
||||
$draft = Draft::findOrFail($id);
|
||||
|
|
@ -145,7 +146,7 @@ class DraftController extends Controller
|
|||
public function typeUpdate(){
|
||||
|
||||
$data = Request::all();
|
||||
if($data['id'] == "new"){
|
||||
if($data['id'] === "new"){
|
||||
$draft_type = DraftType::create([
|
||||
'name' => $data['name'],
|
||||
'active' => isset($data['active']) ? true : false,
|
||||
|
|
@ -158,8 +159,6 @@ class DraftController extends Controller
|
|||
$draft_type->active = isset($data['active']) ? true : false;
|
||||
$draft_type->color = $data['color'];
|
||||
$draft_type->pos = $data['pos'];
|
||||
|
||||
|
||||
$draft_type->save();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue