Updated Buildplate Forms
This commit is contained in:
@@ -31,6 +31,27 @@ class Buildplate extends Component
|
||||
public $editid = '';
|
||||
public $deleteid = '';
|
||||
|
||||
public function create() {
|
||||
@Auth::check();
|
||||
|
||||
|
||||
// Validate
|
||||
$this->validate();
|
||||
|
||||
$buildplate = new BuildplateModel();
|
||||
$buildplate->name = $this->name;
|
||||
$buildplate->description = $this->description;
|
||||
$buildplate->manufacturer_id = $this->manufacturer_id;
|
||||
$buildplate->temp_max = $this->temp_max;
|
||||
$buildplate->amount = $this->amount;
|
||||
$buildplate->save();
|
||||
|
||||
// Clear the form
|
||||
$this->resetInputFields();
|
||||
|
||||
// Close the modal
|
||||
Flux::modal('createModal')->close();
|
||||
}
|
||||
|
||||
public function edit($buildplateid) {
|
||||
@Auth::check();
|
||||
|
||||
Reference in New Issue
Block a user