Merge Invoice and Bill into Document
This commit is contained in:
38
app/Http/Controllers/Modals/Companies.php
Normal file
38
app/Http/Controllers/Modals/Companies.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Modals;
|
||||
|
||||
use App\Abstracts\Http\Controller;
|
||||
use App\Models\Common\Company;
|
||||
|
||||
class Companies extends Controller
|
||||
{
|
||||
/**
|
||||
* Instantiate a new controller instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// Add CRUD permission check
|
||||
$this->middleware('permission:read-settings-company')->only('index', 'show', 'edit', 'export');
|
||||
$this->middleware('permission:update-settings-settings')->only('update', 'enable', 'disable');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param Company $company
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function edit(Company $company)
|
||||
{
|
||||
$html = view('modals.companies.edit', compact('company'))->render();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'error' => false,
|
||||
'message' => 'null',
|
||||
'html' => $html,
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user