@@ -89,6 +89,9 @@ |
||
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | + /** |
|
| 93 | + * @return Category |
|
| 94 | + */ |
|
| 92 | 95 | private function createOrGetCategory($name) |
| 93 | 96 | { |
| 94 | 97 | $existingCategory = Category::whereName($name)->first(); |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | $categoryName = $payee->DefCateg; |
| 50 | 50 | $subCategoryName = $payee->DefSubCateg; |
| 51 | 51 | |
| 52 | - $category = Category::where('name', $subCategoryName)->whereHas('parentCategory', function ($query) use ($categoryName) { |
|
| 52 | + $category = Category::where('name', $subCategoryName)->whereHas('parentCategory', function($query) use ($categoryName) { |
|
| 53 | 53 | $query->where('name', $categoryName); |
| 54 | 54 | })->first(); |
| 55 | 55 | |
@@ -13,6 +13,6 @@ |
||
| 13 | 13 | | |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | -Artisan::command('inspire', function () { |
|
| 16 | +Artisan::command('inspire', function() { |
|
| 17 | 17 | $this->comment(Inspiring::quote()); |
| 18 | 18 | })->describe('Display an inspiring quote'); |
@@ -15,8 +15,8 @@ |
||
| 15 | 15 | |
| 16 | 16 | Route::any('services.php', 'MmexController@handle')->middleware('ensureguid'); |
| 17 | 17 | |
| 18 | -Route::group(['prefix' => 'api/v1'], function () { |
|
| 19 | - Route::get('/user', function (Request $request) { |
|
| 18 | +Route::group(['prefix' => 'api/v1'], function() { |
|
| 19 | + Route::get('/user', function(Request $request) { |
|
| 20 | 20 | return $request->user(); |
| 21 | 21 | })->middleware('auth:api'); |
| 22 | 22 | }); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | | |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -Route::get('/', function () { |
|
| 14 | +Route::get('/', function() { |
|
| 15 | 15 | return view('welcome'); |
| 16 | 16 | }); |
| 17 | 17 | |
@@ -20,6 +20,6 @@ discard block |
||
| 20 | 20 | Route::get('/home', 'HomeController@index'); |
| 21 | 21 | |
| 22 | 22 | |
| 23 | -Route::group(['prefix' => '/admin'], function () { |
|
| 23 | +Route::group(['prefix' => '/admin'], function() { |
|
| 24 | 24 | Route::get('logs', '\Rap2hpoutre\LaravelLogViewer\LogViewerController@index'); |
| 25 | 25 | }); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | 14 | /** @var \Illuminate\Database\Eloquent\Factory $factory */ |
| 15 | -$factory->define(App\Models\User::class, function (Faker\Generator $faker) { |
|
| 15 | +$factory->define(App\Models\User::class, function(Faker\Generator $faker) { |
|
| 16 | 16 | static $password; |
| 17 | 17 | |
| 18 | 18 | return [ |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('users', function (Blueprint $table) { |
|
| 16 | + Schema::create('users', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->string('name'); |
| 19 | 19 | $table->string('email')->unique(); |
@@ -13,14 +13,14 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('categories', function (Blueprint $table) { |
|
| 16 | + Schema::create('categories', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->integer('parent_id')->unsigned()->nullable(); |
| 19 | 19 | $table->string('name')->unique(); |
| 20 | 20 | $table->timestamps(); |
| 21 | 21 | }); |
| 22 | 22 | |
| 23 | - Schema::table('categories', function (Blueprint $table) { |
|
| 23 | + Schema::table('categories', function(Blueprint $table) { |
|
| 24 | 24 | $table->foreign('parent_id')->references('id')->on('categories'); |
| 25 | 25 | }); |
| 26 | 26 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('transactions', function (Blueprint $table) { |
|
| 16 | + Schema::create('transactions', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->integer('status_id')->unsigned(); |
| 19 | 19 | $table->integer('type_id')->unsigned(); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | $table->timestamps(); |
| 28 | 28 | }); |
| 29 | 29 | |
| 30 | - Schema::table('transactions', function (Blueprint $table) { |
|
| 30 | + Schema::table('transactions', function(Blueprint $table) { |
|
| 31 | 31 | $table->foreign('status_id')->references('id')->on('transaction_status'); |
| 32 | 32 | $table->foreign('type_id')->references('id')->on('transaction_types'); |
| 33 | 33 | }); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('accounts', function (Blueprint $table) { |
|
| 16 | + Schema::create('accounts', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->string('name')->unique(); |
| 19 | 19 | $table->timestamps(); |