@@ -16,14 +16,14 @@ |
||
16 | 16 | { |
17 | 17 | $table->engine = 'InnoDB'; |
18 | 18 | $table->bigIncrements('id'); |
19 | - $table->string('nickname',50); |
|
20 | - $table->string('scope',50); |
|
21 | - $table->string('lang',10); |
|
19 | + $table->string('nickname', 50); |
|
20 | + $table->string('scope', 50); |
|
21 | + $table->string('lang', 10); |
|
22 | 22 | $table->longtext('content'); |
23 | 23 | $table->boolean('activated')->default(0); |
24 | 24 | $table->bigInteger('user_id')->unsigned()->nullable(); |
25 | 25 | $table->timestamps(); |
26 | - $table->unique(array('nickname','lang','scope')); |
|
26 | + $table->unique(array('nickname', 'lang', 'scope')); |
|
27 | 27 | $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
28 | 28 | }); |
29 | 29 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | }); |
29 | 29 | Blade::directive('transarticles_tojs', function($expression) { |
30 | 30 | $auxExpression = explode(',', str_replace(['(', ')', ' ', '"', "'"], '', $expression)); |
31 | - if (count($auxExpression) > 1) |
|
31 | + if (count($auxExpression)>1) |
|
32 | 32 | { |
33 | 33 | $scope = $auxExpression[0]; |
34 | 34 | $basevar = $auxExpression[1]; |
@@ -42,18 +42,18 @@ discard block |
||
42 | 42 | return $translations->getjs($scope, $basevar); |
43 | 43 | }); |
44 | 44 | |
45 | - Artisan::command('transarticles:createseed {--all : Create a seed for all database tables except migrations table} {--force : Force the iseed}', function () { |
|
45 | + Artisan::command('transarticles:createseed {--all : Create a seed for all database tables except migrations table} {--force : Force the iseed}', function() { |
|
46 | 46 | $options = $this->options('all'); |
47 | 47 | if ($options['all']) { |
48 | 48 | $dbName = env('DB_DATABASE'); |
49 | 49 | |
50 | - $query = \DB::select("SHOW TABLES WHERE Tables_in_$dbName <> 'migrations'"); |
|
50 | + $query = \DB::select("SHOW TABLES WHERE Tables_in_$dbName <> 'migrations'"); |
|
51 | 51 | $collection = new \Illuminate\Support\Collection($query); |
52 | - $tables = $collection->implode("Tables_in_$dbName",','); |
|
52 | + $tables = $collection->implode("Tables_in_$dbName", ','); |
|
53 | 53 | $options = $this->options('force'); |
54 | 54 | if ($options['force']) { |
55 | 55 | $nombre = ""; |
56 | - }else{ |
|
56 | + } else { |
|
57 | 57 | $nombre = date("YmdHis"); |
58 | 58 | } |
59 | 59 | $this->info('Calling iseed for all tables except migrations with suffix "{$nombre}" ...'); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | '--chunksize' => "100", |
64 | 64 | '--force' => $options['force'], |
65 | 65 | ]); |
66 | - }else{ |
|
66 | + } else { |
|
67 | 67 | $bar = $this->output->createProgressBar(2); |
68 | 68 | $confirm = $this->choice("Do you wisth to clean the DatabaseSeeder.php list?", ['yes', 'no'], 0); |
69 | 69 | $bar->advance(); |
@@ -32,8 +32,7 @@ discard block |
||
32 | 32 | { |
33 | 33 | $scope = $auxExpression[0]; |
34 | 34 | $basevar = $auxExpression[1]; |
35 | - } |
|
36 | - else |
|
35 | + } else |
|
37 | 36 | { |
38 | 37 | $scope = $auxExpression[0]; |
39 | 38 | $basevar = ""; |
@@ -53,7 +52,7 @@ discard block |
||
53 | 52 | $options = $this->options('force'); |
54 | 53 | if ($options['force']) { |
55 | 54 | $nombre = ""; |
56 | - }else{ |
|
55 | + } else{ |
|
57 | 56 | $nombre = date("YmdHis"); |
58 | 57 | } |
59 | 58 | $this->info('Calling iseed for all tables except migrations with suffix "{$nombre}" ...'); |
@@ -63,7 +62,7 @@ discard block |
||
63 | 62 | '--chunksize' => "100", |
64 | 63 | '--force' => $options['force'], |
65 | 64 | ]); |
66 | - }else{ |
|
65 | + } else{ |
|
67 | 66 | $bar = $this->output->createProgressBar(2); |
68 | 67 | $confirm = $this->choice("Do you wisth to clean the DatabaseSeeder.php list?", ['yes', 'no'], 0); |
69 | 68 | $bar->advance(); |