Comment Updated On The AttributeController

This commit is contained in:
devansh bawari 2021-09-14 12:25:53 +05:30
parent 188efeb4ee
commit 3c26585c05
1 changed files with 6 additions and 7 deletions

View File

@ -2,20 +2,19 @@
namespace Webkul\Attribute\Http\Controllers;
use Illuminate\Support\Facades\Event;
use Webkul\Attribute\Repositories\AttributeRepository;
class AttributeController extends Controller
{
/**
* Contains route related configuration
* Contains route related configuration.
*
* @var array
*/
protected $_config;
/**
* AttributeRepository object
* Attribute repository instance.
*
* @var \Webkul\Attribute\Repositories\AttributeRepository
*/
@ -71,7 +70,7 @@ class AttributeController extends Controller
$data['is_user_defined'] = 1;
$attribute = $this->attributeRepository->create($data);
$this->attributeRepository->create($data);
session()->flash('success', trans('admin::app.response.create-success', ['name' => 'Attribute']));
@ -118,7 +117,7 @@ class AttributeController extends Controller
'type' => 'required',
]);
$attribute = $this->attributeRepository->update(request()->all(), $id);
$this->attributeRepository->update(request()->all(), $id);
session()->flash('success', trans('admin::app.response.update-success', ['name' => 'Attribute']));
@ -144,7 +143,7 @@ class AttributeController extends Controller
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Attribute']));
return response()->json(['message' => true], 200);
} catch(\Exception $e) {
} catch (\Exception $e) {
session()->flash('error', trans('admin::app.response.delete-failed', ['name' => 'Attribute']));
}
}
@ -153,7 +152,7 @@ class AttributeController extends Controller
}
/**
* Remove the specified resources from database
* Remove the specified resources from database.
*
* @return \Illuminate\Http\Response
*/