Browse Source

Merge with HAJ MAHDI (A)

pull/2/head
Mohammad Akbari 4 years ago
parent
commit
4880496d0f
Signed by: akbarjimi GPG Key ID: 55726AEFECE5E683
  1. 13
      app/Http/Controllers/AuthController.php
  2. 2
      app/Http/Controllers/CreditController.php
  3. 6
      app/Http/Controllers/FileController.php
  4. 2
      app/Http/Controllers/InvoiceController.php
  5. 2
      app/Http/Controllers/ProjectController.php
  6. 4
      app/Http/Controllers/SprintController.php
  7. 4
      app/Http/Controllers/StatusController.php
  8. 2
      app/Http/Controllers/SystemController.php
  9. 5
      app/Http/Controllers/TagController.php
  10. 2
      app/Http/Controllers/TaskController.php
  11. 7
      app/Http/Controllers/TaskFileController.php
  12. 6
      app/Http/Controllers/WorkflowController.php
  13. 4
      app/Models/Business.php
  14. 4
      app/Models/Project.php
  15. 2
      app/Models/ReportableRelation.php
  16. 2
      app/Models/Task.php
  17. 4
      app/Models/User.php
  18. 7
      bootstrap/app.php

13
app/Http/Controllers/AuthController.php

@ -16,6 +16,7 @@ use Illuminate\Support\Facades\Cache;
use Laravel\Lumen\Routing\Controller; use Laravel\Lumen\Routing\Controller;
use Laravel\Socialite\Facades\Socialite; use Laravel\Socialite\Facades\Socialite;
use Illuminate\Session\TokenMismatchException; use Illuminate\Session\TokenMismatchException;
use phpDocumentor\Reflection\Location;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
class AuthController extends Controller class AuthController extends Controller
@ -69,7 +70,7 @@ class AuthController extends Controller
$user = User::where('email', $request->email)->first(); $user = User::where('email', $request->email)->first();
if ($user && Hash::check($request->password, $user->password)) { if ($user && Hash::check($request->password, $user->password)) {
Auth::viaRequest('api', fn() => $user);
Auth::setUser($user);
return [ return [
'auth' => $this->createFingerPrint(), 'auth' => $this->createFingerPrint(),
@ -252,11 +253,11 @@ class AuthController extends Controller
public function createFingerPrint() public function createFingerPrint()
{ {
$attributes = [ $attributes = [
'agent' => \request()->getAgent(),
'ip' => \request()->getClientIp(),
'os' => \request()->getOS(),
'latitude' => \request()->getLocation()->getAttribute('lat'),
'longitude' => \request()->getLocation()->getAttribute('lon'),
'agent' => request()->getAgent(),
'ip' => request()->getClientIp(),
'os' => request()->getOS(),
'latitude' => 5,
'longitude' => 5,
]; ];
$values = [ $values = [

2
app/Http/Controllers/CreditController.php

@ -2,7 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Transaction;
use App\Models\Transaction;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Spatie\QueryBuilder\QueryBuilder; use Spatie\QueryBuilder\QueryBuilder;

6
app/Http/Controllers/FileController.php

@ -2,10 +2,10 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\File;
use App\Project;
use App\Models\File;
use App\Models\Project;
use App\Rules\maxBound;
use App\Models\Business; use App\Models\Business;
use App\Rules\MaxBound;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Http\UploadedFile; use Illuminate\Http\UploadedFile;

2
app/Http/Controllers/InvoiceController.php

@ -2,7 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Cost;
use App\Models\Cost;
use App\Models\Business; use App\Models\Business;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Spatie\QueryBuilder\QueryBuilder; use Spatie\QueryBuilder\QueryBuilder;

2
app/Http/Controllers/ProjectController.php

@ -2,7 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Project;
use App\Models\Project;
use App\Models\Business; use App\Models\Business;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;

4
app/Http/Controllers/SprintController.php

@ -1,10 +1,8 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Sprint;
use App\Models\Sprint;
use App\Models\Business; use App\Models\Business;
use Illuminate\Http\Request; use Illuminate\Http\Request;

4
app/Http/Controllers/StatusController.php

@ -1,10 +1,8 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Status;
use App\Models\Status;
use App\Models\Business; use App\Models\Business;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Http\Response; use Illuminate\Http\Response;

2
app/Http/Controllers/SystemController.php

@ -2,7 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\System;
use App\Models\System;
use App\Models\Business; use App\Models\Business;
use Illuminate\Http\Request; use Illuminate\Http\Request;

5
app/Http/Controllers/TagController.php

@ -1,12 +1,9 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Tag;
use App\Models\Tag;
use App\Models\Business; use App\Models\Business;
use App\Workflow;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class TagController extends Controller class TagController extends Controller

2
app/Http/Controllers/TaskController.php

@ -2,10 +2,10 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\TagTask;
use Carbon\Carbon; use Carbon\Carbon;
use App\Models\Task; use App\Models\Task;
use App\Models\Work; use App\Models\Work;
use App\Models\TagTask;
use App\Rules\maxBound; use App\Rules\maxBound;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Http\Response; use Illuminate\Http\Response;

7
app/Http/Controllers/TaskFileController.php

@ -3,12 +3,11 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Auth; use Auth;
use App\File;
use App\Task;
use App\Project;
use App\Models\File;
use App\Models\Task;
use App\Models\Project;
use App\Models\Business; use App\Models\Business;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use mysql_xdevapi\Exception;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Resources\FileResource; use App\Http\Resources\FileResource;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;

6
app/Http/Controllers/WorkflowController.php

@ -1,14 +1,10 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Status;
use App\Models\Business; use App\Models\Business;
use App\Workflow;
use App\Models\Workflow;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class WorkflowController extends Controller class WorkflowController extends Controller
{ {

4
app/Models/Business.php

@ -2,14 +2,14 @@
namespace App\Models; namespace App\Models;
use App\File;
use App\Models\File;
use App\Models\Model; use App\Models\Model;
use App\Models\SoftDeletes; use App\Models\SoftDeletes;
use App\Models\ReportableRelation;
use Illuminate\Validation\Rule; use Illuminate\Validation\Rule;
use Illuminate\Http\UploadedFile; use Illuminate\Http\UploadedFile;
use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\HasMedia;
use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Cache;
use App\HiLib\Models\ReportableRelation;
use Spatie\MediaLibrary\InteractsWithMedia; use Spatie\MediaLibrary\InteractsWithMedia;
use Spatie\MediaLibrary\MediaCollections\Models\Media; use Spatie\MediaLibrary\MediaCollections\Models\Media;

4
app/Models/Project.php

@ -2,13 +2,13 @@
namespace App\Models; namespace App\Models;
use App\File;
use App\Models\File;
use App\Models\Model; use App\Models\Model;
use App\Models\SoftDeletes; use App\Models\SoftDeletes;
use App\Models\ReportableRelation;
use Illuminate\Validation\Rule; use Illuminate\Validation\Rule;
use Illuminate\Http\UploadedFile; use Illuminate\Http\UploadedFile;
use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\HasMedia;
use App\HiLib\Models\ReportableRelation;
use Spatie\MediaLibrary\InteractsWithMedia; use Spatie\MediaLibrary\InteractsWithMedia;
use Spatie\MediaLibrary\MediaCollections\Models\Media; use Spatie\MediaLibrary\MediaCollections\Models\Media;

2
app/Models/ReportableRelation.php

@ -1,6 +1,6 @@
<?php <?php
namespace App\Utilities\Models;
namespace App\Models;
use Anik\Amqp\Exchange; use Anik\Amqp\Exchange;
use Anik\Amqp\Facades\Amqp; use Anik\Amqp\Facades\Amqp;

2
app/Models/Task.php

@ -2,6 +2,7 @@
namespace App\Models; namespace App\Models;
use App\Models\ReportableRelation;
use Carbon\Carbon; use Carbon\Carbon;
use App\Models\Tag; use App\Models\Tag;
use App\Models\User; use App\Models\User;
@ -13,7 +14,6 @@ use App\Models\TagTask;
use App\Models\Business; use App\Models\Business;
use Illuminate\Validation\Rule; use Illuminate\Validation\Rule;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use App\HiLib\Models\ReportableRelation;
use Illuminate\Validation\Rules\RequiredIf; use Illuminate\Validation\Rules\RequiredIf;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;

4
app/Models/User.php

@ -2,15 +2,15 @@
namespace App\Models; namespace App\Models;
use App\File;
use App\Models\File;
use App\Models\Model; use App\Models\Model;
use App\Models\SoftDeletes; use App\Models\SoftDeletes;
use App\Models\ReportableRelation;
use Illuminate\Validation\Rule; use Illuminate\Validation\Rule;
use Illuminate\Http\UploadedFile; use Illuminate\Http\UploadedFile;
use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\HasMedia;
use Illuminate\Auth\Authenticatable; use Illuminate\Auth\Authenticatable;
use Laravel\Lumen\Auth\Authorizable; use Laravel\Lumen\Auth\Authorizable;
use App\HiLib\Models\ReportableRelation;
use Spatie\MediaLibrary\InteractsWithMedia; use Spatie\MediaLibrary\InteractsWithMedia;
use Spatie\MediaLibrary\MediaCollections\Models\Media; use Spatie\MediaLibrary\MediaCollections\Models\Media;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;

7
bootstrap/app.php

@ -52,4 +52,11 @@ $app->singleton(
| |
*/ */
$app->router->group([
'namespace' => 'App\Http\Controllers',
'prefix' => '/user/v1/'
], function ($router) {
require __DIR__.'/../routes/api.php';
});
return $app; return $app;
Loading…
Cancel
Save