Skip to content

Commit

Permalink
Updating the package
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Mar 5, 2020
1 parent d2c7dfe commit e4654a6
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015-2019 | ARCANEDEV <[email protected]> - Localization
Copyright (c) 2015-2020 | ARCANEDEV <[email protected]> - Localization

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/Localization/
### Features

* Easy setup & configuration.
* Laravel `5.x | 6.x` are supported.
* Laravel `5.x | 6.x | 7.x` are supported.
* SEO-Friendly (Search engine optimization).
* New extended Router to manage your localized routes.
* Translated Eloquent Models.
Expand Down Expand Up @@ -52,7 +52,7 @@ If you discover any security related issues, please email arcanedev.maroc@gmail.
- [All Contributors][link-contributors]

[badge_license]: http://img.shields.io/packagist/l/arcanedev/localization.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel-5.x%20|%206.x-orange.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel-5.x|6.x|7.x-orange.svg?style=flat-square
[badge_build]: https://img.shields.io/github/workflow/status/ARCANEDEV/Localization/run-tests?style=flat-square
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/Localization.svg?style=flat-square
[badge_quality]: https://img.shields.io/scrutinizer/g/ARCANEDEV/Localization.svg?style=flat-square
Expand Down
12 changes: 7 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"type": "library",
"license": "MIT",
"require": {
"php": ">=7.2.0",
"php": "^7.2.5",
"ext-json": "*",
"arcanedev/support": "^5.1"
"arcanedev/support": "^7.0"
},
"require-dev": {
"ext-intl": "*",
"orchestra/testbench": "^4.0",
"orchestra/testbench": "^5.0",
"mockery/mockery": "^1.3.1",
"phpunit/phpunit": "^8.0"
"phpunit/phpunit": "^8.5|^9.0"
},
"autoload": {
"psr-4": {
Expand All @@ -45,5 +45,7 @@
},
"suggest": {
"ext-intl": "Use Intl extension for 'Locale' class (an identifier used to get language)."
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
8 changes: 6 additions & 2 deletions src/LocalizationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ public function register(): void
*/
public function boot(): void
{
$this->publishConfig();
$this->publishViews();
$this->loadViews();

if ($this->app->runningInConsole()) {
$this->publishConfig();
$this->publishViews();
}
}
}
4 changes: 3 additions & 1 deletion src/Providers/RoutingServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public function register(): void
{
$this->app['router']->mixin(new Router);

parent::register();
foreach ($this->routeMiddleware as $name => $class) {
$this->aliasMiddleware($name, $class);
}
}
}
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function getEnvironmentSetUp($app): void

$translator->getLoader()->addNamespace(
'localization',
realpath(__DIR__).DS.'fixtures'.DS.'lang'
realpath(__DIR__).DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'lang'
);

$translator->load('localization', 'routes', 'en');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class CreateTranslatableTable extends Migration
| Properties
| -----------------------------------------------------------------
*/

/**
* The table name.
*
Expand All @@ -31,7 +32,7 @@ class CreateTranslatableTable extends Migration
*/
public function up(): void
{
$this->createSchema(function (Blueprint $table) {
$this->createSchema(function (Blueprint $table): void {
$table->increments('id');
$table->string('name');
$table->string('slug')->nullable();
Expand Down
File renamed without changes.

0 comments on commit e4654a6

Please sign in to comment.