@@ -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 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | |
| 21 | 21 | public function login(Request $request) |
| 22 | 22 | { |
| 23 | - session(['laralang.password' => Crypt::encrypt($request->input('password'))]); |
|
| 23 | + session([ 'laralang.password' => Crypt::encrypt($request->input('password')) ]); |
|
| 24 | 24 | if (Crypt::decrypt(session('laralang.password')) != config('laralang.default.password')) { |
| 25 | 25 | return redirect(Route('laralang::login')) |
| 26 | 26 | ->with('status', 'Invalid password'); |
@@ -1,18 +1,18 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -Route::group(['middleware' => 'web', 'as' => 'laralang::', 'prefix' => config('laralang.default.prefix'), 'namespace' => 'Aitor24\Laralang\Controllers'], function () { |
|
| 3 | +Route::group([ 'middleware' => 'web', 'as' => 'laralang::', 'prefix' => config('laralang.default.prefix'), 'namespace' => 'Aitor24\Laralang\Controllers' ], function() { |
|
| 4 | 4 | Route::get('/login', 'LaralangController@showLogin')->name('login'); |
| 5 | 5 | Route::post('/login', 'LaralangController@login'); |
| 6 | 6 | |
| 7 | - Route::group(['middleware' => 'laralang.middleware'], function () { |
|
| 8 | - Route::get('/', function () { |
|
| 7 | + Route::group([ 'middleware' => 'laralang.middleware' ], function() { |
|
| 8 | + Route::get('/', function() { |
|
| 9 | 9 | return redirect(Route('laralang::translations')); |
| 10 | 10 | })->name('home'); |
| 11 | 11 | Route::get('/translations', 'LaralangController@showTranslations')->name('translations'); |
| 12 | 12 | Route::get('/delete/{id}', 'LaralangController@deleteTrans')->name('delete'); |
| 13 | 13 | Route::get('/edit/{id}/{translation}', 'LaralangController@editTrans'); |
| 14 | 14 | Route::get('/logout', 'LaralangController@logout')->name('logout'); |
| 15 | - Route::group(['middleware' => ['throttle:5000,1', 'bindings']], function () { |
|
| 15 | + Route::group([ 'middleware' => [ 'throttle:5000,1', 'bindings' ] ], function() { |
|
| 16 | 16 | Route::get('/api', 'LaralangController@api')->name('api'); |
| 17 | 17 | }); |
| 18 | 18 | }); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('laralang_translations', function (Blueprint $table) { |
|
| 16 | + Schema::create('laralang_translations', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->string('translator'); |
| 19 | 19 | $table->string('string'); |