inventory changes
This commit is contained in:
@@ -79,7 +79,11 @@ class InventoryController extends Controller
|
||||
public function actionCreate()
|
||||
{
|
||||
$model = new Inventory();
|
||||
|
||||
$user = User::findOne(\Yii::$app->user->id);
|
||||
|
||||
|
||||
$model->name = 'Leltár_'.date('Ymd_His') .'_' . $user->username;
|
||||
|
||||
$model->id_user = \Yii::$app->user->id;
|
||||
if ($model->load(Yii::$app->request->post()) && $model->save()) {
|
||||
return $this->redirect(['view', 'id' => $model->id_inventory]);
|
||||
|
||||
Reference in New Issue
Block a user