Merge pull request #1568 from cuneytsenturk/master
replace url to route
This commit is contained in:
commit
2d4d429758
@ -45,7 +45,7 @@ class Permissions extends ApiController
|
||||
{
|
||||
$permission = $this->dispatch(new CreatePermission($request));
|
||||
|
||||
return $this->response->created(url('api/permissions/' . $permission->id));
|
||||
return $this->response->created(route('api.permissions.show', $permission->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Roles extends ApiController
|
||||
{
|
||||
$role = $this->dispatch(new CreateRole($request));
|
||||
|
||||
return $this->response->created(url('api/roles/' . $role->id));
|
||||
return $this->response->created(route('api.roles.show', $role->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ class Users extends ApiController
|
||||
{
|
||||
$user = $this->dispatch(new CreateUser($request));
|
||||
|
||||
return $this->response->created(url('api/users/' . $user->id));
|
||||
return $this->response->created(route('api.users.show', $user->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ class Accounts extends ApiController
|
||||
{
|
||||
$account = $this->dispatch(new CreateAccount($request));
|
||||
|
||||
return $this->response->created(url('api/accounts/' . $account->id));
|
||||
return $this->response->created(route('api.accounts.show', $account->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Reconciliations extends ApiController
|
||||
{
|
||||
$reconciliation = $this->dispatch(new CreateReconciliation($request));
|
||||
|
||||
return $this->response->created(url('api/reconciliations/' . $reconciliation->id));
|
||||
return $this->response->created(route('api.reconciliations.show', $reconciliation->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Transactions extends ApiController
|
||||
{
|
||||
$transaction = $this->dispatch(new CreateTransaction($request));
|
||||
|
||||
return $this->response->created(url('api/transactions/' . $transaction->id));
|
||||
return $this->response->created(route('api.transactions.show', $transaction->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -75,7 +75,7 @@ class Transfers extends ApiController
|
||||
{
|
||||
$transfer = $this->dispatch(new CreateTransfer($request));
|
||||
|
||||
return $this->response->created(url('api/transfers/' . $transfer->id));
|
||||
return $this->response->created(route('api.transfers.show', $transfer->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,7 +56,7 @@ class Companies extends ApiController
|
||||
{
|
||||
$company = $this->dispatch(new CreateCompany($request));
|
||||
|
||||
return $this->response->created(url('api/companies/' . $company->id));
|
||||
return $this->response->created(route('api.companies.show', $company->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,7 +67,7 @@ class Contacts extends ApiController
|
||||
{
|
||||
$contact = $this->dispatch(new CreateContact($request));
|
||||
|
||||
return $this->response->created(url('api/contacts/' . $contact->id));
|
||||
return $this->response->created(route('api.contacts.show', $contact->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@ class Items extends ApiController
|
||||
{
|
||||
$item = $this->dispatch(new CreateItem($request));
|
||||
|
||||
return $this->response->created(url('api/items/' . $item->id));
|
||||
return $this->response->created(route('api.items.show', $item->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Reports extends ApiController
|
||||
{
|
||||
$report = $this->dispatch(new CreateReport($request));
|
||||
|
||||
return $this->response->created(url('api/reports/' . $report->id));
|
||||
return $this->response->created(route('api.reports.show', $report->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Bills extends ApiController
|
||||
{
|
||||
$bill = $this->dispatch(new CreateBill($request));
|
||||
|
||||
return $this->response->created(url('api/bills/' . $bill->id));
|
||||
return $this->response->created(route('api.bills.show', $bill->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ class Invoices extends ApiController
|
||||
{
|
||||
$invoice = $this->dispatch(new CreateInvoice($request));
|
||||
|
||||
return $this->response->created(url('api/invoices/' . $invoice->id));
|
||||
return $this->response->created(route('api.invoices.show', $invoice->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Categories extends ApiController
|
||||
{
|
||||
$category = $this->dispatch(new CreateCategory($request));
|
||||
|
||||
return $this->response->created(url('api/categories/' . $category->id));
|
||||
return $this->response->created(route('api.categories.show', $category->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ class Currencies extends ApiController
|
||||
{
|
||||
$currency = $this->dispatch(new CreateCurrency($request));
|
||||
|
||||
return $this->response->created(url('api/currencies/' . $currency->id));
|
||||
return $this->response->created(route('api.currencies.show', $currency->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ class Settings extends ApiController
|
||||
{
|
||||
$setting = Setting::create($request->all());
|
||||
|
||||
return $this->response->created(url('api/settings/'.$setting->id));
|
||||
return $this->response->created(route('api.settings.show', $setting->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Taxes extends ApiController
|
||||
{
|
||||
$tax = $this->dispatch(new CreateTax($request));
|
||||
|
||||
return $this->response->created(url('api/taxes/' . $tax->id));
|
||||
return $this->response->created(route('api.taxes.show', $tax->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -64,8 +64,9 @@ class Search extends Controller
|
||||
'href' => route('invoices.show', $invoice->id),
|
||||
];
|
||||
}
|
||||
}/*
|
||||
}
|
||||
|
||||
/*
|
||||
$income_transactions = Transaction::income()->usingSearchString($keyword)->get();
|
||||
|
||||
if ($income_transactions->count()) {
|
||||
@ -78,7 +79,8 @@ class Search extends Controller
|
||||
'href' => url('sales/revenues/' . $transaction->id),
|
||||
];
|
||||
}
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
$customers = Contact::customer()->enabled()->usingSearchString($search->keyword)->get();
|
||||
|
||||
@ -107,6 +109,7 @@ class Search extends Controller
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
$payments = Transaction::expense()->usingSearchString($keyword)->get();
|
||||
|
||||
@ -120,7 +123,8 @@ class Search extends Controller
|
||||
'href' => url('sales/revenues/' . $revenue->id),
|
||||
];
|
||||
}
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
$vendors = Contact::vendor()->enabled()->usingSearchString($search->keyword)->get();
|
||||
|
||||
|
@ -37,7 +37,7 @@ class Notifications
|
||||
|
||||
$message = str_replace('#path#', $path, $notification->message);
|
||||
$message = str_replace('#token#', csrf_token(), $message);
|
||||
$message = str_replace('#url#', url('/'), $message);
|
||||
$message = str_replace('#url#', route('dashboard'), $message);
|
||||
|
||||
if (!setting('notifications.' . $notification->path . '.' . $notification->id . '.status', 1)) {
|
||||
continue;
|
||||
|
@ -99,9 +99,11 @@ class Version200 extends Listener
|
||||
setting()->load(true);
|
||||
|
||||
// Override settings
|
||||
config(['app.url' => url('/')]);
|
||||
config(['app.url' => route('dashboard')]);
|
||||
config(['app.timezone' => setting('general.timezone', 'UTC')]);
|
||||
|
||||
date_default_timezone_set(config('app.timezone'));
|
||||
|
||||
app()->setLocale(setting('general.default_locale'));
|
||||
|
||||
$updated_settings = [
|
||||
|
@ -45,7 +45,7 @@ class Reset extends Notification
|
||||
{
|
||||
return (new MailMessage)
|
||||
->line(trans('auth.notification.message_1'))
|
||||
->action(trans('auth.notification.button'), url('auth/reset', $this->token))
|
||||
->action(trans('auth.notification.button'), route('auth.reset', $this->token))
|
||||
->line(trans('auth.notification.message_2'));
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ trait SiteApi
|
||||
$headers['headers'] = [
|
||||
'Authorization' => 'Bearer ' . setting('apps.api_key'),
|
||||
'Accept' => 'application/json',
|
||||
'Referer' => app()->runningInConsole() ? config('app.url') : url('/'),
|
||||
'Referer' => app()->runningInConsole() ? config('app.url') : route('dashboard'),
|
||||
'Akaunting' => version('short'),
|
||||
'Language' => language()->getShortCode(),
|
||||
'Information' => json_encode(Info::all()),
|
||||
|
@ -56,7 +56,7 @@ class Overrider
|
||||
}
|
||||
|
||||
// Set app url dynamically
|
||||
config(['app.url' => url('/')]);
|
||||
config(['app.url' => route('dashboard')]);
|
||||
}
|
||||
|
||||
protected static function loadCurrencies()
|
||||
|
@ -10,7 +10,7 @@
|
||||
<i class="fas fa-file-image display-3"></i>
|
||||
@else
|
||||
<a href="#" class="avatar">
|
||||
<img src="{{ url('uploads/' . $file->id) }}" alt="{{ $file->basename }}">
|
||||
<img src="{{ route('uploads.get', $file->id) }}" alt="{{ $file->basename }}">
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
@ -37,7 +37,7 @@
|
||||
@endif
|
||||
@endpermission
|
||||
|
||||
<a href="{{ url('uploads/' . $file->id . '/download') }}" type="button" class="btn btn-sm btn-info text-white header-button-top">
|
||||
<a href="{{ rotue('uploads.download', $file->id) }}" type="button" class="btn btn-sm btn-info text-white header-button-top">
|
||||
<i class="fas fa-file-download"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -67,7 +67,7 @@
|
||||
'<div v-if="form.loading" class="aka-loader-frame"><div class="aka-loader"></div></div> <span v-if="!form.loading" class="btn-inner--icon"><i class="fas fa-save"></i></span>' . '<span v-if="!form.loading" class="btn-inner--text"> ' . trans('general.save') . '</span>',
|
||||
[':disabled' => 'form.loading', 'type' => 'submit', 'class' => 'btn btn-icon btn-success button-submit header-button-top', 'data-loading-text' => trans('general.loading')]) !!}
|
||||
|
||||
<a href="{{ url('wizard/currencies') }}" id="wizard-skip" class="btn btn-icon btn-white header-button-top">
|
||||
<a href="{{ route('wizard.currencies.index') }}" id="wizard-skip" class="btn btn-icon btn-white header-button-top">
|
||||
<span class="btn-inner--icon"><i class="fas fa-arrow-right"></i></span>
|
||||
<span class="btn-inner--text">{{ trans('general.skip') }}</span>
|
||||
</a>
|
||||
|
@ -123,13 +123,13 @@
|
||||
<div class="card-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<a href="{{ url('wizard/companies') }}" class="btn btn-icon btn-white header-button-top">
|
||||
<a href="{{ route('wizard.companies.index') }}" class="btn btn-icon btn-white header-button-top">
|
||||
<span class="btn-inner--icon"><i class="fas fa-arrow-left"></i></span>
|
||||
<span class="btn-inner--text">{{ trans('pagination.previous') }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-6 text-right">
|
||||
<a href="{{ url('wizard/taxes') }}" id="wizard-skip" class="btn btn-icon btn-white header-button-top">
|
||||
<a href="{{ route('wizard.taxes.index') }}" id="wizard-skip" class="btn btn-icon btn-white header-button-top">
|
||||
<span class="btn-inner--icon"><i class="fas fa-arrow-right"></i></span>
|
||||
<span class="btn-inner--text">{{ trans('pagination.next') }}</span>
|
||||
</a>
|
||||
|
@ -50,13 +50,13 @@
|
||||
<div class="card-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<a href="{{ url('wizard/taxes') }}" class="btn btn-icon btn-white header-button-top">
|
||||
<a href="{{ route('wizard.taxes.index') }}" class="btn btn-icon btn-white header-button-top">
|
||||
<span class="btn-inner--icon"><i class="fas fa-arrow-left"></i></span>
|
||||
<span class="btn-inner--text">{{ trans('pagination.previous') }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-6 text-right">
|
||||
<a href="{{ url('/') }}" id="wizard-skip" class="btn btn-icon btn-success header-button-top">
|
||||
<a href="{{ route('dashboard') }}" id="wizard-skip" class="btn btn-icon btn-success header-button-top">
|
||||
<span class="btn-inner--icon"><i class="fa fa-tachometer-alt"></i></span>
|
||||
<span class="btn-inner--text">{{ trans('general.go_to_dashboard') }}</span>
|
||||
</a>
|
||||
|
@ -106,13 +106,13 @@
|
||||
<div class="card-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<a href="{{ url('wizard/currencies') }}" class="btn btn-icon btn-white header-button-top">
|
||||
<a href="{{ route('wizard.currencies.index') }}" class="btn btn-icon btn-white header-button-top">
|
||||
<span class="btn-inner--icon"><i class="fas fa-arrow-left"></i></span>
|
||||
<span class="btn-inner--text">{{ trans('pagination.previous') }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-6 text-right">
|
||||
<a href="{{ url('wizard/finish') }}" id="wizard-skip" class="btn btn-icon btn-white header-button-top">
|
||||
<a href="{{ route('wizard.finish.index') }}" id="wizard-skip" class="btn btn-icon btn-white header-button-top">
|
||||
<span class="btn-inner--icon"><i class="fas fa-arrow-right"></i></span>
|
||||
<span class="btn-inner--text">{{ trans('pagination.next') }}</span>
|
||||
</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user