2017-11-30 11:47:56 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Common;
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
use App\Abstracts\Http\Controller;
|
2021-01-08 17:02:27 +03:00
|
|
|
use Illuminate\Http\Request;
|
2017-11-30 11:47:56 +03:00
|
|
|
|
|
|
|
class Import extends Controller
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Show the form for creating a new resource.
|
|
|
|
*
|
|
|
|
* @param $group
|
|
|
|
* @param $type
|
|
|
|
* @return Response
|
|
|
|
*/
|
2021-01-08 17:02:27 +03:00
|
|
|
public function create($group, $type, $route = null)
|
2017-11-30 11:47:56 +03:00
|
|
|
{
|
2021-04-16 00:59:43 +03:00
|
|
|
$path = company_id() . '/' . $group . '/' . $type;
|
2017-11-30 11:47:56 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
if (module($group) instanceof \Akaunting\Module\Module) {
|
2019-04-04 17:54:03 +03:00
|
|
|
$namespace = $group . '::';
|
|
|
|
} else {
|
|
|
|
$namespace = '';
|
|
|
|
}
|
|
|
|
|
2021-01-08 17:02:27 +03:00
|
|
|
return view('common.import.create', compact('group', 'type', 'path', 'route', 'namespace'));
|
2017-11-30 11:47:56 +03:00
|
|
|
}
|
|
|
|
}
|