Mails, Strono, filter
This commit is contained in:
parent
f53f17f9c1
commit
62e84637b6
99 changed files with 2409 additions and 474 deletions
60
app/Http/Controllers/Settings/BookingStatusController.php
Executable file
60
app/Http/Controllers/Settings/BookingStatusController.php
Executable file
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Settings;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Models\Status;
|
||||
use App\Models\TravelNationality;
|
||||
use App\Models\TravelNationalityRequirement;
|
||||
use Request;
|
||||
|
||||
class BookingStatusController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('admin');
|
||||
}
|
||||
|
||||
public function index($step = false)
|
||||
{
|
||||
$data = [
|
||||
'status' => Status::all(),
|
||||
];
|
||||
return view('settings.status.index', $data);
|
||||
}
|
||||
|
||||
|
||||
public function update(){
|
||||
|
||||
$data = Request::all();
|
||||
if($data['id'] === "new"){
|
||||
$model = Status::create([
|
||||
'name' => $data['name'],
|
||||
'color' => $data['color'],
|
||||
'handling_days' => $data['handling_days'],
|
||||
]);
|
||||
}else{
|
||||
$model = Status::find($data['id']);
|
||||
$model->name = $data['name'];
|
||||
$model->color = $data['color'];
|
||||
$model->handling_days = $data['handling_days'];
|
||||
$model->save();
|
||||
}
|
||||
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('admin_settings_booking_status'));
|
||||
}
|
||||
|
||||
public function delete($id){
|
||||
|
||||
$model = Status::findOrFail($id);
|
||||
$model->delete();
|
||||
\Session()->flash('alert-success', 'Eintrag gelöscht');
|
||||
return redirect()->back();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue