jeremykenedy / laravel-material-design

Laravel 5.6 on Material Design Lite 1.3 with user authentication, registration with email confirmation, social media authentication, password recovery, and captcha protection. This makes full use of Controllers for the routes, templates for the views, and makes use of middleware for routing. Uses laravel ORM modeling and has CRUD (Create Read Update Delete) functionality for all tasks. Quick setup, can be done in 5 minutes. It will take longer to obtain your Facebook, Twitter, and Google Plus API Keys than it will to set this up.
https://mdl.consultjeremy.com
MIT License
261 stars 108 forks source link

ErrorException in some routes #1

Closed odyright closed 8 years ago

odyright commented 8 years ago
  1. after registration the user can't get the email confirmation , it's send to your email: (jeremy....)
  2. Problem with role attribution when i hijack through the database... to access admin area
  3. ErrorException in... when we wan't to reach profile page, change the user role, ...
jeremykenedy commented 8 years ago

Hey, did you configure your email in the.env. What happens when you search the code for the erroneous email address?

To change the role in the user roles table change the role id to 3. That's an admin role.

The third issue is caused by not having the $access variable set correctly which is passed from the controller. Once you correct your error above it will work.

Thank you for checking it out!

jeremykenedy commented 8 years ago

Also,

Make sure you have ran your migration and seeds. The user roles are seeded.

odyright commented 8 years ago

Yes i changed all in the .env file.

Don't worry about that admin role..i told you that i did through the database as you describe above. And i don't understand very well the point about $access.

odyright commented 8 years ago

Is the Laravel 5.3 branch ready to use?

jeremykenedy commented 8 years ago

No, and I doubt it ever will be.

Sent from my iPhone

On Sep 9, 2016, at 10:04 AM, Daniel notifications@github.com wrote:

Is the Laravel 5.3 branch ready to use?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jeremykenedy commented 8 years ago

I am not a fan of the higher php requirements which make this project more complex to get going out the box. I also think that the way Taylor keeps redoing the auth in every different version is a too much major change for anyone with existing projects and it's overkill unneeded work.

Sent from my iPhone

On Sep 9, 2016, at 10:04 AM, Daniel notifications@github.com wrote:

Is the Laravel 5.3 branch ready to use?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

odyright commented 8 years ago

You right, He made too much major change which kill existing projects's structure. I cloned your L 5.3 , i'll try to test it and work with it.

I noticed that there's a problem with the auth... maybe the middleware or something else!

jeremykenedy commented 8 years ago

Thanks for letting me know about the email issue, I had left some php vars in there that I was using when working on the views front end. The vars have been removed and the email will now send to what is in the .env file.

Currently, the auth is all working properly as well, I see no issues. It was all most likely related to the email activation issue outlined above.

Thanks again.

odyright commented 8 years ago

Hello, There's still an issue with the email activation, after registration the user expect receiving an email with credentials... But it's seems nothing happened. Did you properly set the email_send's route? or something like that... I checked and i did some modification but nothing happened: route Route::post('/send', 'EmailController@send');

controller

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;

class EmailController extends Controller
{
    //
    public function send(User $user)
    {
        $data = array(
            'name' => $user->name,
            'code' => $user->activation_code,
        );

        \Mail::send('emails.send', $data, function($message) use ($user) {
            $message->subject( \Lang::get('auth.pleaseActivate') );
            $message->to($user->email);
        });
        return response()->json(['message' => 'Request completed']);
    }

}

Can you fix it?

jeremykenedy commented 8 years ago

It works fine for me, once the user registers they get an email with a the activation token in it, they click the link, it activates the account and creates a user profile.

It worked perfect for me. Check your email config in the .env file again and make sure you can send email from your server.

Again, it is working fine, I've tested it multiple times. It's either your server not sending an email or there was step was skipped in the setup.

On Sep 10, 2016, at 3:36 AM, Daniel notifications@github.com wrote:

Hello, There's still an issue with the email activation, after registration the user expect receiving an email with credentials... But it's seems nothing append. Did you properly set the email_send's route? or something like that... I checked and i did some modification but nothing happened: route Route::post('/send', 'EmailController@send');

controller

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;

class EmailController extends Controller { // public function send(User $user) { $data = array( 'name' => $user->name, 'code' => $user->activation_code, );

    \Mail::send('emails.send', $data, function($message) use ($user) {
        $message->subject( \Lang::get('auth.pleaseActivate') );
        $message->to($user->email);
    });
    return response()->json(['message' => 'Request completed']);
}

} Can you fix it?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

jeremykenedy commented 8 years ago

I went through it all again this AM and it is working fine. Here is the video of my setup this morning starting with a clone from GIT.

https://s3-us-west-2.amazonaws.com/github-project-images/laravel-mdl-setup.gif

odyright commented 8 years ago

HAaaaaah yeah sorry my bad. It works fine.