moved wizard check to middleware
This commit is contained in:
@ -19,10 +19,6 @@ class Companies extends Controller
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
if (setting('general.wizard', false)) {
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
$company = Company::find(session('company_id'));
|
||||
|
||||
$company->setSettings();
|
||||
|
@ -13,16 +13,10 @@ class Currencies extends Controller
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param Currency $currency
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if (setting('general.wizard', false)) {
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
$currencies = Currency::all();
|
||||
|
||||
return view('wizard.currencies.index', compact('currencies'));
|
||||
@ -35,10 +29,6 @@ class Currencies extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
if (setting('general.wizard', false)) {
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
// Get current currencies
|
||||
$current = Currency::pluck('code')->toArray();
|
||||
|
||||
@ -105,10 +95,6 @@ class Currencies extends Controller
|
||||
*/
|
||||
public function edit(Currency $currency)
|
||||
{
|
||||
if (setting('general.wizard', false)) {
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
// Get current currencies
|
||||
$current = Currency::pluck('code')->toArray();
|
||||
|
||||
|
@ -17,10 +17,6 @@ class Finish extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if (setting('general.wizard', false)) {
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
setting()->set('general.wizard', true);
|
||||
|
||||
// Save all settings
|
||||
|
@ -15,10 +15,6 @@ class Taxes extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if (setting('general.wizard', false)) {
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
$taxes = Tax::all();
|
||||
|
||||
return view('wizard.taxes.index', compact('taxes'));
|
||||
@ -31,10 +27,6 @@ class Taxes extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
if (setting('general.wizard', false)) {
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
$html = view('wizard.taxes.create', compact('codes'))->render();
|
||||
|
||||
return response()->json([
|
||||
@ -75,10 +67,6 @@ class Taxes extends Controller
|
||||
*/
|
||||
public function edit(Tax $tax)
|
||||
{
|
||||
if (setting('general.wizard', false)) {
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
$item = $tax;
|
||||
|
||||
$html = view('wizard.taxes.edit', compact('item'))->render();
|
||||
|
Reference in New Issue
Block a user