@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * to preform actions like (add, edit ... etc). |
| 13 | 13 | * @var string |
| 14 | 14 | */ |
| 15 | - protected $model = 'users'; |
|
| 15 | + protected $model = 'users'; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * List of all route actions that the base api controller |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * to check before add. |
| 34 | 34 | * @var array |
| 35 | 35 | */ |
| 36 | - protected $validationRules = [ |
|
| 36 | + protected $validationRules = [ |
|
| 37 | 37 | 'email' => 'required|email|unique:users,email,{id}', |
| 38 | 38 | 'password' => 'min:6' |
| 39 | 39 | ]; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function postRegister(Request $request) |
| 69 | 69 | { |
| 70 | - $this->validate($request, ['email' => 'required|email|unique:users,email,{id}','password' => 'required|min:6']); |
|
| 70 | + $this->validate($request, ['email' => 'required|email|unique:users,email,{id}', 'password' => 'required|min:6']); |
|
| 71 | 71 | |
| 72 | 72 | return \Response::json(\Auth::loginUsingId(\Core::users()->create($request->all())->id), 200); |
| 73 | 73 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | foreach ($this->getRepoNameSpace() as $repoNameSpace) |
| 20 | 20 | { |
| 21 | 21 | $apiVersion = \Request::header('api-version') ?: 1; |
| 22 | - $class = rtrim($repoNameSpace, '\\') . '\\V' . $apiVersion .'\\' . ucfirst(str_singular($name)) . 'Repository'; |
|
| 22 | + $class = rtrim($repoNameSpace, '\\').'\\V'.$apiVersion.'\\'.ucfirst(str_singular($name)).'Repository'; |
|
| 23 | 23 | if (class_exists($class)) |
| 24 | 24 | { |
| 25 | 25 | return \App::make($class); |
@@ -15,6 +15,6 @@ |
||
| 15 | 15 | |
| 16 | 16 | $apiVersion = \Request::header('api-version') ?: 1; |
| 17 | 17 | Route::controllers([ |
| 18 | - 'settings' => 'V' . $apiVersion . '\SettingsController' |
|
| 18 | + 'settings' => 'V'.$apiVersion.'\SettingsController' |
|
| 19 | 19 | ]); |
| 20 | 20 | }); |
| 21 | 21 | \ No newline at end of file |
@@ -13,14 +13,14 @@ |
||
| 13 | 13 | * to preform actions like (add, edit ... etc). |
| 14 | 14 | * @var string |
| 15 | 15 | */ |
| 16 | - protected $model = 'settings'; |
|
| 16 | + protected $model = 'settings'; |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * The validations rules used by the base api controller |
| 20 | 20 | * to check before add. |
| 21 | 21 | * @var array |
| 22 | 22 | */ |
| 23 | - protected $validationRules = [ |
|
| 23 | + protected $validationRules = [ |
|
| 24 | 24 | 'name' => 'required|string|max:100', |
| 25 | 25 | 'value' => 'required|string|max:100' |
| 26 | 26 | ]; |
@@ -15,6 +15,6 @@ |
||
| 15 | 15 | |
| 16 | 16 | $apiVersion = \Request::header('api-version') ?: 1; |
| 17 | 17 | Route::controllers([ |
| 18 | - 'logs' => 'V' . $apiVersion . '\LogsController', |
|
| 18 | + 'logs' => 'V'.$apiVersion.'\LogsController', |
|
| 19 | 19 | ]); |
| 20 | 20 | }); |
| 21 | 21 | \ No newline at end of file |
@@ -12,5 +12,5 @@ |
||
| 12 | 12 | * to preform actions like (add, edit ... etc). |
| 13 | 13 | * @var string |
| 14 | 14 | */ |
| 15 | - protected $model = 'logs'; |
|
| 15 | + protected $model = 'logs'; |
|
| 16 | 16 | } |
@@ -12,8 +12,8 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - DB::statement( "DROP VIEW IF EXISTS admin_count"); |
|
| 16 | - DB::statement( "CREATE VIEW admin_count AS |
|
| 15 | + DB::statement("DROP VIEW IF EXISTS admin_count"); |
|
| 16 | + DB::statement("CREATE VIEW admin_count AS |
|
| 17 | 17 | select count(u.id) |
| 18 | 18 | from users u, groups g ,users_groups ug |
| 19 | 19 | where |
@@ -12,10 +12,10 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('reports', function (Blueprint $table) { |
|
| 15 | + Schema::create('reports', function(Blueprint $table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | - $table->string('report_name',100); |
|
| 18 | - $table->string('view_name',100); |
|
| 17 | + $table->string('report_name', 100); |
|
| 18 | + $table->string('view_name', 100); |
|
| 19 | 19 | $table->softDeletes(); |
| 20 | 20 | $table->timestamps(); |
| 21 | 21 | }); |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | use Illuminate\Database\Eloquent\Model; |
| 4 | 4 | use Illuminate\Database\Eloquent\SoftDeletes; |
| 5 | 5 | |
| 6 | -class Report extends Model{ |
|
| 6 | +class Report extends Model { |
|
| 7 | 7 | |
| 8 | 8 | use SoftDeletes; |
| 9 | 9 | protected $table = 'reports'; |