Giter Site home page Giter Site logo

laravel-5-roles-and-permissions-demo's Introduction

Laravel PHP Framework

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching.

Laravel is accessible, yet powerful, providing powerful tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked.

Official Documentation

Documentation for the framework can be found on the Laravel website.

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at [email protected]. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license

laravel-5-roles-and-permissions-demo's People

Contributors

jeffreyway 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

laravel-5-roles-and-permissions-demo's Issues

Package Install

After download can't install the laravel package.

QueryException in Connection.php line 636:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'acl.permissions' doesn't exist (SQL: select * from permissions)

FatalThrowableError in Guard.php line 430

I have migrated successfully and now when I am trying to serve the server, it is showing the error in browser. Please help on this.

FatalThrowableError in Guard.php line 430:
Type error: Argument 1 passed to Illuminate\Auth\Guard::login() must implement interface >Illuminate\Contracts\Auth\Authenticatable, null given, called in /Users/../laravel-5-roles-and->permissions-demo/vendor/laravel/framework/src/Illuminate/Auth/Guard.php on line 489

ERROR: select * from `permissions`

This code in file app/Providers/AuthServiceProvider.php

        foreach ($this->getPermissions() as $permission) {
            $gate->define($permission->name, function ($user) use ($permission) {
                return $user->hasPermission($permission);
            });
        }                                                                                                                     

return errors when you deploy project

  [Illuminate\Database\QueryException]                                                                               
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xxx.permissions' doesn't exist (SQL: select * from  
   `permissions`)  
  [PDOException]                                                                                 
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xxx.permissions' doesn't exist  

You have to comment this php code lines, execute php artisan migrate and uncomment back.

AuthServiceProvider

On Github
$user->hasRole($permission->roles);

From Video:
return $user->hasRole($permission->roles);

With this from Video works...

User permission

If I want to create a permission that it can only edit the post created by himself, how to do this? 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.