Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin dashboard where admins can view, edit, approve, delete snippets #7

Open
johnnncodes opened this issue Dec 14, 2013 · 6 comments

Comments

@johnnncodes
Copy link
Owner

No description provided.

@ghost
Copy link

ghost commented Dec 19, 2013

For the admin side I suggest using this package: https://github.com/MrJuliuss/syntara.

It uses Sentry, but I don't know how much is be done with your auth system. It should be refactored if you plan to use this package.

@ghost
Copy link

ghost commented Jan 4, 2014

screenshot 2014-01-04 13 57 07
What do you think ?

@johnnncodes
Copy link
Owner Author

Looks good. If you can replace the current simple authentication implementation w/o any issues then it would be great! 👍

@ghost
Copy link

ghost commented Jan 4, 2014

How would you organize the code?

Today I tried seeding the database using Faker, but I had some problems
with the Snippet model.

For the User model worked perfectly, but when I tried to run
SnippetsTableSeeder I always get this error: "Trying to get property of a
non-objecy".

Tomorrow I will post the code. Maybe I am doing something wrong.

If you have time try it yourself. Let me know id it worked for you.

On Sunday, January 5, 2014, John Kevin M. Basco wrote:

Looks good. If you can replace the current simple authentication
implementation w/o any issues then it would be great! [image: 👍]


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-31591365
.

Best regards,

Ionut Tanasa
tanasa.it http://www.tanasa.it
@ionutz2k https://twitter.com/ionutz2k

This email (including any attachment) is a personal message and may contain
confidential and/or privileged and/or proprietary information. If you have
received this email in error, please notify the sender immediately, do not
use or share it and destroy this email. Any unauthorized use, copying or
disclosure of the material in this email or of parts hereof (including
reliance thereon) is strictly forbidden.
I have taken precautions to minimize the risk of transmitting software
viruses but nevertheless advise you to carry out your own virus checks on
any attachment of this message. I accept no liability for loss or damage
caused by software viruses.


Cordiali saluti,

Ionut Tanasa
tanasa.it http://www.tanasa.it/
@ionutz2k https://twitter.com/ionutz2k

Il presente messaggio, inclusi gli eventuali allegati, ha natura personale
e potrebbe contenere informazioni confidenziali e/o riservate. Chiunque lo
ricevesse per errore, è pregato di avvisare tempestivamente il mittente e
di cancellarlo.
E’ strettamente vietata qualsiasi forma di utilizzo, riproduzione o
diffusione non autorizzata del contenuto di questo messaggio o di parte di
esso.
Pur essendo state assunte le dovute precauzioni per ridurre al minimo il
rischio di trasmissione di virus, si suggerisce di effettuare gli opportuni
controlli sui documenti allegati al presente messaggio. Non si assume
alcuna responsabilità per eventuali danni o perdite derivanti dalla
presenza di virus.

@johnnncodes
Copy link
Owner Author

I think its because of the SnippetObserver. When you are creating a snippet it auto attaches the id of the current logged-in user.

<?php namespace LaraSnipp\Observer\Snippet;

use Auth;

class SnippetObserver {

    public function creating($snippet)
    {
        $snippet->author_id = Auth::user()->id;
    }

}

In tests, to log in a user you can use: $this->be($user);

You can create a helper function in the seeder to login a user. Just copy the implementation of $this->be($user);

Source code: https://github.com/laravel/framework/blob/master/src/Illuminate/Foundation/Testing/TestCase.php#L345

@ghost
Copy link

ghost commented Jan 5, 2014

Ok. I'll make the necessary changes :)

@ghost ghost self-assigned this Jan 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant