Information Technology Questions and Answers Community

Questions/Title


   Asked Questions

Views
355
Answers
1
Action
Views
275
Answers
1
Action
Views
265
Answers
1
Action
Views
306
Answers
1
Action
Views
159
Answers
1
Action
Views
199
Answers
1
Action
Views
151
Answers
1
Action
Views
134
Answers
1
Action
Views
155
Answers
1
Action
Views
126
Answers
1
Action
Views
171
Answers
1
Action
Views
128
Answers
1
Action
Views
141
Answers
1
Action
Views
134
Answers
1
Action
Views
123
Answers
1
Action
Views
134
Answers
1
Action
Views
127
Answers
1
Action
Views
137
Answers
1
Action
Views
139
Answers
1
Action
Views
120
Answers
1
Action
Views
111
Answers
1
Action
Views
129
Answers
1
Action
Views
120
Answers
1
Action
Views
111
Answers
1
Action
Views
153
Answers
1
Action
Views
117
Answers
1
Action
Views
110
Answers
1
Action
Views
123
Answers
1
Action
Views
146
Answers
1
Action
Views
114
Answers
1
Action
Views
161
Answers
1
Action
Views
119
Answers
1
Action
Views
120
Answers
1
Action
Views
124
Answers
1
Action
Views
159
Answers
1
Action
Views
99
Answers
1
Action
Views
142
Answers
1
Action
Views
147
Answers
1
Action
Views
128
Answers
1
Action
Views
129
Answers
1
Action
Views
120
Answers
1
Action
Views
117
Answers
1
Action
Views
136
Answers
1
Action
Views
122
Answers
1
Action
Views
139
Answers
1
Action
Views
131
Answers
1
Action
Views
115
Answers
1
Action
Views
117
Answers
1
Action
Views
105
Answers
1
Action
Views
142
Answers
1
Action
Views
144
Answers
1
Action
Views
115
Answers
1
Action
Views
114
Answers
1
Action
Views
150
Answers
1
Action
Views
158
Answers
1
Action
Views
137
Answers
1
Action
Views
121
Answers
1
Action
Views
100
Answers
1
Action
Views
130
Answers
1
Action
Views
179
Answers
1
Action
Views
170
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
121
Answers
0
Action
Views
216
Answers
0
Action
Views
128
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
139
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