so2platform/publicprofile

Public Profile for Laravel 5
96
Install
composer require so2platform/publicprofile
Latest Version:1.4.9
PHP:>=5.3.0
Last Updated:Apr 27, 2018
Links: GitHub  ·  Packagist
Maintainer: antoniobg

Public Profile for Laravel 5

Alt textAlt text

Synergy O2

####How Install

  1. Important, this package requieres node.js and npm installed.

  2. Run composer require so2platform/publicprofile composer require league/flysystem-aws-s3-v3 composer require predis/predis composer require league/flysystem-aws-s3-v3 ~1.0

  3. Run.

    npm install express ioredis socket.io --save #Or if using yarn : yarn add express ioredis socket.io --save

  4. Configure your aws s3 bucket credentials at config/publicprofile.php

  5. In env file change BROADCAST_DRIVER driver to redis

    BROADCAST_DRIVER=redis

  6. Add package ServiceProvider to conf/app.php providers

    So2platform\Publicprofile\Providers\PublicProfileServiceProvider::class,

  7. Run dump-autoload

    composer dump-autoload

  8. Publish package content

    php artisan vendor:publish --provider="So2platform\Publicprofile\Providers\PublicProfileServiceProvider"

  9. Now in the browser navigate to http://"projectname"/profile/installer and select install. This will generate the required tables on configured database connection.

  10. Start the nodejs server

    node vendor/so2platform/publicprofile/socket.js

  11. Configure auth model, model primary id and s3 settings in config/publicprofile.php

    /* Node server url */ 'node_server' => 'http://cmsmodule.local:3000',

     'default_auth_model_id' => 1,
     'default_public_profile_id' => 1,
     'auth_model_key' => "id_cliente",
     'auth_guard' => "web",
    
     /* Public profile backend Home view */
     'backend_home_view' => 'public_profile',
    
     /* Public session settings */
     'public_session_instance' => '',
    
     /* S3 Config */
     's3_public_profile' => [
         'S3_KEY' => env('AWS_KEY'),
         'S3_SECRET' => env('AWS_SECRET'),
         'S3_REGION' => env('AWS_REGION'),
         'S3_BUCKET' => 'https://'.env('AWS_BUCKET').'.s3.amazonaws.com/',
         'S3_BUCKET_POSTS_DIRECTORY' => 'public/publicprofiles/profileposts/',  // With slash at end.
         'S3_BUCKET_IMAGES_DIRECTORY' => 'public/publicprofiles/profileimages/',  // With slash at end.
         'S3_BUCKET_COVER_DIRECTORY' => 'public/publicprofiles/profilecovers/',  // With slash at end.
     ]
    
  12. Now you've installed the Public Profiles App, now goto to http://yourlocal/profile/installer

####Setup This package requieres a little configuration at conf/publicprofiles file parameters:

  • default_auth_model_id = If there's not an active session then we use this.
  • default_public_profile_id = We need an id (session, login, etc...) in order to associate a profile to it, if's doesn't exists then the package will use this.
  • auth_model_key = session/model id key name.
  • auth_guard = guard name.
  • views_to_use = This configuration parameter is in order use the base views (within package) or publised views. this is important parameter because we will not extend or publish controllers. (views can override this at extends line).
  • backend_home_view = Default backend view.
  • backend_home_view = This is because if a user is searched by id or his nickname at url bar the package creates a instance of session of his profile to show (like a default profile in the browser).

Related Packages

laravel/pint

An opinionated code formatter for PHP.

190,686,302 3,164
tightenco/duster

Automatic configuration for Laravel apps to apply Tighten's standard linting & c...

3,086,275 605
directorytree/ldaprecord-laravel

LDAP Authentication & Management for Laravel.

2,654,109 574
hemp/presenter

Easy Model Presenters in Laravel

636,598 247
juzaweb/cms

Juzaweb CMS is a Content Management System (CMS) developed based on Laravel Fram...

571,269 189