Code Monkey home page Code Monkey logo

syntara's People

Contributors

aeleftheriadis avatar amitfts avatar anhskohbo avatar aristona avatar boyaq avatar chamnan avatar dansullivan86 avatar deanstr avatar dgeorgiev avatar ershat avatar felipepastor avatar grahamcampbell avatar jkaflik avatar mgufrone avatar mrjuliuss avatar mrkoopie avatar mysteryos avatar nille avatar pablomaurer avatar remo avatar ryanwinchester avatar santiblanko avatar sgotre avatar sineld avatar stevebauman avatar twmbx avatar uyson avatar waterspout avatar xgenvn avatar xonefobic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

syntara's Issues

username

can we use username on login form?
or we must use email?
and where i can set the $sitename ?

1.1.12 user creation fails :D

Sorry for bothering you but now it says this ... when i try to create the user
C:\xampp\htdocs\tiziano-par>php artisan create:user super [email protected] password Admin

[ErrorException]
Argument 2 passed to Illuminate\Validation\Factory::make() must be of the type array,
null given, called in C:\xampp\htdocs\tiziano-par\vendor\laravel\framework\src\Illum
inate\Support\Facades\Facade.php on line 209 and defined

create:user username email password [group]

Use different route for user login/register/forgot/edit

Hi MrJuliuss, after long time I had to create project from start and I've forgot where I can change routes because now when my route is protected with basicAuth it gets redirected to localhost/project/public/dashboard/login . What I want is that user (from front end) will login through localhost/project/public/user/login . Because this will have different views than dashboard. (without dashboard, because that route will be for admins only).
Any suggestions?

In my front end user will have options to register,login,edit profile, send forgotten password. All this has to be accessible through localhost/project/public/user/login (register,forgot,edit etc).

localhost/project/public/dashboard will still be accessible but only to admins or specific groups

[Suggestions)

If user has permissions to create groups, make so that he can only see "his" groups, not all groups created by users.

Profiler Bar incompatible?

Hi,

I have the package sebklaus/profiler installed and when debug is true, i cant see the users list page (500 http error).

But in the groups list page i can see the error log and this is what i get:

"log.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144000 bytes)' "

When debug bar is off website is fine.

Thanks

Changing the project language

Hi,

Your plugin is very nice. My question is how can i change the language configuration in the project? I've seen you used "{{ trans('syntara::all.password') }}" to translate but i'm wnating to use my own config translation. And if you want some help to translate to Portuguese (Brazil), i would like to help.

Thanks for your attention.

jquery autocomplete css

Hi,

I have implemented the jquery autocomplete for a input form field. I am able to get the autocomplete options but these options are shown at the top of the web page and not near the input field. Seems like CSS issue. Please help.

autocomplete

Favicon

I think this section is not working:

To add your own favicon to Syntara, you need to use a view composer

View::composer('syntara::layouts.dashboard.master', function($view)
{
    $view->nest('favicon', 'favicon_path');
    $view->nest('faviconType', 'favicon_type');
});

Sessions

Hi Mr Juliuss, i'm new using laravel and of course your package and i really love it, However, i want to control the session time for the users, but i wanna ask you something... what's the best way to add session expiration for the users?. Please I just want to know your opinion or an idea. Thanks for reading.

Login

When the users are logged in my system they are redirected to the main page of the site. In what line I can change this?

[suggestion] Suspend a user, Search For a Suspended user, Suspend for a certain amount of time

Looking through Sentry 2 Docs I saw that you can suspend a user too.

So you could:

  • Suspend a User for ever until you manually unsuspend it

    // Find the user using the user id
    $throttle = Sentry::findThrottlerByUserId($userID);
    
    // Suspend the user
    $throttle->suspend();
  • Suspend a User for a certain amount of time

    $throttle = Sentry::findThrottlerByUserId($userID);
    
    $throttle->setSuspensionTime($amountOfTime);

Also you could add in index-user.blade.php something like this:

<div class="form-group">
        <label for="suspendedSearch">Suspended</label>
        <select class="form-control" id="suspendedSearch" name="suspendedSearch">
                    <option>--</option>
                    <option value="0">No</option>
                    <option value="1">Yes</option>
                    </select>
</div>

What do you think?

screenshot 2013-10-10 14 54 18

Add i18n / l10n

Would it be possible to add a "localize Syntara" task in your todolist ?

I'd ask whether you needed help with writing the french translation, but it's also your mother tongue (if i'm not mistaken ?)...

Your package is a really nice user management GUI which would definitely benefit from offering more than one language, or at least the possibility of it.

Can't make new features

I was folow the CUSTOM DEVELOPMENT document.
I create home controller in apps/controllers views in apps/views/index.blade.php
i got error : syntax error, unexpected 'extends' (T_EXTENDS).
Please help me thanks

[suggestion] Add "Active" column in dashboard/users

Hi, first of all thank you for this awesome package!

I'd have a sugestion tho ...

When you hit dashboard/users and it shows all the users, wouldn't be useful to have another column in the table that says if the user is activated or not?

Id
Username
Email
Groups
Permissions
Last Name
First Name
Banned
Active ?
Show

What do you think ?

[WIP] User activation by email

Work In Progress :

Possiblity to active a user by sending an email.
Options :

  • activation type : email or auto
  • email view
  • Success/Error activation view
  • Contact name (sender)

Undefined variable: currentUser

Hi, I am trying to create a new custom page as instructed in the documentation. But I get ErrorException. Can you help me?

Thanks

Improve permissions' management

Hi,
I think it would be great to add some other features to the permissions :

  • Be able to retrieve all users and groups having a specific permission ( $permission->users() for example)
  • When you delete a permission, you have to delete it in all users and groups containing this permission, for example :
    foreach ($this->users() as $user) {
    $user->setPermissionAttribute([this->name => 0]);
    $user->save();
    }

What do you think ?

Error while running php artisan syntara:install

Next exception 'Exception' with message 'SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL (SQL: alter table "users" add column "username" varchar not null) (Bindings: array (
))' in C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Database\Connection.php:556
Stack trace:
#0 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Database\Connection.php(529): Illuminate\Database\Connection->handleQueryException(Object(PDOException), 'alter table "us...', Array)
#1 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Database\Connection.php(332): Illuminate\Database\Connection->run('alter table "us...', Array, Object(Closure))
#2 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Database\Schema\Blueprint.php(63): Illuminate\Database\Connection->statement('alter table "us...')
#3 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Database\Schema\Builder.php(150): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\SQLiteConnection), Object(Illuminate\Database\Schema\Grammars\SQLiteGrammar))
#4 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Database\Schema\Builder.php(75): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint))
#5 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(209): Illuminate\Database\Schema\Builder->table('users', Object(Closure))
#6 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\mrjuliuss\syntara\src\migrations\2013_07_16_172358_alter_user_table.php(19): Illuminate\Support\Facades\Facade::__callStatic('table', Array)
#7 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\mrjuliuss\syntara\src\migrations\2013_07_16_172358_alter_user_table.php(19): Illuminate\Support\Facades\Schema::table('users', Object(Closure))
#8 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(137): AlterUserTable->up()
#9 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(113): Illuminate\Database\Migrations\Migrator->runUp('2013_07_16_1723...', 2, false)
#10 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(84): Illuminate\Database\Migrations\Migrator->runMigrationList(Array, false)
#11 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Database\Console\Migrations\MigrateCommand.php(67): Illuminate\Database\Migrations\Migrator->run('C:\Users\Graham...', false)
#12 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Console\Command.php(108): Illuminate\Database\Console\Migrations\MigrateCommand->fire()
#13 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\symfony\console\Symfony\Component\Console\Command\Command.php(244): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Console\Command.php(96): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Console\Command.php(124): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\mrjuliuss\syntara\src\commands\InstallCommand.php(57): Illuminate\Console\Command->call('migrate', Array)
#17 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Console\Command.php(108): MrJuliuss\Syntara\Commands\InstallCommand->fire()
#18 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\symfony\console\Symfony\Component\Console\Command\Command.php(244): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\laravel\framework\src\Illuminate\Console\Command.php(96): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\symfony\console\Symfony\Component\Console\Application.php(897): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\symfony\console\Symfony\Component\Console\Application.php(191): Symfony\Component\Console\Application->doRunCommand(Object(MrJuliuss\Syntara\Commands\InstallCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 C:\Users\Graham\Desktop\Laravel-Base-4.0\vendor\symfony\console\Symfony\Component\Console\Application.php(121): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 C:\Users\Graham\Desktop\Laravel-Base-4.0\artisan(59): Symfony\Component\Console\Application->run()
#24 {main} [] []

Support Laravel 4.1 (released !)

Hi, if you have any questions, please ask here :)

Upgrade informations :

  • branch Syntara 1.1, support L4.0 and PHP 5.3+
  • branch Syntara 1.2, support L4.1 and PHP 5.4+
    No new feature (may there will be exceptions) on the 1.1 branch, just fixes.

Query user to LDAP server

Being able to handle LDAP users, offers a lot of potential to enterprise applications.
I belive it should work like this:
1rst login

  • validates wheter its a local user or ldap source
  • corroborates user id and password and registers user, marks the source. ldap should store the passwords
  • validates if the user group exists
    -- if the group exist assigns user group
    -- else sends mail to administrator to assign group to user

2nd and on logins

  • validates wheter its a local user or ldap source
  • ldap user, query ldap access

3rd maintenance

  • there should be a process to disable users, since ldap handles its administration disabled shoul be disable within syntara as well

[Question] How to edit the existing views & controllers

Hi, thanks for your work before anything.

I did read readme.md but i cant figure it out how i can customize the getIndex() method and the list-users view without change it on the vendor/package folder.

Sorry i am noob.

Option to assign registered users to default group

Currently, when I register a new user, the user automatically has superuser (admin) permissions and is put in the Admin group. Would you like to make an option to set a group as a default group for new users?

Suggest to use @extend() with Config::get() for better implementation

Hi,

In my case I'd like to extend Syntara views by editing Syntara config file, the master layout and header chunk. But in most of other views (like User, Group or Permission), at the moment we stick to static value of Syntara views, so I have to extend them by copying and editing just one row around. I think it'll be better if we can try with @extend(Config::get('syntara::views.master')) for instance, so if a user want to change the master for all other views, it can be done easily.

Actually I can contribute to the source, because it's quite easy task on this type of problem. I'd glad to do so if you think it's good.

Thanks.

Log viewer

What do you think of a log viewer? I'll be happy to do a pull request as I've got some code already that I use. I find it very helpful when debugging quickly / if I am away from development setup/ssh access.

Here is an example from a previous project..

log-example

The dropdown lets you filter from the available types. Eg debug, info, error, warning etc... The search also has text highlighting (in a different project but easy to add as well).

1.1.11 is broken

C:\xampp\htdocs\tiziano-par>php artisan syntara:install ## Syntara Install

Configuration published for package: cartalyst/sentry
Configuration published for package: mrjuliuss/syntara
Assets published for package: mrjuliuss/syntara
Migration table created successfully.
Migrated: 2012_12_06_225921_migration_cartalyst_sentry_install_users
Migrated: 2012_12_06_225929_migration_cartalyst_sentry_install_groups
Migrated: 2012_12_06_225945_migration_cartalyst_sentry_install_users_groups_pivot
Migrated: 2012_12_06_225988_migration_cartalyst_sentry_install_throttle

[ErrorException] Argument 2 passed to Illuminate\Validation\Factory::make() must be of the type array, null given, called in C:\xampp\htdocs\tiziano-par\vendor\laravel\framework\src\Illum inate\Support\Facades\Facade.php on line 209 and defined

syntara:install

Hi @MrJuliuss,

I just tried to install Syntara. Don't know what happened with this version but when it tries to create the Admin group it dies :(

I have tried 1.1.10 and it works

How do I customise the name of the users table?

My database already has a users table. Is there a configuration option to change the name of the table which syntara will use on install?

Syntara publishes the sentry config assets on install so not sure how I can override them.

Doubt in filters.php

Please clarify the logic behind the below piece of code in filters.php, preferably a detailed description

Route::filter('hasPermissions', function($route, $request, $userPermission = null)
{
if (Route::currentRouteNamed('putUser') && Sentry::getUser()->id == Request::segment(3) ||
Route::currentRouteNamed('showUser') && Sentry::getUser()->id == Request::segment(3))
{
}

installation problems

Hi,
i am on my way to try to install this package and run into some problems during the installation process

i followed strict the steps you recommend here on git

after calling the command php artisan syntara:install i get displayed following messages:


[Exception]
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'users_username_unique' (SQL: alter table users add unique users_usernam
e_unique(username)) (Bindings: array (
)) ------------------------------------------------------------------------------------------------------

[PDOException]
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'users_username_unique'


hope for some help

best regards Ludwig

php artisan syntara:install nothing to migrate

Hi, I was triying to set up the sintara admin but when I execute php artisan syntara:install it gives me errors about user table not found. Do I need to create the user and group, etc tables by myself? Or use the sentry migration?

Send activation link to user by email (Invitation system) - with working code

Hi,

I needed invitation system that will send activation email to user, after user visits the link his profile will be activated.

I thought I should share my code if someone will found it useful.

Blade:

{{ Form::open(array('url' => 'user/invite')) }}
    <input type="hidden" name="csrf_token" id="csrf_token" value="{{{ Session::getToken() }}}" />

    <div class="{{{ $errors->has('first_name') ? 'error' : '' }}}">
        <label for="first_name">Name</label>
        <input type="text" name="first_name" id="first_name" value="" />
        {{{ $errors->first('first_name') }}}
    </div>

    <div class="{{{ $errors->has('email') ? 'error' : '' }}}">
        <label for="email">Email</label>
        <input type="text" name="email" id="email" value="" />
        {{{ $errors->first('email') }}}
    </div>

    <div class="{{{ $errors->has('password') ? 'error' : '' }}}">
        <label for="password">Password</label>
        <input type="password" name="password" id="password" value="" />
        {{{ $errors->first('password') }}}
    </div>

<input type="hidden" name="activation" id="activation" value="1" />
    {{ Form::submit('Povabi',array('class' => 'button'));}}
{{ Form::close() }} 

UserController@postInvite

public function postInvite()
    {
         // Declare the rules for the form validation
                $rules = array(
                        'first_name'       => 'required|min:3',                       
                        'email'            => 'required|email|unique:users',                      
                        'password'         => 'required|between:3,32',
                );

                // Create a new validator instance from our validation rules
                $validator = Validator::make(Input::all(), $rules);

                // If validation fails, we'll exit the operation now.
                if ($validator->fails())
                {
                        // Ooops.. something went wrong
                        return Redirect::back()->withInput()->withErrors($validator);
                }

                try
                {
                        // Register the user
                        $user = Sentry::register(array(
                                'username'   => Input::get('first_name'),
                                'first_name' => Input::get('first_name'),
                                'email'      => Input::get('email'),
                                'password'   => Input::get('password'),
                        ));

                        // Data to be used on the email view
                        $data = array(
                                'user'          => $user,
                                'activationUrl' => URL::route('activate', $user->getActivationCode()),
                        );

                        // Send the activation code through email
                        Mail::send('emails.auth.invite', $data, function($m) use ($user)
                        {
                                $m->from('[email protected]','test');
                                $m->to($user->email, $user->first_name . ' ' . $user->last_name);
                                $m->subject('Hello' . $user->first_name);
                        });

                        // Redirect to the register page
                        return Redirect::back()->with('success','Activation mail was sent!');
                }
                catch (Cartalyst\Sentry\Users\UserExistsException $e)
                {
                        $this->messageBag->add('email','Something went wrong!');
                }

                // Ooops.. something went wrong
                return Redirect::back()->withInput()->withErrors($this->messageBag);
    }

userController@getActivate

public function getActivate($activationCode = null)
        {
                // Is the user logged in?
                if (Sentry::check())
                {
                        return Redirect::to('projects');
                }

                try
                {
                        // Get the user we are trying to activate
                        $user = Sentry::getUserProvider()->findByActivationCode($activationCode);

                        // Try to activate this user account
                        if ($user->attemptActivation($activationCode))
                        {
                                // Redirect to the login page
                                return Redirect::to('user/login')->with('success', 'Your profile is activated. Now you can log in!');
                        }

                        // The activation failed.
                        $error = 'Something went wrong!';
                }
                catch (Cartalyst\Sentry\Users\UserNotFoundException $e)
                {
                        $error = $e;
                }

                // Ooops.. something went wrong
                return Redirect::to('user/login')->with('error', $error);
        }

[suggestion] Suspend a user, Search For a Suspended user, Suspend for a certain amount of time

Looking through Sentry 2 Docs I saw that you can suspend a user too.

So you could:

  • Suspend a User for ever until you manually unsuspend it

    // Find the user using the user id
    $throttle = Sentry::findThrottlerByUserId($userID);
    
    // Suspend the user
    $throttle->suspend();
  • Suspend a User for a certain amount of time

    $throttle = Sentry::findThrottlerByUserId($userID);
    
    $throttle->setSuspensionTime($amountOfTime);

Also you could add in index-user.blade.php something like this:

<div class="form-group">
        <label for="suspendedSearch">Suspended</label>
        <select class="form-control" id="suspendedSearch" name="suspendedSearch">
                    <option>--</option>
                    <option value="0">No</option>
                    <option value="1">Yes</option>
                    </select>
</div>

What do you think?

screenshot 2013-10-10 14 54 18

Nested permissions

Hey, i belive you could get a better/explicit permision management nesting the permission items, ejem:
Users

  • User
    ++ Search
    ++ show
    +++ edit
    ++ New user

this way you can symplify management when handling hundreds of items.

Left panel

What is best approach to include the left panel in the website?
Any recommendations of the jquery.mmenu implementations?

PDO error for php artisan syntara:install and create user

prompt>php artisan syntara:install

Syntara Install

Configuration published for package: cartalyst/sentry
Configuration published for package: mrjuliuss/syntara
Assets published for package: mrjuliuss/syntara

[PDOException]
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '
/var/run/mysqld/mysqld.sock' (2)

syntara:install

it's in a shared hosting service, so i can't modify how mysql is configured.

query user to OpenID service

By enabling open id login, casual users are more likely to register within the site.
since the open id service can provide basic information there should no be anytrouble at all. should work like this:
1rst login

  • validates user and login source
  • asign a default profile to user

Send activation link to user by email (Invitation system) - with working code

Hi,

I needed invitation system that will send activation email to user, after user visits the link his profile will be activated.

I thought I should share my code if someone will found it useful.

Blade:

{{ Form::open(array('url' => 'user/invite')) }}
    <input type="hidden" name="csrf_token" id="csrf_token" value="{{{ Session::getToken() }}}" />

    <div class="{{{ $errors->has('first_name') ? 'error' : '' }}}">
        <label for="first_name">Name</label>
        <input type="text" name="first_name" id="first_name" value="" />
        {{{ $errors->first('first_name') }}}
    </div>

    <div class="{{{ $errors->has('email') ? 'error' : '' }}}">
        <label for="email">Email</label>
        <input type="text" name="email" id="email" value="" />
        {{{ $errors->first('email') }}}
    </div>

    <div class="{{{ $errors->has('password') ? 'error' : '' }}}">
        <label for="password">Password</label>
        <input type="password" name="password" id="password" value="" />
        {{{ $errors->first('password') }}}
    </div>

<input type="hidden" name="activation" id="activation" value="1" />
    {{ Form::submit('Povabi',array('class' => 'button'));}}
{{ Form::close() }} 

UserController@postInvite

public function postInvite()
    {
         // Declare the rules for the form validation
                $rules = array(
                        'first_name'       => 'required|min:3',                       
                        'email'            => 'required|email|unique:users',                      
                        'password'         => 'required|between:3,32',
                );

                // Create a new validator instance from our validation rules
                $validator = Validator::make(Input::all(), $rules);

                // If validation fails, we'll exit the operation now.
                if ($validator->fails())
                {
                        // Ooops.. something went wrong
                        return Redirect::back()->withInput()->withErrors($validator);
                }

                try
                {
                        // Register the user
                        $user = Sentry::register(array(
                                'username'   => Input::get('first_name'),
                                'first_name' => Input::get('first_name'),
                                'email'      => Input::get('email'),
                                'password'   => Input::get('password'),
                        ));

                        // Data to be used on the email view
                        $data = array(
                                'user'          => $user,
                                'activationUrl' => URL::route('activate', $user->getActivationCode()),
                        );

                        // Send the activation code through email
                        Mail::send('emails.auth.invite', $data, function($m) use ($user)
                        {
                                $m->from('[email protected]','test');
                                $m->to($user->email, $user->first_name . ' ' . $user->last_name);
                                $m->subject('Hello' . $user->first_name);
                        });

                        // Redirect to the register page
                        return Redirect::back()->with('success','Activation mail was sent!');
                }
                catch (Cartalyst\Sentry\Users\UserExistsException $e)
                {
                        $this->messageBag->add('email','Something went wrong!');
                }

                // Ooops.. something went wrong
                return Redirect::back()->withInput()->withErrors($this->messageBag);
    }

userController@getActivate

public function getActivate($activationCode = null)
        {
                // Is the user logged in?
                if (Sentry::check())
                {
                        return Redirect::to('projects');
                }

                try
                {
                        // Get the user we are trying to activate
                        $user = Sentry::getUserProvider()->findByActivationCode($activationCode);

                        // Try to activate this user account
                        if ($user->attemptActivation($activationCode))
                        {
                                // Redirect to the login page
                                return Redirect::to('user/login')->with('success', 'Your profile is activated. Now you can log in!');
                        }

                        // The activation failed.
                        $error = 'Something went wrong!';
                }
                catch (Cartalyst\Sentry\Users\UserNotFoundException $e)
                {
                        $error = $e;
                }

                // Ooops.. something went wrong
                return Redirect::to('user/login')->with('error', $error);
        }

Ajax dynamic dropdown list

Hi,

I need help on to populate a dropdown dynamically(ajax) based on previous dropdown value.

For example I have dropdown 1 for course type and dropdown 2 for course specialization. Once I select a value in course type as 'masters' all the specializations in course type 'masters' has to be displayed in the second dropdown.

Error in Stream Handler - FIXED

Running mamp, and Laravel 4.1.* (latest version as of yesterday) what seems to be the issue here?

Error in exception handler: The stream or file "/Applications/MAMP/htdocs/example/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /Applications/MAMP/htdocs/example/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:70

Ran a chmod 777 and received this in terminal:
chmod: Unable to change file mode on app/storage/sessions/3f7136935741e46c2de1bec56d1203dde9919946: Operation not permitted

Refreshed and got this error from Laravel:
Call to undefined method Illuminate\Cookie\CookieJar::get()

Error was on line 105 in Cartalyst/Sentry/Cookies/IlluminateCookie.php:
return $this->jar->get($this->getKey());

Any solutions here? project at a stand still.....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.