diff --git a/app/Factory/ClientFactory.php b/app/Factory/ClientFactory.php index 22baaec66e16..82c5abae6d60 100644 --- a/app/Factory/ClientFactory.php +++ b/app/Factory/ClientFactory.php @@ -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(); diff --git a/app/Factory/InvoiceInvitationFactory.php b/app/Factory/InvoiceInvitationFactory.php index 580a2e918a75..98a9b075e538 100644 --- a/app/Factory/InvoiceInvitationFactory.php +++ b/app/Factory/InvoiceInvitationFactory.php @@ -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 = ''; diff --git a/app/Http/Controllers/BaseController.php b/app/Http/Controllers/BaseController.php index ae2af8e243bc..6eeaa13e16e9 100644 --- a/app/Http/Controllers/BaseController.php +++ b/app/Http/Controllers/BaseController.php @@ -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; diff --git a/app/Jobs/Company/CreateCompanyToken.php b/app/Jobs/Company/CreateCompanyToken.php index 2df8e8d84dca..87b8b48e28f9 100644 --- a/app/Jobs/Company/CreateCompanyToken.php +++ b/app/Jobs/Company/CreateCompanyToken.php @@ -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, ]); diff --git a/app/Transformers/ClientTransformer.php b/app/Transformers/ClientTransformer.php index 07537bf24073..df9b449b5f02 100644 --- a/app/Transformers/ClientTransformer.php +++ b/app/Transformers/ClientTransformer.php @@ -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 ?: '', diff --git a/app/Utils/Traits/MakesHash.php b/app/Utils/Traits/MakesHash.php index 867e8a0a81da..d59b4ce1eab2 100644 --- a/app/Utils/Traits/MakesHash.php +++ b/app/Utils/Traits/MakesHash.php @@ -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')); } /** diff --git a/database/factories/ClientContactFactory.php b/database/factories/ClientContactFactory.php index aaeb1ecf2ae9..e67302e1cee4 100644 --- a/database/factories/ClientContactFactory.php +++ b/database/factories/ClientContactFactory.php @@ -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), ]; }); diff --git a/database/factories/ClientFactory.php b/database/factories/ClientFactory.php index 1f8a55cf212e..7ff7106c6092 100644 --- a/database/factories/ClientFactory.php +++ b/database/factories/ClientFactory.php @@ -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), ]; }); diff --git a/database/factories/CompanyFactory.php b/database/factories/CompanyFactory.php index 6297b6e698c1..67727aab660d 100644 --- a/database/factories/CompanyFactory.php +++ b/database/factories/CompanyFactory.php @@ -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(), diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index e686612a4b0c..cf974883efc6 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -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), ]; }); diff --git a/database/seeds/RandomDataSeeder.php b/database/seeds/RandomDataSeeder.php index 1bd22be6ac6b..9b6c939d8a6a 100644 --- a/database/seeds/RandomDataSeeder.php +++ b/database/seeds/RandomDataSeeder.php @@ -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, [ diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 6b4da45785d5..ab39ed8b8322 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -10,7 +10,7 @@
@csrf -

@lang('texts.account_login')

+

@lang::get('texts.account_login')

@if (Session::has('error'))
  • {!! Session::get('error') !!}
  • @@ -23,7 +23,7 @@
    - + @if ($errors->has('email')) @@ -38,7 +38,7 @@
    - + @if ($errors->has('password')) @@ -49,11 +49,11 @@
    - +
    @@ -91,9 +91,9 @@
    -

    @lang('texts.sign_up_now')

    -

    @lang('texts.not_a_member_yet')

    - @lang('texts.login_create_an_account') +

    @lang::get('texts.sign_up_now')

    +

    @lang::get('texts.not_a_member_yet')

    + @lang::get('texts.login_create_an_account')
    diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php index b65cb417a2ce..dddd0ce6fdb6 100644 --- a/resources/views/auth/passwords/email.blade.php +++ b/resources/views/auth/passwords/email.blade.php @@ -16,7 +16,7 @@ @endif @csrf -

    @lang('texts.password_recovery')

    +

    @lang::get('texts.password_recovery')

    @@ -24,7 +24,7 @@
    - + @if ($errors->has('email')) @@ -36,7 +36,7 @@
    - +
    diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php index 6507c0ab31a2..460a59a6f0b8 100644 --- a/resources/views/auth/passwords/reset.blade.php +++ b/resources/views/auth/passwords/reset.blade.php @@ -12,7 +12,7 @@
    @csrf -

    @lang('texts.change_password')

    +

    @lang::get('texts.change_password')

    @@ -20,7 +20,7 @@
    - + @if ($errors->has('email')) @@ -36,7 +36,7 @@
    - + @if ($errors->has('password')) @@ -51,12 +51,12 @@
    - +
    - +
    diff --git a/resources/views/client/partial/client_details.blade.php b/resources/views/client/partial/client_details.blade.php index 0716026e31c6..4a095dff62cd 100644 --- a/resources/views/client/partial/client_details.blade.php +++ b/resources/views/client/partial/client_details.blade.php @@ -1,50 +1,50 @@
    -
    @lang('texts.edit_client')
    +
    @lang::get('texts.edit_client')
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    diff --git a/resources/views/client/partial/client_location.blade.php b/resources/views/client/partial/client_location.blade.php index 16cae9aa85f2..23af5e98bc55 100644 --- a/resources/views/client/partial/client_location.blade.php +++ b/resources/views/client/partial/client_location.blade.php @@ -14,46 +14,46 @@
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    @@ -62,46 +62,46 @@
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    diff --git a/resources/views/client/partial/client_settings.blade.php b/resources/views/client/partial/client_settings.blade.php index 7f71cebca875..439ffc28c4c9 100644 --- a/resources/views/client/partial/client_settings.blade.php +++ b/resources/views/client/partial/client_settings.blade.php @@ -1,6 +1,6 @@
    -
    @lang('texts.settings')
    +
    @lang::get('texts.settings')
    @@ -20,42 +20,42 @@
    - +
    {{ html()->input('name')->placeholder(__('texts.client_name'))->value($client->present()->name)->class('form-control')->id('name') }}
    - +
    {{ html()->input('id_number')->placeholder(__('texts.id_number'))->value($client->id_number)->class('form-control')->id('id_number') }}
    - +
    {{ html()->input('vat_number')->placeholder(__('texts.vat_number'))->value($client->vat_number)->class('form-control')->id('vat_number') }}
    - +
    {{ html()->input('website')->placeholder(__('texts.website'))->value($client->website)->class('form-control')->id('website') }}
    - +
    {{ html()->input('custom_value1')->placeholder(__('texts.custom_value1'))->value($client->custom_value1)->class('form-control')->id('custom_value1') }}
    - +
    {{ html()->input('custom_value2')->placeholder(__('texts.custom_value2'))->value($client->custom_value2)->class('form-control')->id('custom_value2') }}
    diff --git a/resources/views/client/partial/contact_details.blade.php b/resources/views/client/partial/contact_details.blade.php index 1e1f15a14b5a..da2346411931 100644 --- a/resources/views/client/partial/contact_details.blade.php +++ b/resources/views/client/partial/contact_details.blade.php @@ -1,49 +1,49 @@
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    diff --git a/resources/views/email/auth/verify.blade.php b/resources/views/email/auth/verify.blade.php index d01678953f97..dc956d1ac535 100644 --- a/resources/views/email/auth/verify.blade.php +++ b/resources/views/email/auth/verify.blade.php @@ -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 --}} diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php index 40f2834a4eb9..79b84913ef98 100644 --- a/resources/views/header.blade.php +++ b/resources/views/header.blade.php @@ -83,7 +83,7 @@ @@ -119,7 +119,7 @@ Profile - @lang('texts.settings') + @lang::get('texts.settings') diff --git a/resources/views/portal/default/auth/login.blade.php b/resources/views/portal/default/auth/login.blade.php index 0842c9e367c4..f2df501edee8 100644 --- a/resources/views/portal/default/auth/login.blade.php +++ b/resources/views/portal/default/auth/login.blade.php @@ -72,7 +72,7 @@
    @@ -85,9 +85,9 @@