Skip to content

oulfr/laravel-wordpress

Repository files navigation

"# laravel-wordpress" This application is inspired from the code of wordpress and https://github.com/corcel/corcel. The most important things in this package is The User--> Roles, that well not found in corcel, the user roles is copied from the code source of wordpress and adapted to laravel. to use this app add to your user the HasMeta trait:

   /**
 * Class User
 * @package App\Models
 */
class User extends Model implements AuthenticatableContract, AuthorizableContract
{
    use Authenticatable, Authorizable, HasApiTokens, HasMeta, HasRoles;
    
 }

Then in your routes use the middleware has_cap with capabilites or roles created in your wordpress:

$router->group([
       'middleware' => ['auth:api','has_cap:customer|shop_manager|New_Roles|edit_post']], function () use ($router) {}]);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published