@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | $factory->define(App\Modules\Reporting\Report::class, function (Faker\Generator $faker) { |
| 4 | - return [ |
|
| 5 | - 'report_name' => $faker->randomElement(['Users Count', 'Low Stock Products', 'Active Users']), |
|
| 6 | - 'view_name' => $faker->word(), |
|
| 7 | - 'created_at' => $faker->dateTimeBetween('-1 years', 'now'), |
|
| 8 | - 'updated_at' => $faker->dateTimeBetween('-1 years', 'now') |
|
| 9 | - ]; |
|
| 4 | + return [ |
|
| 5 | + 'report_name' => $faker->randomElement(['Users Count', 'Low Stock Products', 'Active Users']), |
|
| 6 | + 'view_name' => $faker->word(), |
|
| 7 | + 'created_at' => $faker->dateTimeBetween('-1 years', 'now'), |
|
| 8 | + 'updated_at' => $faker->dateTimeBetween('-1 years', 'now') |
|
| 9 | + ]; |
|
| 10 | 10 | }); |
@@ -5,29 +5,29 @@ |
||
| 5 | 5 | |
| 6 | 6 | class Reports extends Migration |
| 7 | 7 | { |
| 8 | - /** |
|
| 9 | - * Run the migrations. |
|
| 10 | - * |
|
| 11 | - * @return void |
|
| 12 | - */ |
|
| 13 | - public function up() |
|
| 14 | - { |
|
| 15 | - Schema::create('reports', function (Blueprint $table) { |
|
| 16 | - $table->increments('id'); |
|
| 17 | - $table->string('report_name', 100); |
|
| 18 | - $table->string('view_name', 100); |
|
| 19 | - $table->softDeletes(); |
|
| 20 | - $table->timestamps(); |
|
| 21 | - }); |
|
| 22 | - } |
|
| 8 | + /** |
|
| 9 | + * Run the migrations. |
|
| 10 | + * |
|
| 11 | + * @return void |
|
| 12 | + */ |
|
| 13 | + public function up() |
|
| 14 | + { |
|
| 15 | + Schema::create('reports', function (Blueprint $table) { |
|
| 16 | + $table->increments('id'); |
|
| 17 | + $table->string('report_name', 100); |
|
| 18 | + $table->string('view_name', 100); |
|
| 19 | + $table->softDeletes(); |
|
| 20 | + $table->timestamps(); |
|
| 21 | + }); |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * Reverse the migrations. |
|
| 26 | - * |
|
| 27 | - * @return void |
|
| 28 | - */ |
|
| 29 | - public function down() |
|
| 30 | - { |
|
| 31 | - Schema::dropIfExists('reports'); |
|
| 32 | - } |
|
| 24 | + /** |
|
| 25 | + * Reverse the migrations. |
|
| 26 | + * |
|
| 27 | + * @return void |
|
| 28 | + */ |
|
| 29 | + public function down() |
|
| 30 | + { |
|
| 31 | + Schema::dropIfExists('reports'); |
|
| 32 | + } |
|
| 33 | 33 | } |
@@ -6,15 +6,15 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ReportingDatabaseSeeder extends Seeder |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the database seeds. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function run() |
|
| 15 | - { |
|
| 16 | - $this->call(ClearDataSeeder::class); |
|
| 17 | - $this->call(ReportsTableSeeder::class); |
|
| 18 | - $this->call(AssignRelationsSeeder::class); |
|
| 19 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the database seeds. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function run() |
|
| 15 | + { |
|
| 16 | + $this->call(ClearDataSeeder::class); |
|
| 17 | + $this->call(ReportsTableSeeder::class); |
|
| 18 | + $this->call(AssignRelationsSeeder::class); |
|
| 19 | + } |
|
| 20 | 20 | } |
@@ -7,73 +7,73 @@ |
||
| 7 | 7 | |
| 8 | 8 | class RouteServiceProvider extends ServiceProvider |
| 9 | 9 | { |
| 10 | - /** |
|
| 11 | - * This namespace is applied to your controller routes. |
|
| 12 | - * |
|
| 13 | - * In addition, it is set as the URL generator's root namespace. |
|
| 14 | - * |
|
| 15 | - * @var string |
|
| 16 | - */ |
|
| 17 | - protected $namespace = 'App\Modules\Reporting\Http\Controllers'; |
|
| 10 | + /** |
|
| 11 | + * This namespace is applied to your controller routes. |
|
| 12 | + * |
|
| 13 | + * In addition, it is set as the URL generator's root namespace. |
|
| 14 | + * |
|
| 15 | + * @var string |
|
| 16 | + */ |
|
| 17 | + protected $namespace = 'App\Modules\Reporting\Http\Controllers'; |
|
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * Define your route model bindings, pattern filters, etc. |
|
| 21 | - * |
|
| 22 | - * @return void |
|
| 23 | - */ |
|
| 24 | - public function boot() |
|
| 25 | - { |
|
| 26 | - // |
|
| 19 | + /** |
|
| 20 | + * Define your route model bindings, pattern filters, etc. |
|
| 21 | + * |
|
| 22 | + * @return void |
|
| 23 | + */ |
|
| 24 | + public function boot() |
|
| 25 | + { |
|
| 26 | + // |
|
| 27 | 27 | |
| 28 | - parent::boot(); |
|
| 29 | - } |
|
| 28 | + parent::boot(); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * Define the routes for the module. |
|
| 33 | - * |
|
| 34 | - * @return void |
|
| 35 | - */ |
|
| 36 | - public function map() |
|
| 37 | - { |
|
| 38 | - $this->mapWebRoutes(); |
|
| 31 | + /** |
|
| 32 | + * Define the routes for the module. |
|
| 33 | + * |
|
| 34 | + * @return void |
|
| 35 | + */ |
|
| 36 | + public function map() |
|
| 37 | + { |
|
| 38 | + $this->mapWebRoutes(); |
|
| 39 | 39 | |
| 40 | - $this->mapApiRoutes(); |
|
| 40 | + $this->mapApiRoutes(); |
|
| 41 | 41 | |
| 42 | - // |
|
| 43 | - } |
|
| 42 | + // |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * Define the "web" routes for the module. |
|
| 47 | - * |
|
| 48 | - * These routes all receive session state, CSRF protection, etc. |
|
| 49 | - * |
|
| 50 | - * @return void |
|
| 51 | - */ |
|
| 52 | - protected function mapWebRoutes() |
|
| 53 | - { |
|
| 54 | - Route::group([ |
|
| 55 | - 'middleware' => 'web', |
|
| 56 | - 'namespace' => $this->namespace, |
|
| 57 | - ], function ($router) { |
|
| 58 | - require module_path('reporting', 'Routes/web.php'); |
|
| 59 | - }); |
|
| 60 | - } |
|
| 45 | + /** |
|
| 46 | + * Define the "web" routes for the module. |
|
| 47 | + * |
|
| 48 | + * These routes all receive session state, CSRF protection, etc. |
|
| 49 | + * |
|
| 50 | + * @return void |
|
| 51 | + */ |
|
| 52 | + protected function mapWebRoutes() |
|
| 53 | + { |
|
| 54 | + Route::group([ |
|
| 55 | + 'middleware' => 'web', |
|
| 56 | + 'namespace' => $this->namespace, |
|
| 57 | + ], function ($router) { |
|
| 58 | + require module_path('reporting', 'Routes/web.php'); |
|
| 59 | + }); |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - /** |
|
| 63 | - * Define the "api" routes for the module. |
|
| 64 | - * |
|
| 65 | - * These routes are typically stateless. |
|
| 66 | - * |
|
| 67 | - * @return void |
|
| 68 | - */ |
|
| 69 | - protected function mapApiRoutes() |
|
| 70 | - { |
|
| 71 | - Route::group([ |
|
| 72 | - 'middleware' => 'api', |
|
| 73 | - 'namespace' => $this->namespace, |
|
| 74 | - 'prefix' => 'api', |
|
| 75 | - ], function ($router) { |
|
| 76 | - require module_path('reporting', 'Routes/api.php'); |
|
| 77 | - }); |
|
| 78 | - } |
|
| 62 | + /** |
|
| 63 | + * Define the "api" routes for the module. |
|
| 64 | + * |
|
| 65 | + * These routes are typically stateless. |
|
| 66 | + * |
|
| 67 | + * @return void |
|
| 68 | + */ |
|
| 69 | + protected function mapApiRoutes() |
|
| 70 | + { |
|
| 71 | + Route::group([ |
|
| 72 | + 'middleware' => 'api', |
|
| 73 | + 'namespace' => $this->namespace, |
|
| 74 | + 'prefix' => 'api', |
|
| 75 | + ], function ($router) { |
|
| 76 | + require module_path('reporting', 'Routes/api.php'); |
|
| 77 | + }); |
|
| 78 | + } |
|
| 79 | 79 | } |
@@ -6,32 +6,32 @@ |
||
| 6 | 6 | class Report extends Model |
| 7 | 7 | { |
| 8 | 8 | |
| 9 | - use SoftDeletes; |
|
| 10 | - protected $table = 'reports'; |
|
| 11 | - protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
|
| 12 | - protected $hidden = ['deleted_at']; |
|
| 13 | - protected $guarded = ['id']; |
|
| 14 | - protected $fillable = ['report_name', 'view_name']; |
|
| 15 | - public $searchable = ['report_name', 'view_name']; |
|
| 9 | + use SoftDeletes; |
|
| 10 | + protected $table = 'reports'; |
|
| 11 | + protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
|
| 12 | + protected $hidden = ['deleted_at']; |
|
| 13 | + protected $guarded = ['id']; |
|
| 14 | + protected $fillable = ['report_name', 'view_name']; |
|
| 15 | + public $searchable = ['report_name', 'view_name']; |
|
| 16 | 16 | |
| 17 | - public function getCreatedAtAttribute($value) |
|
| 18 | - { |
|
| 19 | - return \Carbon\Carbon::parse($value)->tz(\Session::get('time-zone'))->toDateTimeString(); |
|
| 20 | - } |
|
| 17 | + public function getCreatedAtAttribute($value) |
|
| 18 | + { |
|
| 19 | + return \Carbon\Carbon::parse($value)->tz(\Session::get('time-zone'))->toDateTimeString(); |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - public function getUpdatedAtAttribute($value) |
|
| 23 | - { |
|
| 24 | - return \Carbon\Carbon::parse($value)->tz(\Session::get('time-zone'))->toDateTimeString(); |
|
| 25 | - } |
|
| 22 | + public function getUpdatedAtAttribute($value) |
|
| 23 | + { |
|
| 24 | + return \Carbon\Carbon::parse($value)->tz(\Session::get('time-zone'))->toDateTimeString(); |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - public function getDeletedAtAttribute($value) |
|
| 28 | - { |
|
| 29 | - return \Carbon\Carbon::parse($value)->tz(\Session::get('time-zone'))->toDateTimeString(); |
|
| 30 | - } |
|
| 27 | + public function getDeletedAtAttribute($value) |
|
| 28 | + { |
|
| 29 | + return \Carbon\Carbon::parse($value)->tz(\Session::get('time-zone'))->toDateTimeString(); |
|
| 30 | + } |
|
| 31 | 31 | |
| 32 | - public static function boot() |
|
| 33 | - { |
|
| 34 | - parent::boot(); |
|
| 35 | - Report::observe(\App::make('App\Modules\Reporting\ModelObservers\ReprotObserver')); |
|
| 36 | - } |
|
| 32 | + public static function boot() |
|
| 33 | + { |
|
| 34 | + parent::boot(); |
|
| 35 | + Report::observe(\App::make('App\Modules\Reporting\ModelObservers\ReprotObserver')); |
|
| 36 | + } |
|
| 37 | 37 | } |
@@ -6,53 +6,53 @@ |
||
| 6 | 6 | class ReprotObserver |
| 7 | 7 | { |
| 8 | 8 | |
| 9 | - public function saving($model) |
|
| 10 | - { |
|
| 11 | - // |
|
| 12 | - } |
|
| 13 | - |
|
| 14 | - public function saved($model) |
|
| 15 | - { |
|
| 16 | - // |
|
| 17 | - } |
|
| 18 | - |
|
| 19 | - public function creating($model) |
|
| 20 | - { |
|
| 21 | - // |
|
| 22 | - } |
|
| 23 | - |
|
| 24 | - public function created($model) |
|
| 25 | - { |
|
| 26 | - // |
|
| 27 | - } |
|
| 28 | - |
|
| 29 | - public function updating($model) |
|
| 30 | - { |
|
| 31 | - // |
|
| 32 | - } |
|
| 33 | - |
|
| 34 | - public function updated($model) |
|
| 35 | - { |
|
| 36 | - // |
|
| 37 | - } |
|
| 38 | - |
|
| 39 | - public function deleting($model) |
|
| 40 | - { |
|
| 41 | - // |
|
| 42 | - } |
|
| 43 | - |
|
| 44 | - public function deleted($model) |
|
| 45 | - { |
|
| 46 | - // |
|
| 47 | - } |
|
| 48 | - |
|
| 49 | - public function restoring($model) |
|
| 50 | - { |
|
| 51 | - // |
|
| 52 | - } |
|
| 53 | - |
|
| 54 | - public function restored($model) |
|
| 55 | - { |
|
| 56 | - // |
|
| 57 | - } |
|
| 9 | + public function saving($model) |
|
| 10 | + { |
|
| 11 | + // |
|
| 12 | + } |
|
| 13 | + |
|
| 14 | + public function saved($model) |
|
| 15 | + { |
|
| 16 | + // |
|
| 17 | + } |
|
| 18 | + |
|
| 19 | + public function creating($model) |
|
| 20 | + { |
|
| 21 | + // |
|
| 22 | + } |
|
| 23 | + |
|
| 24 | + public function created($model) |
|
| 25 | + { |
|
| 26 | + // |
|
| 27 | + } |
|
| 28 | + |
|
| 29 | + public function updating($model) |
|
| 30 | + { |
|
| 31 | + // |
|
| 32 | + } |
|
| 33 | + |
|
| 34 | + public function updated($model) |
|
| 35 | + { |
|
| 36 | + // |
|
| 37 | + } |
|
| 38 | + |
|
| 39 | + public function deleting($model) |
|
| 40 | + { |
|
| 41 | + // |
|
| 42 | + } |
|
| 43 | + |
|
| 44 | + public function deleted($model) |
|
| 45 | + { |
|
| 46 | + // |
|
| 47 | + } |
|
| 48 | + |
|
| 49 | + public function restoring($model) |
|
| 50 | + { |
|
| 51 | + // |
|
| 52 | + } |
|
| 53 | + |
|
| 54 | + public function restored($model) |
|
| 55 | + { |
|
| 56 | + // |
|
| 57 | + } |
|
| 58 | 58 | } |
@@ -5,30 +5,30 @@ |
||
| 5 | 5 | |
| 6 | 6 | class Settings extends Migration |
| 7 | 7 | { |
| 8 | - /** |
|
| 9 | - * Run the migrations. |
|
| 10 | - * |
|
| 11 | - * @return void |
|
| 12 | - */ |
|
| 13 | - public function up() |
|
| 14 | - { |
|
| 15 | - Schema::create('settings', function (Blueprint $table) { |
|
| 16 | - $table->increments('id'); |
|
| 17 | - $table->string('name', 100); |
|
| 18 | - $table->string('key', 100)->unique(); |
|
| 19 | - $table->text('value')->nullable(); |
|
| 20 | - $table->softDeletes(); |
|
| 21 | - $table->timestamps(); |
|
| 22 | - }); |
|
| 23 | - } |
|
| 8 | + /** |
|
| 9 | + * Run the migrations. |
|
| 10 | + * |
|
| 11 | + * @return void |
|
| 12 | + */ |
|
| 13 | + public function up() |
|
| 14 | + { |
|
| 15 | + Schema::create('settings', function (Blueprint $table) { |
|
| 16 | + $table->increments('id'); |
|
| 17 | + $table->string('name', 100); |
|
| 18 | + $table->string('key', 100)->unique(); |
|
| 19 | + $table->text('value')->nullable(); |
|
| 20 | + $table->softDeletes(); |
|
| 21 | + $table->timestamps(); |
|
| 22 | + }); |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * Reverse the migrations. |
|
| 27 | - * |
|
| 28 | - * @return void |
|
| 29 | - */ |
|
| 30 | - public function down() |
|
| 31 | - { |
|
| 32 | - Schema::dropIfExists('settings'); |
|
| 33 | - } |
|
| 25 | + /** |
|
| 26 | + * Reverse the migrations. |
|
| 27 | + * |
|
| 28 | + * @return void |
|
| 29 | + */ |
|
| 30 | + public function down() |
|
| 31 | + { |
|
| 32 | + Schema::dropIfExists('settings'); |
|
| 33 | + } |
|
| 34 | 34 | } |
@@ -6,15 +6,15 @@ |
||
| 6 | 6 | |
| 7 | 7 | class CoreDatabaseSeeder extends Seeder |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the database seeds. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function run() |
|
| 15 | - { |
|
| 16 | - $this->call(ClearDataSeeder::class); |
|
| 17 | - $this->call(SettingsTableSeeder::class); |
|
| 18 | - $this->call(AssignRelationsSeeder::class); |
|
| 19 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the database seeds. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function run() |
|
| 15 | + { |
|
| 16 | + $this->call(ClearDataSeeder::class); |
|
| 17 | + $this->call(SettingsTableSeeder::class); |
|
| 18 | + $this->call(AssignRelationsSeeder::class); |
|
| 19 | + } |
|
| 20 | 20 | } |
@@ -2,28 +2,28 @@ |
||
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | 4 | |
| 5 | - /** |
|
| 6 | - * List of error messages used in core module. |
|
| 7 | - */ |
|
| 8 | - 'unAuthorized' => 'من فضلك قم بتسجيل الدخول', |
|
| 9 | - 'invalidRefreshToken' => 'رمز التحديث غير صالح', |
|
| 10 | - 'noPermissions' => 'لا توجد صلاحية', |
|
| 11 | - 'loginFailed' => 'خطأ في البريد لاكتروني او كلمة المرور', |
|
| 12 | - 'noSocialEmail' => 'لا يمكن الحصول علي تابريد الاكتروني', |
|
| 13 | - 'userAlreadyRegistered' => 'المستخد مسجل بالفعل.سجل الدخول بالبريد الاكتروني و كلمة السر', |
|
| 14 | - 'connectionError' => 'خطأ في الاتصال', |
|
| 15 | - 'redisNotRunning' => 'سيرفير الاشعارات لايعمل', |
|
| 16 | - 'dbQueryError' => 'خطا في البيانات', |
|
| 17 | - 'cannotCreateSetting' => 'لا يمكن اضافة اعدادات', |
|
| 18 | - 'cannotUpdateSettingKey' => 'لا يمكن تعديل اعدادات', |
|
| 19 | - 'userIsBlocked' => 'لقد تم حظرك', |
|
| 20 | - 'invalidResetToken' => 'رمز تعديل كلمة المرور خطا', |
|
| 21 | - 'invalidResetPassword' => 'خطا في نعديل كلمة المرور', |
|
| 22 | - 'invalidOldPassword' => 'كلمة السر القديمه خطا', |
|
| 23 | - 'invalidConfirmationCode' => 'لينك التاكيد غير صالح اة مستخدم من قبل', |
|
| 24 | - 'notFound' => 'ال :replace المطلوب غير موجود', |
|
| 25 | - 'generalError' => 'حدث خطا ما', |
|
| 26 | - 'emailNotConfirmed' => 'بريدك الاكتروني غير مفعل', |
|
| 27 | - 'emailAlreadyConfirmed' => 'البريد الاكتروني مفع بالقعل' |
|
| 5 | + /** |
|
| 6 | + * List of error messages used in core module. |
|
| 7 | + */ |
|
| 8 | + 'unAuthorized' => 'من فضلك قم بتسجيل الدخول', |
|
| 9 | + 'invalidRefreshToken' => 'رمز التحديث غير صالح', |
|
| 10 | + 'noPermissions' => 'لا توجد صلاحية', |
|
| 11 | + 'loginFailed' => 'خطأ في البريد لاكتروني او كلمة المرور', |
|
| 12 | + 'noSocialEmail' => 'لا يمكن الحصول علي تابريد الاكتروني', |
|
| 13 | + 'userAlreadyRegistered' => 'المستخد مسجل بالفعل.سجل الدخول بالبريد الاكتروني و كلمة السر', |
|
| 14 | + 'connectionError' => 'خطأ في الاتصال', |
|
| 15 | + 'redisNotRunning' => 'سيرفير الاشعارات لايعمل', |
|
| 16 | + 'dbQueryError' => 'خطا في البيانات', |
|
| 17 | + 'cannotCreateSetting' => 'لا يمكن اضافة اعدادات', |
|
| 18 | + 'cannotUpdateSettingKey' => 'لا يمكن تعديل اعدادات', |
|
| 19 | + 'userIsBlocked' => 'لقد تم حظرك', |
|
| 20 | + 'invalidResetToken' => 'رمز تعديل كلمة المرور خطا', |
|
| 21 | + 'invalidResetPassword' => 'خطا في نعديل كلمة المرور', |
|
| 22 | + 'invalidOldPassword' => 'كلمة السر القديمه خطا', |
|
| 23 | + 'invalidConfirmationCode' => 'لينك التاكيد غير صالح اة مستخدم من قبل', |
|
| 24 | + 'notFound' => 'ال :replace المطلوب غير موجود', |
|
| 25 | + 'generalError' => 'حدث خطا ما', |
|
| 26 | + 'emailNotConfirmed' => 'بريدك الاكتروني غير مفعل', |
|
| 27 | + 'emailAlreadyConfirmed' => 'البريد الاكتروني مفع بالقعل' |
|
| 28 | 28 | |
| 29 | 29 | ]; |