1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Laravel V6

This commit is contained in:
David Bomba 2019-09-26 23:00:51 +10:00
parent 515b32fd87
commit 487f93933b
33 changed files with 138 additions and 134 deletions

View File

@ -13,6 +13,7 @@ namespace App\Factory;
use App\DataMapper\ClientSettings;
use App\Models\Client;
use Illuminate\Support\Str;
class ClientFactory
{
@ -28,7 +29,7 @@ class ClientFactory
$client->paid_to_date = 0;
$client->country_id = 4;
$client->is_deleted = 0;
$client->client_hash = str_random(40);
$client->client_hash = Str::random(40);
$client->currency_id = config('ninja.i18n.currency_id');
$client->settings = ClientSettings::defaults();

View File

@ -12,6 +12,7 @@
namespace App\Factory;
use App\Models\InvoiceInvitation;
use Illuminate\Support\Str;
class InvoiceInvitationFactory
{
@ -23,7 +24,7 @@ class InvoiceInvitationFactory
$ii->user_id = $user_id;
$ii->client_contact_id = null;
$ii->invoice_id = null;
$ii->invitation_key = str_random(config('ninja.key_length'));
$ii->invitation_key = Str::random(config('ninja.key_length'));
$ii->transaction_reference = null;
$ii->message_id = null;
$ii->email_error = '';

View File

@ -15,7 +15,7 @@ use App\Transformers\ArraySerializer;
use App\Transformers\EntityTransformer;
use App\Utils\Statics;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Request as Input;
use Illuminate\Support\Facades\Log;
use League\Fractal\Manager;
use League\Fractal\Pagination\IlluminatePaginatorAdapter;

View File

@ -19,6 +19,7 @@ use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Str;
class CreateCompanyToken implements ShouldQueue
{
@ -51,7 +52,7 @@ class CreateCompanyToken implements ShouldQueue
$ct = CompanyToken::create([
'user_id' => $this->user->id,
'account_id' => $this->company->account->id,
'token' => str_random(64),
'token' => Str::random(64),
'name' => $this->user->first_name. ' '. $this->user->last_name,
'company_id' => $this->company->id,
]);

View File

@ -68,6 +68,7 @@ class ClientTransformer extends EntityTransformer
'state' => $client->state ?: '',
'postal_code' => $client->postal_code ?: '',
'country_id' => $client->country_id ?: '',
'industry_id' => $client->industry_id ?: '',
'custom_value1' => $client->custom_value1 ?: '',
'custom_value2' => $client->custom_value2 ?: '',
'custom_value3' => $client->custom_value3 ?: '',

View File

@ -26,7 +26,7 @@ trait MakesHash
*/
public function createHash() : string
{
return str_random(config('ninja.key_length'));
return \Illuminate\Support\Str::random(config('ninja.key_length'));
}
/**
@ -37,7 +37,7 @@ trait MakesHash
*/
public function createDbHash($db) : string
{
return $this->getDbCode($db) . '-' . str_random(config('ninja.key_length'));
return $this->getDbCode($db) . '-' . \Illuminate\Support\Str::random(config('ninja.key_length'));
}
/**

View File

@ -21,8 +21,8 @@ $factory->define(App\Models\ClientContact::class, function (Faker $faker) {
'email_verified_at' => now(),
'email' => $faker->unique()->safeEmail,
'password' => bcrypt('password'),
'remember_token' => str_random(10),
'token' => str_random(64),
'remember_token' => \Illuminate\Support\Str::random(10),
'token' => \Illuminate\Support\Str::random(64),
];
});

View File

@ -30,6 +30,6 @@ $factory->define(App\Models\Client::class, function (Faker $faker) {
'shipping_postal_code' => $faker->postcode,
'shipping_country_id' => 4,
'settings' => new ClientSettings(ClientSettings::defaults()),
'client_hash' => str_random(40),
'client_hash' => \Illuminate\Support\Str::random(40),
];
});

View File

@ -6,7 +6,7 @@ use Faker\Generator as Faker;
$factory->define(App\Models\Company::class, function (Faker $faker) {
return [
'name' => $faker->name,
'company_key' => strtolower(str_random(config('ninja.key_length'))),
'company_key' => strtolower(\Illuminate\Support\Str::random(config('ninja.key_length'))),
'ip' => $faker->ipv4,
'db' => config('database.default'),
'settings' => CompanySettings::defaults(),

View File

@ -21,6 +21,6 @@ $factory->define(App\Models\User::class, function (Faker $faker) {
'email' => config('ninja.testvars.username'),
'email_verified_at' => now(),
'password' => bcrypt(config('ninja.testvars.password')), // secret
'remember_token' => str_random(10),
'remember_token' => \Illuminate\Support\Str::random(10),
];
});

View File

@ -56,7 +56,7 @@ class RandomDataSeeder extends Seeder
'company_id' => $company->id,
'account_id' => $account->id,
'name' => 'test token',
'token' => str_random(64),
'token' => \Illuminate\Support\Str::random(64),
]);
$user->companies()->attach($company->id, [

View File

@ -10,7 +10,7 @@
<div class="card-body">
<form method="POST" action="{{ route('login') }}">
@csrf
<h1>@lang('texts.account_login')</h1>
<h1>@lang::get('texts.account_login')</h1>
@if (Session::has('error'))
<div class="alert alert-danger">
<li>{!! Session::get('error') !!}</li>
@ -23,7 +23,7 @@
<i class="icon-user"></i>
</span>
</div>
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" placeholder="@lang('texts.email')" required autofocus>
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" placeholder="@lang::get('texts.email')" required autofocus>
@if ($errors->has('email'))
<span class="invalid-feedback" role="alert">
@ -38,7 +38,7 @@
<i class="icon-lock"></i>
</span>
</div>
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" placeholder="@lang('texts.password')" required>
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" placeholder="@lang::get('texts.password')" required>
@if ($errors->has('password'))
<span class="invalid-feedback" role="alert">
@ -49,11 +49,11 @@
<div class="row">
<div class="col-6">
<button class="btn btn-primary px-4" type="submit">@lang('texts.login')</button>
<button class="btn btn-primary px-4" type="submit">@lang::get('texts.login')</button>
</div>
<div class="col-6 text-right">
<a class="btn btn-link" href="{{ route('password.request') }}">
@lang('texts.forgot_password')
@lang::get('texts.forgot_password')
</a>
</div>
</div>
@ -91,9 +91,9 @@
<div class="card text-white bg-primary py-5 d-md-down-none" style="width:44%">
<div class="card-body text-center">
<div>
<h2>@lang('texts.sign_up_now')</h2>
<p>@lang('texts.not_a_member_yet')</p>
<a class="btn btn-primary active mt-3" href="{{route('signup') }}">@lang('texts.login_create_an_account')</a>
<h2>@lang::get('texts.sign_up_now')</h2>
<p>@lang::get('texts.not_a_member_yet')</p>
<a class="btn btn-primary active mt-3" href="{{route('signup') }}">@lang::get('texts.login_create_an_account')</a>
</div>
</div>
</div>

View File

@ -16,7 +16,7 @@
@endif
<form method="POST" action="{{ route('password.email') }}">
@csrf
<h1>@lang('texts.password_recovery')</h1>
<h1>@lang::get('texts.password_recovery')</h1>
<p class="text-muted"></p>
<div class="input-group mb-3">
<div class="input-group-prepend">
@ -24,7 +24,7 @@
<i class="icon-user"></i>
</span>
</div>
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" placeholder="@lang('texts.email')" required autofocus>
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" placeholder="@lang::get('texts.email')" required autofocus>
@if ($errors->has('email'))
<span class="invalid-feedback" role="alert">
@ -36,7 +36,7 @@
<div class="row">
<div class="col-6">
<button class="btn btn-primary px-4" type="submit">@lang('texts.send_email')</button>
<button class="btn btn-primary px-4" type="submit">@lang::get('texts.send_email')</button>
</div>
</div>
</form>

View File

@ -12,7 +12,7 @@
<form method="POST" action="{{ route('password.update') }}">
@csrf
<input type="hidden" name="token" value="{{ $token }}">
<h1>@lang('texts.change_password')</h1>
<h1>@lang::get('texts.change_password')</h1>
<p class="text-muted"></p>
<div class="input-group mb-3">
<div class="input-group-prepend">
@ -20,7 +20,7 @@
<i class="icon-user"></i>
</span>
</div>
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" placeholder="@lang('texts.email')" required autofocus>
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" placeholder="@lang::get('texts.email')" required autofocus>
@if ($errors->has('email'))
<span class="invalid-feedback" role="alert">
@ -36,7 +36,7 @@
<i class="icon-lock"></i>
</span>
</div>
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" placeholder="@lang('texts.password')" required>
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" placeholder="@lang::get('texts.password')" required>
@if ($errors->has('password'))
<span class="invalid-feedback" role="alert">
@ -51,12 +51,12 @@
<i class="icon-lock"></i>
</span>
</div>
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" placeholder="@lang('texts.confirm_password')" required>
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" placeholder="@lang::get('texts.confirm_password')" required>
</div>
<div class="row">
<div class="col-6">
<button class="btn btn-primary px-4" type="submit">@lang('texts.change_password')</button>
<button class="btn btn-primary px-4" type="submit">@lang::get('texts.change_password')</button>
</div>
</div>
</form>

View File

@ -1,50 +1,50 @@
<div class="card">
<div class="card-header bg-primary2">@lang('texts.edit_client')</div>
<div class="card-header bg-primary2">@lang::get('texts.edit_client')</div>
<div class="card-body">
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.client_name')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.client_name')</label>
<div class="col-sm-9">
<input name="name" placeholder="@lang('texts.name')" class="form-control" v-model="form.name">
<input name="name" placeholder="@lang::get('texts.name')" class="form-control" v-model="form.name">
<div v-if="form.errors.has('name')" class="text-danger" v-text="form.errors.get('name')"></div>
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.id_number')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.id_number')</label>
<div class="col-sm-9">
<input name="id_number" placeholder="@lang('texts.id_number')" class="form-control" v-model="form.id_number">
<input name="id_number" placeholder="@lang::get('texts.id_number')" class="form-control" v-model="form.id_number">
<div v-if="form.errors.has('id_number')" class="text-danger" v-text="form.errors.get('id_number')"></div>
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.vat_number')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.vat_number')</label>
<div class="col-sm-9">
<input name="vat_number" placeholder="@lang('texts.vat_number')" class="form-control" v-model="form.vat_number">
<input name="vat_number" placeholder="@lang::get('texts.vat_number')" class="form-control" v-model="form.vat_number">
<div v-if="form.errors.has('vat_number')" class="text-danger" v-text="form.errors.get('vat_number')"></div>
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.website')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.website')</label>
<div class="col-sm-9">
<input name="website" placeholder="@lang('texts.website')" class="form-control" v-model="form.website">
<input name="website" placeholder="@lang::get('texts.website')" class="form-control" v-model="form.website">
<div v-if="form.errors.has('website')" class="text-danger" v-text="form.errors.get('website')"></div>
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.custom_value1')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.custom_value1')</label>
<div class="col-sm-9">
<input name="custom_value1" placeholder="@lang('texts.custom_value1')" class="form-control" v-model="form.custom_value1">
<input name="custom_value1" placeholder="@lang::get('texts.custom_value1')" class="form-control" v-model="form.custom_value1">
<div v-if="form.errors.has('custom_value1')" class="text-danger" v-text="form.errors.get('custom_value1')"></div>
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.custom_value2')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.custom_value2')</label>
<div class="col-sm-9">
<input name="custom_value2" placeholder="@lang('texts.custom_value2')" class="form-control" v-model="form.custom_value2">
<input name="custom_value2" placeholder="@lang::get('texts.custom_value2')" class="form-control" v-model="form.custom_value2">
<div v-if="form.errors.has('custom_value2')" class="text-danger" v-text="form.errors.get('custom_value2')"></div>
</div>
</div>

View File

@ -14,46 +14,46 @@
<button type="button" class="btn btn-sm btn-light" @click="copy('copy_shipping')"> {{ trans('texts.copy_shipping') }}</button>
<div class="card-body">
<div class="form-group row">
<label for="name" class="col-lg-3 col-form-label text-right">@lang('texts.address1')</label>
<label for="name" class="col-lg-3 col-form-label text-right">@lang::get('texts.address1')</label>
<div class="col-lg-9">
<input name="address1" placeholder="@lang('texts.address1')" class="form-control" v-model="form.address1">
<input name="address1" placeholder="@lang::get('texts.address1')" class="form-control" v-model="form.address1">
</div>
</div>
<div class="form-group row">
<label for="name" class="col-lg-3 col-form-label text-right">@lang('texts.address2')</label>
<label for="name" class="col-lg-3 col-form-label text-right">@lang::get('texts.address2')</label>
<div class="col-lg-9">
<input name="address2" placeholder="@lang('texts.address2')" class="form-control" v-model="form.address2" id="address2">
<input name="address2" placeholder="@lang::get('texts.address2')" class="form-control" v-model="form.address2" id="address2">
</div>
</div>
<div class="form-group row">
<label for="name" class="col-lg-3 col-form-label text-right">@lang('texts.city')</label>
<label for="name" class="col-lg-3 col-form-label text-right">@lang::get('texts.city')</label>
<div class="col-lg-9">
<input name="city" placeholder="@lang('texts.city')" class="form-control" v-model="form.city" id="city">
<input name="city" placeholder="@lang::get('texts.city')" class="form-control" v-model="form.city" id="city">
</div>
</div>
<div class="form-group row">
<label for="name" class="col-lg-3 col-form-label text-right">@lang('texts.state')</label>
<label for="name" class="col-lg-3 col-form-label text-right">@lang::get('texts.state')</label>
<div class="col-lg-9">
<input name="state" placeholder="@lang('texts.state')" class="form-control" v-model="form.state" id="state">
<input name="state" placeholder="@lang::get('texts.state')" class="form-control" v-model="form.state" id="state">
</div>
</div>
<div class="form-group row">
<label for="name" class="col-lg-3 col-form-label text-right">@lang('texts.postal_code')</label>
<label for="name" class="col-lg-3 col-form-label text-right">@lang::get('texts.postal_code')</label>
<div class="col-lg-9">
<input name="postal_code" placeholder="@lang('texts.postal_code')" class="form-control" v-model="form.postal_code" id="postal_code">
<input name="postal_code" placeholder="@lang::get('texts.postal_code')" class="form-control" v-model="form.postal_code" id="postal_code">
</div>
</div>
<div class="form-group row">
<label for="name" class="col-lg-3 col-form-label text-right">@lang('texts.country')</label>
<label for="name" class="col-lg-3 col-form-label text-right">@lang::get('texts.country')</label>
<div class="col-lg-9">
<input name="country_id" placeholder="@lang('texts.country')" class="form-control" v-model="form.country_id" id="country">
<input name="country_id" placeholder="@lang::get('texts.country')" class="form-control" v-model="form.country_id" id="country">
</div>
</div>
</div>
@ -62,46 +62,46 @@
<button type="button" class="btn btn-sm btn-light" @click="copy('copy_billing')"> {{ trans('texts.copy_billing') }}</button>
<div class="card-body">
<div class="form-group row">
<label for="name" class="col-lg-3 col-form-label text-right">@lang('texts.address1')</label>
<label for="name" class="col-lg-3 col-form-label text-right">@lang::get('texts.address1')</label>
<div class="col-lg-9">
<input name="shipping_address1" placeholder="@lang('texts.address1')" class="form-control" v-model="form.shipping_address1">
<input name="shipping_address1" placeholder="@lang::get('texts.address1')" class="form-control" v-model="form.shipping_address1">
</div>
</div>
<div class="form-group row">
<label for="name" class="col-lg-3 col-form-label text-right">@lang('texts.address2')</label>
<label for="name" class="col-lg-3 col-form-label text-right">@lang::get('texts.address2')</label>
<div class="col-lg-9">
<input name="shipping_address2" placeholder="@lang('texts.address2')" class="form-control" v-model="form.shipping_address2" id="address2">
<input name="shipping_address2" placeholder="@lang::get('texts.address2')" class="form-control" v-model="form.shipping_address2" id="address2">
</div>
</div>
<div class="form-group row">
<label for="name" class="col-lg-3 col-form-label text-right">@lang('texts.city')</label>
<label for="name" class="col-lg-3 col-form-label text-right">@lang::get('texts.city')</label>
<div class="col-lg-9">
<input name="shipping_city" placeholder="@lang('texts.city')" class="form-control" v-model="form.shipping_city" id="city">
<input name="shipping_city" placeholder="@lang::get('texts.city')" class="form-control" v-model="form.shipping_city" id="city">
</div>
</div>
<div class="form-group row">
<label for="name" class="col-lg-3 col-form-label text-right">@lang('texts.state')</label>
<label for="name" class="col-lg-3 col-form-label text-right">@lang::get('texts.state')</label>
<div class="col-lg-9">
<input name="shipping_state" placeholder="@lang('texts.state')" class="form-control" v-model="form.shipping_state" id="state">
<input name="shipping_state" placeholder="@lang::get('texts.state')" class="form-control" v-model="form.shipping_state" id="state">
</div>
</div>
<div class="form-group row">
<label for="name" class="col-lg-3 col-form-label text-right">@lang('texts.postal_code')</label>
<label for="name" class="col-lg-3 col-form-label text-right">@lang::get('texts.postal_code')</label>
<div class="col-lg-9">
<input name="shipping_postal_code" placeholder="@lang('texts.postal_code')" class="form-control" v-model="form.shipping_postal_code" id="postal_code">
<input name="shipping_postal_code" placeholder="@lang::get('texts.postal_code')" class="form-control" v-model="form.shipping_postal_code" id="postal_code">
</div>
</div>
<div class="form-group row">
<label for="name" class="col-lg-3 col-form-label text-right">@lang('texts.country')</label>
<label for="name" class="col-lg-3 col-form-label text-right">@lang::get('texts.country')</label>
<div class="col-lg-9">
<input name="shipping_country_id" placeholder="@lang('texts.country')" class="form-control" v-model="form.shipping_country_id" id="country">
<input name="shipping_country_id" placeholder="@lang::get('texts.country')" class="form-control" v-model="form.shipping_country_id" id="country">
</div>
</div>
</div>

View File

@ -1,6 +1,6 @@
<div class="col-lg-5">
<div class="card">
<div class="card-header bg-primary">@lang('texts.settings')</div>
<div class="card-header bg-primary">@lang::get('texts.settings')</div>
<div class="card-body">
@ -20,42 +20,42 @@
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.currency')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.currency')</label>
<div class="col-sm-9">
{{ html()->input('name')->placeholder(__('texts.client_name'))->value($client->present()->name)->class('form-control')->id('name') }}
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.id_number')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.id_number')</label>
<div class="col-sm-9">
{{ html()->input('id_number')->placeholder(__('texts.id_number'))->value($client->id_number)->class('form-control')->id('id_number') }}
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.vat_number')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.vat_number')</label>
<div class="col-sm-9">
{{ html()->input('vat_number')->placeholder(__('texts.vat_number'))->value($client->vat_number)->class('form-control')->id('vat_number') }}
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.website')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.website')</label>
<div class="col-sm-9">
{{ html()->input('website')->placeholder(__('texts.website'))->value($client->website)->class('form-control')->id('website') }}
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.custom_value1')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.custom_value1')</label>
<div class="col-sm-9">
{{ html()->input('custom_value1')->placeholder(__('texts.custom_value1'))->value($client->custom_value1)->class('form-control')->id('custom_value1') }}
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.custom_value2')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.custom_value2')</label>
<div class="col-sm-9">
{{ html()->input('custom_value2')->placeholder(__('texts.custom_value2'))->value($client->custom_value2)->class('form-control')->id('custom_value2') }}
</div>

View File

@ -1,49 +1,49 @@
<div class="card-body">
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.first_name')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.first_name')</label>
<div class="col-sm-9">
<input name="id" type="hidden" v-model="contact.client_id" value="{{ $client->present()->id ?: -1}}">
<input ref="first_name" name="first_name" placeholder="@lang('texts.first_name')" class="form-control" v-model="contact.first_name">
<input ref="first_name" name="first_name" placeholder="@lang::get('texts.first_name')" class="form-control" v-model="contact.first_name">
<div v-if="form.errors.has('contacts.'+key+'.first_name')" class="text-danger" v-text="form.errors.get('contacts.'+key+'.first_name')"></div>
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.last_name')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.last_name')</label>
<div class="col-sm-9">
<input name="last_name" placeholder="@lang('texts.last_name')" class="form-control" v-model="contact.last_name">
<input name="last_name" placeholder="@lang::get('texts.last_name')" class="form-control" v-model="contact.last_name">
<div v-if="form.errors.has('contacts.'+key+'.last_name')" class="text-danger" v-text="form.errors.get('contacts.'+key+'.last_name')"></div>
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.email')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.email')</label>
<div class="col-sm-9">
<input name="email" placeholder="@lang('texts.email')" class="form-control" v-model="contact.email">
<input name="email" placeholder="@lang::get('texts.email')" class="form-control" v-model="contact.email">
<div v-if="form.errors.has('contacts.'+key+'.email')" class="text-danger" v-text="form.errors.get('contacts.'+key+'.email')"></div>
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.phone')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.phone')</label>
<div class="col-sm-9">
<input name="phone" placeholder="@lang('texts.phone')" class="form-control" v-model="contact.phone">
<input name="phone" placeholder="@lang::get('texts.phone')" class="form-control" v-model="contact.phone">
<div v-if="form.errors.has('contacts.'+key+'.phone')" class="text-danger" v-text="form.errors.get('contacts.'+key+'.phone')"></div>
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.custom_value1')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.custom_value1')</label>
<div class="col-sm-9">
<input name="custom_value1" placeholder="@lang('texts.custom_value1')" class="form-control" v-model="contact.custom_value1">
<input name="custom_value1" placeholder="@lang::get('texts.custom_value1')" class="form-control" v-model="contact.custom_value1">
<div v-if="form.errors.has('contacts.'+key+'.custom_value1')" class="text-danger" v-text="form.errors.get('contacts.'+key+'.custom_value1')"></div>
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.custom_value2')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.custom_value2')</label>
<div class="col-sm-9">
<input name="custom_value2" placeholder="@lang('texts.custom_value2')" class="form-control" v-model="contact.custom_value2">
<input name="custom_value2" placeholder="@lang::get('texts.custom_value2')" class="form-control" v-model="contact.custom_value2">
<div v-if="form.errors.has('contacts.'+key+'.custom_value2')" class="text-danger" v-text="form.errors.get('contacts.'+key+'.custom_value2')"></div>
</div>
</div>

View File

@ -9,10 +9,10 @@ Header Title
{{-- Body --}}
{{ $user }}
@lang('texts.confirmation_message')
@lang::get('texts.confirmation_message')
@component('mail::button', ['url' => url("/user/confirm/{$user->confirmation_code}")])
@lang('texts.confirm')
@lang::get('texts.confirm')
@endcomponent
{{-- Subcopy --}}

View File

@ -83,7 +83,7 @@
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-menu-lg">
<div class="dropdown-header text-center">
<strong>@lang('texts.manage_companies')</strong>
<strong>@lang::get('texts.manage_companies')</strong>
</div>
@foreach($companies as $company) <!-- List all remaining companies here-->
@ -103,7 +103,7 @@
<!-- Add Company-->
@if(count($companies) < 5)
<a class="dropdown-item" href="{{ route('user.logout') }}">
<i class="fa fa-plus"></i> @lang('texts.add_company')</a>
<i class="fa fa-plus"></i> @lang::get('texts.add_company')</a>
@endif
</div>
</li>
@ -119,7 +119,7 @@
<a class="dropdown-item" href="#">
<i class="fa fa-user"></i> Profile</a>
<a class="dropdown-item" href="{{ route('user.settings') }}">
<i class="fa fa-wrench"></i> @lang('texts.settings')</a>
<i class="fa fa-wrench"></i> @lang::get('texts.settings')</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ route('user.logout') }}">

View File

@ -72,7 +72,7 @@
</div>
<div class="col-6 text-right">
<a class="btn btn-link" href="{{ route('client.password.request') }}">
@lang('texts.forgot_password')
@lang::get('texts.forgot_password')
</a>
</div>
</div>
@ -85,9 +85,9 @@
<!--<div class="card text-white bg-primary py-5 d-md-down-none" style="width:44%">
<div class="card-body text-center">
<div>
<h2>@lang('texts.sign_up_now')</h2>
<p>@lang('texts.not_a_member_yet')</p>
<a class="btn btn-primary active mt-3" href="{{route('signup') }}">@lang('texts.login_create_an_account')</a>
<h2>@lang::get('texts.sign_up_now')</h2>
<p>@lang::get('texts.not_a_member_yet')</p>
<a class="btn btn-primary active mt-3" href="{{route('signup') }}">@lang::get('texts.login_create_an_account')</a>
</div>
</div>
</div>

View File

@ -15,7 +15,7 @@
@endif
<form method="POST" action="{{ route($passwordEmailRoute) }}">
@csrf
<h1>@lang('texts.password_recovery')</h1>
<h1>@lang::get('texts.password_recovery')</h1>
<p class="text-muted"></p>
<div class="input-group mb-3">
<div class="input-group-prepend">
@ -23,7 +23,7 @@
<i class="icon-user"></i>
</span>
</div>
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" placeholder="@lang('texts.email')" required autofocus>
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" placeholder="@lang::get('texts.email')" required autofocus>
@if ($errors->has('email'))
<span class="invalid-feedback" role="alert">
@ -35,7 +35,7 @@
<div class="row">
<div class="col-6">
<button class="btn btn-primary px-4" type="submit">@lang('texts.send_email')</button>
<button class="btn btn-primary px-4" type="submit">@lang::get('texts.send_email')</button>
</div>
</div>
</form>

View File

@ -12,7 +12,7 @@
<form method="POST" action="{{ route('client.password.update') }}">
@csrf
<input type="hidden" name="token" value="{{ $token }}">
<h1>@lang('texts.change_password')</h1>
<h1>@lang::get('texts.change_password')</h1>
<p class="text-muted"></p>
<div class="input-group mb-3">
<div class="input-group-prepend">
@ -20,7 +20,7 @@
<i class="icon-user"></i>
</span>
</div>
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" placeholder="@lang('texts.email')" required autofocus>
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" placeholder="@lang::get('texts.email')" required autofocus>
@if ($errors->has('email'))
<span class="invalid-feedback" role="alert">
@ -36,7 +36,7 @@
<i class="icon-lock"></i>
</span>
</div>
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" placeholder="@lang('texts.password')" required>
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" placeholder="@lang::get('texts.password')" required>
@if ($errors->has('password'))
<span class="invalid-feedback" role="alert">
@ -51,12 +51,12 @@
<i class="icon-lock"></i>
</span>
</div>
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" placeholder="@lang('texts.confirm_password')" required>
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" placeholder="@lang::get('texts.confirm_password')" required>
</div>
<div class="row">
<div class="col-6">
<button class="btn btn-primary px-4" type="submit">@lang('texts.change_password')</button>
<button class="btn btn-primary px-4" type="submit">@lang::get('texts.change_password')</button>
</div>
</div>
</form>

View File

@ -1,8 +1,8 @@
<div class="card" id="localization">
<div class="card-header bg-primary2">@lang('texts.localization')</div>
<div class="card-header bg-primary2">@lang::get('texts.localization')</div>
<div class="card-body">
<div class="form-group row">
<label for="name" class="col-sm-3 col-form-label text-right">@lang('texts.client_name')</label>
<label for="name" class="col-sm-3 col-form-label text-right">@lang::get('texts.client_name')</label>
<div class="col-sm-9">
<v-select v-model="selected" :options="options"></v-select>
<div v-if="form.errors.has('name')" class="text-danger" v-text="form.errors.get('name')"></div>

View File

@ -4,63 +4,63 @@
<li class="nav-item ">
<a class="nav-link" href="{{ route('dashboard.index') }}">
<i class="nav-icon icon-speedometer"></i> @lang('texts.dashboard')
<i class="nav-icon icon-speedometer"></i> @lang::get('texts.dashboard')
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/clients">
<i class="nav-icon icon-user"></i> @lang('texts.clients')</a>
<i class="nav-icon icon-user"></i> @lang::get('texts.clients')</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ route('invoices.index') }}">
<i class="nav-icon icon-notebook"></i> @lang('texts.invoices')</a>
<i class="nav-icon icon-notebook"></i> @lang::get('texts.invoices')</a>
</li>
<li class="nav-item">
<a class="nav-link" href="typography.html">
<i class="nav-icon icon-wallet"></i> @lang('texts.payments')</a>
<i class="nav-icon icon-wallet"></i> @lang::get('texts.payments')</a>
</li>
<li class="nav-item">
<a class="nav-link" href="typography.html">
<i class="nav-icon icon-docs"></i> @lang('texts.recurring')</a>
<i class="nav-icon icon-docs"></i> @lang::get('texts.recurring')</a>
</li>
<li class="nav-item">
<a class="nav-link" href="typography.html">
<i class="nav-icon icon-badge"></i> @lang('texts.credits')</a>
<i class="nav-icon icon-badge"></i> @lang::get('texts.credits')</a>
</li>
<li class="nav-item">
<a class="nav-link" href="typography.html">
<i class="nav-icon icon-vector"></i> @lang('texts.quotes')</a>
<i class="nav-icon icon-vector"></i> @lang::get('texts.quotes')</a>
</li>
<li class="nav-item">
<a class="nav-link" href="typography.html">
<i class="nav-icon icon-wrench"></i> @lang('texts.projects')</a>
<i class="nav-icon icon-wrench"></i> @lang::get('texts.projects')</a>
</li>
<li class="nav-item">
<a class="nav-link" href="typography.html">
<i class="nav-icon icon-grid"></i> @lang('texts.tasks')</a>
<i class="nav-icon icon-grid"></i> @lang::get('texts.tasks')</a>
</li>
<li class="nav-item">
<a class="nav-link" href="typography.html">
<i class="nav-icon icon-envelope-open"></i> @lang('texts.expenses')</a>
<i class="nav-icon icon-envelope-open"></i> @lang::get('texts.expenses')</a>
</li>
<li class="nav-item">
<a class="nav-link" href="typography.html">
<i class="nav-icon icon-bell"></i> @lang('texts.vendors')</a>
<i class="nav-icon icon-bell"></i> @lang::get('texts.vendors')</a>
</li>
<li class="nav-item">
<a class="nav-link" href="typography.html">
<i class="nav-icon icon-printer"></i> @lang('texts.reports')</a>
<i class="nav-icon icon-printer"></i> @lang::get('texts.reports')</a>
</li>
</ul>
</nav>

View File

@ -12,7 +12,7 @@
<span class="align-items-center" style="width:100%; display: block; text-align: center; padding:30px;">
<img src="images/logo.png" width="100px" height="100px">
</span>
<h1 style="text-align: center;">@lang('texts.login_create_an_account')</h1>
<h1 style="text-align: center;">@lang::get('texts.login_create_an_account')</h1>
<p class="text-muted"></p>
<form method="POST" action="{{ route('signup.submit')}}">
@ -23,7 +23,7 @@
<i class="icon-user"></i>
</span>
</div>
<input id="first_name" type="text" class="form-control{{ $errors->has('first_name') ? ' is-invalid' : '' }}" name="first_name" value="{{ old('first_name') }}" placeholder="@lang('texts.first_name')" required autofocus>
<input id="first_name" type="text" class="form-control{{ $errors->has('first_name') ? ' is-invalid' : '' }}" name="first_name" value="{{ old('first_name') }}" placeholder="@lang::get('texts.first_name')" required autofocus>
@if ($errors->has('first_name'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('first_name') }}</strong>
@ -38,7 +38,7 @@
<i class="icon-user"></i>
</span>
</div>
<input id="last_name" type="text" class="form-control{{ $errors->has('last_name') ? ' is-invalid' : '' }}" name="last_name" value="{{ old('last_name') }}" placeholder="@lang('texts.last_name')" required autofocus>
<input id="last_name" type="text" class="form-control{{ $errors->has('last_name') ? ' is-invalid' : '' }}" name="last_name" value="{{ old('last_name') }}" placeholder="@lang::get('texts.last_name')" required autofocus>
@if ($errors->has('last_name'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('last_name') }}</strong>
@ -51,7 +51,7 @@
<div class="input-group-prepend">
<span class="input-group-text">@</span>
</div>
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" placeholder="@lang('texts.email')" required autofocus>
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" placeholder="@lang::get('texts.email')" required autofocus>
@if ($errors->has('email'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('email') }}</strong>
@ -70,7 +70,7 @@
<i class="icon-lock"></i>
</span>
</div>
<input id="password" type="password" class="form-control" {{ $errors->has('password') ? ' is-invalid' : '' }} name="password" placeholder="@lang('texts.password')" required>
<input id="password" type="password" class="form-control" {{ $errors->has('password') ? ' is-invalid' : '' }} name="password" placeholder="@lang::get('texts.password')" required>
@if ($errors->has('password'))
<span class="invalid-feedback" role="alert">
@ -82,7 +82,7 @@
<div class="form-check" style="margin-top:10px; margin-bottom: 10px;">
<input class="form-check-input" type="checkbox" id="terms_of_service" name="terms_of_service" value="1" v-model="checked1" {{(old('terms_of_service') == "1") ? 'checked': ''}}>
<label class="form-check-label" for="terms_of_service">
@lang('texts.agree_to_terms', ['terms' => ''])<a href=" {{config('ninja.terms_of_service_url.' . config('ninja.environment')) }}" target="_blank">@lang('texts.terms_of_service')</a>
@lang::get('texts.agree_to_terms', ['terms' => ''])<a href=" {{config('ninja.terms_of_service_url.' . config('ninja.environment')) }}" target="_blank">@lang::get('texts.terms_of_service')</a>
</label>
</div>
@ -90,12 +90,12 @@
<div class="form-check" style="margin-top:10px; margin-bottom: 10px;">
<input class="form-check-input" type="checkbox" id="privacy_policy" name="privacy_policy" value="1" v-model="checked2" {{(old('privacy_policy') == "1") ? 'checked': ''}}>
<label class="form-check-label" for="privacy_policy">
@lang('texts.agree_to_terms', ['terms' => ''])<a href=" {{config('ninja.privacy_policy_url.' . config('ninja.environment')) }}" target="_blank">@lang('texts.privacy_policy')</a>
@lang::get('texts.agree_to_terms', ['terms' => ''])<a href=" {{config('ninja.privacy_policy_url.' . config('ninja.environment')) }}" target="_blank">@lang::get('texts.privacy_policy')</a>
</label>
</div>
<button class="btn btn-block btn-success" type="submit" :disabled="!isDisabled">@lang('texts.create_account')</button>
<button class="btn btn-block btn-success" type="submit" :disabled="!isDisabled">@lang::get('texts.create_account')</button>
</div>
</form>

View File

@ -21,7 +21,7 @@
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
© {{ date('Y') }} {{ config('app.name') }}. @lang::get('All rights reserved.')
@endcomponent
@endslot
@endcomponent

View File

@ -21,7 +21,7 @@
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
© {{ date('Y') }} {{ config('app.name') }}. @lang::get('All rights reserved.')
@endcomponent
@endslot
@endcomponent

View File

@ -21,7 +21,7 @@
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
© {{ date('Y') }} {{ config('app.name') }}. @lang::get('All rights reserved.')
@endcomponent
@endslot
@endcomponent

View File

@ -4,9 +4,9 @@
# {{ $greeting }}
@else
@if ($level === 'error')
# @lang('Whoops!')
# @lang::get('Whoops!')
@else
# @lang('Hello!')
# @lang::get('Hello!')
@endif
@endif
@ -43,13 +43,13 @@
@if (! empty($salutation))
{{ $salutation }}
@else
@lang('Regards'),<br>{{ config('app.name') }}
@lang::get('Regards'),<br>{{ config('app.name') }}
@endif
{{-- Subcopy --}}
@isset($actionText)
@slot('subcopy')
@lang(
@lang::get(
"If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\n".
'into your web browser: [:actionURL](:actionURL)',
[

View File

@ -59,7 +59,7 @@ class ClientPortalTest extends DuskTestCase
'company_id' => $company->id,
'account_id' => $account->id,
'name' => 'test token',
'token' => str_random(64),
'token' => \Illuminate\Support\Str::random(64),
]);
$user->companies()->attach($company->id, [

View File

@ -157,7 +157,7 @@ class LoginTest extends TestCase
$ct = CompanyToken::create([
'user_id' => $user->id,
'account_id' => $account->id,
'token' => str_random(64),
'token' => \Illuminate\Support\Str::random(64),
'name' => $user->first_name. ' '. $user->last_name,
'company_id' => $company->id,
]);

View File

@ -62,7 +62,7 @@ class MultiDBUserTest extends TestCase
'phone' => '55555',
'email_verified_at' => now(),
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
'remember_token' => str_random(10),
'remember_token' => \Illuminate\Support\Str::random(10),
'email' => 'db1@example.com',
'oauth_user_id' => '123',
// 'account_id' => $account->id,
@ -75,7 +75,7 @@ class MultiDBUserTest extends TestCase
'phone' => '55555',
'email_verified_at' => now(),
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
'remember_token' => str_random(10),
'remember_token' => \Illuminate\Support\Str::random(10),
'email' => 'db2@example.com',
'oauth_user_id' => 'abc',
// 'account_id' => $account2->id,