Showing
2 changed files
with
6 additions
and
1 deletions
... | @@ -31,7 +31,7 @@ class AuthController extends Controller | ... | @@ -31,7 +31,7 @@ class AuthController extends Controller |
31 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\Resources\Json\JsonResource | 31 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\Resources\Json\JsonResource |
32 | */ | 32 | */ |
33 | public function apiHandleProviderCallback(Request $request, $service) | 33 | public function apiHandleProviderCallback(Request $request, $service) |
34 | - { | 34 | + {dd($request->code); |
35 | $validator = Validator::make(['code' => $request->code, 'provider' => $service], [ | 35 | $validator = Validator::make(['code' => $request->code, 'provider' => $service], [ |
36 | 'code' => 'required', | 36 | 'code' => 'required', |
37 | 'provider' => 'required|in:facebook,twitter,github,apple' | 37 | 'provider' => 'required|in:facebook,twitter,github,apple' | ... | ... |
... | @@ -22,6 +22,8 @@ class Immerse extends Model | ... | @@ -22,6 +22,8 @@ class Immerse extends Model |
22 | 22 | ||
23 | public function getUrlAttribute($url) | 23 | public function getUrlAttribute($url) |
24 | { | 24 | { |
25 | + if ($url == '') return $url; | ||
26 | + | ||
25 | if (Str::contains($url, '/storage/app/public/')) { | 27 | if (Str::contains($url, '/storage/app/public/')) { |
26 | $str = Str::of($url)->replace('/usr/local/nginx/html/OnePoem/storage/app/public/', ''); | 28 | $str = Str::of($url)->replace('/usr/local/nginx/html/OnePoem/storage/app/public/', ''); |
27 | return Storage::disk('public')->url($str); | 29 | return Storage::disk('public')->url($str); |
... | @@ -32,6 +34,7 @@ class Immerse extends Model | ... | @@ -32,6 +34,7 @@ class Immerse extends Model |
32 | 34 | ||
33 | public function getThumbnailAttribute($url) | 35 | public function getThumbnailAttribute($url) |
34 | { | 36 | { |
37 | + | ||
35 | if (Str::contains($url, '/storage/app/public/')) { | 38 | if (Str::contains($url, '/storage/app/public/')) { |
36 | $str = Str::of($url)->replace('/usr/local/nginx/html/OnePoem/storage/app/public/', ''); | 39 | $str = Str::of($url)->replace('/usr/local/nginx/html/OnePoem/storage/app/public/', ''); |
37 | return Storage::disk('public')->url($str); | 40 | return Storage::disk('public')->url($str); |
... | @@ -42,6 +45,8 @@ class Immerse extends Model | ... | @@ -42,6 +45,8 @@ class Immerse extends Model |
42 | 45 | ||
43 | public function getBgmAttribute($url) | 46 | public function getBgmAttribute($url) |
44 | { | 47 | { |
48 | + if ($url == '') return $url; | ||
49 | + | ||
45 | if (Str::contains($url, '/storage/app/public/')) { | 50 | if (Str::contains($url, '/storage/app/public/')) { |
46 | $str = Str::of($url)->replace('/usr/local/nginx/html/OnePoem/storage/app/public/', ''); | 51 | $str = Str::of($url)->replace('/usr/local/nginx/html/OnePoem/storage/app/public/', ''); |
47 | return Storage::disk('public')->url($str); | 52 | return Storage::disk('public')->url($str); | ... | ... |
-
Please register or login to post a comment