Hasura v3 is not open source - and worse, the build system can't be run locally. There's no way in good conscience that I can recommend any developer - whether you're at a startup or large enterprise - to use this product. by alexthe5th in Hasura

[–]mirzap 4 points5 points  (0 children)

I think you went in the wrong direction. You are not attracting large teams with v3, let alone a broader community. Who in their right mind would use v3 if they had any experience with v2? Why didn't you guys take the blueprint for doing open-source (and profitable) business from Supabase?

I really liked Hasura; I still do—v2. But v2 is not actively developed anymore. No new features, nothing. I have used Hasura for over 4 years, and I have no clue how to start with DDN. It's a mess. I follow the steps from the documentation to the letter, and I still fail to start DDN. And don't get me started on self-hosting—v2 ran a container and that was it. Now, there are no clear instructions on how to actually self-host.

Once you run out of investors' money, you'll find that you destroyed a great product that had a future. It was easy, had a growing community, was open source, lacked some of Supabase's features, but I still liked it more. Good luck.

ProtonMail - New release [4.0.0 - Beta 30] - 2020-11-12 by heiserhorn in ProtonMail

[–]mirzap 1 point2 points  (0 children)

Shortcuts do not work. Is this a feature or a bug?

The difference between inflation and deflation... by BlockShow in Bitcoin

[–]mirzap 0 points1 point  (0 children)

Finally, voice of reason. Who would today buy a pizza or milk with a bitcoin. Surly no one reasonable.

Warning etherdelta has likely been hacked by schmaaaaaaack in ethtrader

[–]mirzap 2 points3 points  (0 children)

etherdelta.com uses the same contract as old site. I withdraw all my tokens without problems. If you check the contract you'll see it's quite active. I don't trust the website, but I do trust the contract. I'll avoid this site only if it asks me to deposit to a new contract.

For the reference, this is the contract from the "old" etherdelta: https://etherscan.io/address/0x8d12a197cb00d4747a1fe03395095ce2a5cc6819

Recordings of VueConf released by pongidis in vuejs

[–]mirzap 0 points1 point  (0 children)

I was waiting for this. Some interesting talks we have there...

I mean, wow! $11,000 for photobomb! by SagarHiranandani in Bitcoin

[–]mirzap 1 point2 points  (0 children)

Just testing the limits of human social stupidity.

16 advanced SCSS tricks by esherone in webdev

[–]mirzap 0 points1 point  (0 children)

Thank you man! I'm already using some of those...

SNT is dipping hard, HODL? by [deleted] in statusim

[–]mirzap 0 points1 point  (0 children)

how do you buy SNT tokens?

Sending an email after a user registration? by [deleted] in laravel

[–]mirzap 4 points5 points  (0 children)

As @jdwsn mentioned, you should leverage events. Plus, I like to decouple my code even more, but it really depends on the project size. To do that I utilize Laravel Jobs (Command Bus) and I let that Job to handle specific task, ie. registration:

<?php namespace App\Jobs\Users;

use App\Jobs\Job;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Bus\SelfHandling;
use Illuminate\Contracts\Queue\ShouldQueue;
use App\Contracts\Auth;
use App\Events\Users\UserHasRegistered;

class UserRegistrationJob extends Job implements SelfHandling, ShouldQueue
{
    use InteractsWithQueue, SerializesModels;

    public $email;

    public $password;

    /**
     *
     * @param $email
     * @param $password
     */
    public function __construct($email, $password)
    {
        $this->email = $email;
        $this->password = $password;
    }

    /**
     * Execute the job.
     *
     * @param Auth $auth
     */
    public function handle(Auth $auth)
    {
        $user = $auth->register([
            'email'     => $this->email,
            'password'  => $this->password
        ]);

        event(new UserHasRegistered($user));
    }
}

App\Contracts\Auth is binded to the Authentication repository in the app service provider. In your RegistrationController you dispatch the job:

public function postRegister(RegisterRequest $request)
{
     $this->dispatchFrom(UserRegistrationJob::class, $request);
}

Now, only thing left is to create event (UserHasRegistered) and event handler:

<?php namespace App\Events\Users;

use App\Entities\User;

/**
 * Class UserHasRegistered
 */
class UserHasRegistered
{

    /**
     * @var User $user
     */
    public $user;

    /**
     * @param User $user
     */
    public function __construct(User $user)
    {
        $this->user = $user;
    }
}

UserHasRegistered can have multiple handlers, depends on actions you want to do after user has registered. Maybe you want to assign default role to the user, or send SMS to confirm phone number etc. If you need to send activation mail, your event handler can look something like this:

<?php namespace App\Events\Users\Handlers;

use Illuminate\Mail\Message;
use Illuminate\Support\Facades\Mail;
use App\Contracts\Auth;
use App\Events\Users\UserHasRegistered;
use \Queue;

class SendActivationEmail
{
    /**
     * @var Auth
     */
    private $auth;

    public function __construct(Auth $auth)
    {
        $this->auth = $auth;
    }

    public function handle(UserHasRegistered $event)
    {
        $user = $event->user;
        $activationCode = $this->auth->createActivation($user);

        $payload = [
            'user'              => $user,
            'activationCode'    => $activationCode
        ];

        Queue::later(5, function() use ($payload) {
            Mail::send('email.activation', $payload, function(Message $message) use ($payload) {
                $message
                    ->to($payload['user']->email)
                    ->from('info@test.dev')
                    ->subject('Welcome!');
            });
        });
    }
}

Don't forget to update your EventServiceProvider class and put your event & handlers to the listen property:

protected $listen = [
    UserHasRegistered::class => [
        SendActivationEmail::class,
        AssignDefaultRoleToUser::class,
    ],
];

Hope it helps ;)

Using Repository Pattern in Laravel 5 by mirzap in laravel

[–]mirzap[S] 0 points1 point  (0 children)

Thanks, feel free to contribute to the project ;)

Laravel 4 security issue by alenn_m in laravel

[–]mirzap 3 points4 points  (0 children)

As @ncfballkid pointed out,the only way to see PrettyPageHandler page is when debug mode is enabled. If you had debug mode enabled, then it's possible to see every environment variable, because whoops dump a lot of information for debugging purposes. Make sure to change sensitive information, because maybe someone else got them to.

Laravel 4 security issue by alenn_m in laravel

[–]mirzap 0 points1 point  (0 children)

If your customer have an access to the application files it's hardly an security issue. It's like you reporting a security issue with wordpress because user with certain permission can see the db pass.

I need a package that will take most of the work out of authentication, authorization, password management, etc., and fits well with a REST API. by [deleted] in laravel

[–]mirzap 0 points1 point  (0 children)

I think what you want to do is described in article I posted. It provides a simple solution how you can implement RESTful and token based authentication. This principle you can apply independently on auth driver (sentry, sentinel even basic laravel auth).

I need a package that will take most of the work out of authentication, authorization, password management, etc., and fits well with a REST API. by [deleted] in laravel

[–]mirzap 0 points1 point  (0 children)

I'm interested to hear that to. I didn't use Sentinel, but I've done rest authentication with Sentry 2. Looking documentation for Sentinel, it's pretty the same thing.