Information Technology Questions and Answers Community

Questions/Title


   Asked Questions

Views
290
Answers
1
Action
Views
221
Answers
1
Action
Views
217
Answers
1
Action
Views
249
Answers
1
Action
Views
100
Answers
1
Action
Views
143
Answers
1
Action
Views
115
Answers
1
Action
Views
95
Answers
1
Action
Views
120
Answers
1
Action
Views
92
Answers
1
Action
Views
138
Answers
1
Action
Views
89
Answers
1
Action
Views
108
Answers
1
Action
Views
95
Answers
1
Action
Views
83
Answers
1
Action
Views
99
Answers
1
Action
Views
96
Answers
1
Action
Views
108
Answers
1
Action
Views
98
Answers
1
Action
Views
92
Answers
1
Action
Views
83
Answers
1
Action
Views
96
Answers
1
Action
Views
95
Answers
1
Action
Views
85
Answers
1
Action
Views
121
Answers
1
Action
Views
88
Answers
1
Action
Views
79
Answers
1
Action
Views
90
Answers
1
Action
Views
109
Answers
1
Action
Views
88
Answers
1
Action
Views
126
Answers
1
Action
Views
97
Answers
1
Action
Views
89
Answers
1
Action
Views
95
Answers
1
Action
Views
129
Answers
1
Action
Views
78
Answers
1
Action
Views
102
Answers
1
Action
Views
116
Answers
1
Action
Views
106
Answers
1
Action
Views
95
Answers
1
Action
Views
93
Answers
1
Action
Views
87
Answers
1
Action
Views
115
Answers
1
Action
Views
92
Answers
1
Action
Views
117
Answers
1
Action
Views
108
Answers
1
Action
Views
97
Answers
1
Action
Views
94
Answers
1
Action
Views
82
Answers
1
Action
Views
122
Answers
1
Action
Views
119
Answers
1
Action
Views
86
Answers
1
Action
Views
94
Answers
1
Action
Views
110
Answers
1
Action
Views
118
Answers
1
Action
Views
108
Answers
1
Action
Views
106
Answers
1
Action
Views
81
Answers
1
Action
Views
102
Answers
1
Action
Views
128
Answers
1
Action
Views
146
Answers
0
Action

I have tried installing a Github forked repository using Composer but I always receive the following message whenever I run composer update on my machine:

Problem 1 - The requested package socialr/dingo-api could not be found in any version, there may be a typo in the package name.

Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details.

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

This is my composer.json file:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "git@github.com:SOCIALR/dingo-api.git"
        }
    ],
    "require": {
        ...
        "SOCIALR/dingo-api": "dev-master"
        ...
    },
    ...
    "config": {
        "preferred-install": "dist"
    },
    "prefer-stable": true,
    "minimum-stability": "dev"
}

As you can see I have set the minimum-stability to dev and I'm also requiring the repository in the repositories section but I keep receiving the same error.

Views
94
Answers
0
Action
Views
174
Answers
0
Action
Views
104
Answers
0
Action

(in developer mode) The way I have my Controller now it stores the new image path to the database but doesn't upload it to the 'uploads/avatars' folder.

Also when I try to just edit the profile without uploading a new avatar, it throws an ErrorException undefined variable:avatar,

and the version i have on my hosting server also throws the Errorexception if not uploading but only editing the profile,

And if I try to upload a new avatar it tells me

NotWritableException
Can't write image data to path (/home/vlindr.com/vlindr/public/uploads/avatars/1504691841.jpg)

Anybody knows how to go about fixing this?

My Controller:

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use Auth;
use Session;
use Image;
use Illuminate\Support\Facades\File;
use App\User;
use DB;


class UserController extends Controller
{

        public function __construct()
   {
        $this->middleware('auth', ['except' => ['index', 'show']]);
  }


  //
     public function index(){
        return view('profiles.profile', array('user' => Auth::user()) );
  }

   public function edit()

{

return view('profiles.edit')->with('info', Auth::user()->profile);

}
     public function update(Request $request)

  {
     $this->validate($request, [
      'location' => 'required',
      'about' => 'required|max:355',
      'passion' => 'required|max:355'
      ]);

     Auth::user()->profile()->update([
     'location' => $request->location,
     'about' => $request->about,
      'passion' => $request->passion

 ]);

 $user = User::find(Auth::user()->id);

// Handle the user upload of avatar

if ($request->hasFile('avatar')) {
    $avatar = $request->file('avatar');
 $filename = time() . '.' . $avatar->getClientOriginalExtension();

  }

    // Delete current image before uploading new image

 if ($user->avatar !== 'man.png' && $user->avatar !== 'woman.png')
    {
     $file = public_path(
PHP  
laravel-5  
Date Posted:06 Sep at 06:51  Posted By:Peter 
Views
113
Answers
0
Action
Edit Account
LOGIN INFORMATION
Change Settings
Email Notifications Notifications will be sent to abcd@gmail.com
Select option for your email notifications:
Mature / News Filter We'll send on email when new jobs are posted
Option 2 for email notification We'll send on email when new jobs are posted