@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('laralang', function (Blueprint $table) { |
|
| 16 | + Schema::create('laralang', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->string('translator')->default('Unknoun'); |
| 19 | 19 | $table->string('alias')->unique()->default('Unknoun'); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | if ($this->debug === true) { |
| 106 | 106 | $this->translation = "<font style='color:#00CC00;'>Loaded correclty from you DB</font>"; |
| 107 | 107 | } else { |
| 108 | - $this->translation = $existing[0]->translation; |
|
| 108 | + $this->translation = $existing[ 0 ]->translation; |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | return true; |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | return; |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - $available_transoltors = ['apertium', 'mymemory']; |
|
| 153 | + $available_transoltors = [ 'apertium', 'mymemory' ]; |
|
| 154 | 154 | |
| 155 | 155 | // Checks available translators. |
| 156 | 156 | |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | $words = explode(' ', $transObtained); |
| 263 | 263 | foreach ($words as $word) { |
| 264 | 264 | if ($word != '') { |
| 265 | - if ($word[0] == '*') { |
|
| 265 | + if ($word[ 0 ] == '*') { |
|
| 266 | 266 | $errors = $errors.substr($word, 1).', '; |
| 267 | 267 | } |
| 268 | 268 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -Route::group(['middleware' => 'web', 'as' => 'laralang::', 'prefix' => config('laralang.default.prefix'), 'namespace' => 'Aitor24\Laralang\Controllers'], function() { |
|
| 2 | +Route::group([ 'middleware' => 'web', 'as' => 'laralang::', 'prefix' => config('laralang.default.prefix'), 'namespace' => 'Aitor24\Laralang\Controllers' ], function() { |
|
| 3 | 3 | |
| 4 | 4 | Route::get('/translations', 'LaralangController@retView')->name('translations'); |
| 5 | 5 | Route::get('/test', 'LaralangController@testfunction'); |
@@ -8,6 +8,6 @@ discard block |
||
| 8 | 8 | Route::get('/edit/{id}/{translation}', 'LaralangController@editTrans'); |
| 9 | 9 | }); |
| 10 | 10 | |
| 11 | -Route::group(['middleware' => ['bindings', 'throttle:1000,1'], 'as' => 'laralang::', 'prefix' => config('laralang.default.prefix'), 'namespace' => 'Aitor24\Laralang\Controllers'], function() { |
|
| 11 | +Route::group([ 'middleware' => [ 'bindings', 'throttle:1000,1' ], 'as' => 'laralang::', 'prefix' => config('laralang.default.prefix'), 'namespace' => 'Aitor24\Laralang\Controllers' ], function() { |
|
| 12 | 12 | Route::get('/api', 'LaralangController@api')->name('api'); |
| 13 | 13 | }); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function boot() |
| 15 | 15 | { |
| 16 | - if (! $this->app->routesAreCached()) { |
|
| 16 | + if (!$this->app->routesAreCached()) { |
|
| 17 | 17 | require __DIR__.'/Routes/web.php'; |
| 18 | 18 | } |
| 19 | 19 | |
@@ -21,11 +21,11 @@ |
||
| 21 | 21 | |
| 22 | 22 | public function testfunction(Request $request) |
| 23 | 23 | { |
| 24 | - if ($request->isMethod('post')){ |
|
| 25 | - return response()->json(['response' => 'This is post method']); |
|
| 24 | + if ($request->isMethod('post')) { |
|
| 25 | + return response()->json([ 'response' => 'This is post method' ]); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - return response()->json(['response' => 'This is get method']); |
|
| 28 | + return response()->json([ 'response' => 'This is get method' ]); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | public function deleteTrans($id) { |