Git Product home page Git Product logo

tutorial-laravel-4-acl's People

Contributors

assertchris avatar rebornishard avatar shoully 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

tutorial-laravel-4-acl's Issues

Fresh install doesn't work

php artisan migrate gives this output:

{"error":{"type":"Exception","message":"SQLSTATE[42S02]: Base table or view not
found: 1146 Table 'tutorial_auth.resource' doesn't exist (SQL: select * from re source where resource.deleted_at is null and secure = ?) (Bindings: array
(\n 0 => false,\n))","file":"C:\xampp\htdocs\tutorial-laravel-4-acl-master
\vendor\laravel\framework\src\Illuminate\Database\Connection.php","line":5
55}}

I can't find the bug

Redirect Loop ...

Hello Chris,

I am having a small problem with the tutorial on medium. When I am logged in I get into a redirect loop for every route. Can you tell me any specific reason in this filter.

Route::filter("auth", function(){
if (Auth::guest()){
return Redirect::route("user/login");
}else{
/* specifically this part*/
foreach (Auth::user()->groups as $group){
foreach ($group->resources as $resource){
if ($resource->pattern == Route::getCurrentRoute()->getPath()){
return;
}
}
}
return Redirect::route("user/login");
}
});

Looking for your quick reply.

Thanks

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.