tankerkiller125

tankerkiller125

Member Since 3 Years Ago

Painesville, OH

IT Technician at Madison Local Schools

Experience Points 4,335
Experience Level 1

665 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 30
Lessons
Completed
Best Reply Awards 1
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

07 Sep
7 months ago

tankerkiller125 left a reply on Is There A Free Https Tunneling?

The valet share option uses ngrok to share to the public from valet, if you take the share URL it gives you and make it https it will work as intended. Ngrox has a wildcard ssl cert for this very purpose

17 Jul
9 months ago

tankerkiller125 started a new conversation Assign Many Users To One Record

So I'm trying to figure out how I can assign multiple people to one particular record and vice-versa, for example, if Github issues allowed for multiple assigned users, so basically you have a user who can be assigned to multiple tickets and a single ticket that can have multiple users assigned to it. I thought that a many to many relationships would work but that does not seem to be the case?

02 Jun
10 months ago

tankerkiller125 left a reply on Encrypting Model Data

@05mahihbk The following is a full solution that actually works and decrypts the data properly.

trait Encryptable {
    public function getAttribute($key)
    {
        $value = parent::getAttributeValue($key);

        if (in_array($key, $this->encryptable)) {
            return $value = \Crypt::decrypt($value);
        }
        return $value;
    }

    public function setAttribute($key, $value)
    {
        if (in_array($key, $this->encryptable)) {
            $value = \Crypt::encrypt($value);
        }

        return parent::setAttribute($key, $value);
    }
}

13 Feb
1 year ago

tankerkiller125 left a reply on Get All Alerts Where The Expired Date Is Null Or Above The Current Date

@Snapey @bobbybouwmann Thanks guys for all the help, I found the issue, it seems that homestead and my machine are using different timezones and so they are different by several hours, so when I used PHPStorms editor it set the timestamp to my laptops time which is about 15 hours ahead of homestead.

tankerkiller125 left a reply on Get All Alerts Where The Expired Date Is Null Or Above The Current Date

@bobbybouwmann That query has the same problem my query had where it returns all the queries within the same year still.

12 Feb
1 year ago

tankerkiller125 left a reply on Need Some Advice Regarding Laravel Server Usage

@m-rk I have had a couple of small issues with that package, notably the fact that the cache is forever until the element is updated. And if you have a lot of things that never change (user profiles might not change for months) depending on which cache method used it could really eat at RAM or storage space.

tankerkiller125 started a new conversation Get All Alerts Where The Expired Date Is Null Or Above The Current Date

I've spent a good 2 or so hours debugging this already and I've attempted writing an actual MySQL query for this with no luck. What I have is a database table with alerts that have titles, descriptions, a type and an expiration date.

What I'm trying to do is get all of the alerts that either have no expiration date (they are non-expiring alerts) and all the alerts with expiration dates in the future. My current problem is that I can get alerts that have no expiration date but I either get no alerts with expiration in the future, or I get all the alerts that have expiration dates with the same year, even if the date is in the past.

The MySQL query that kind of works but really doesn't:

SELECT * FROM alerts WHERE (expires_at >= CURRENT_TIMESTAMP OR alerts.expires_at IS NULL)

Any help with this would be greatly appreciated!

19 Nov
1 year ago

tankerkiller125 left a reply on What Permissions/Roles Package To Use?

@rumm.an that's the library I looked at most closely because I noticed that. However the wildcards are when you check permissions. From what I can tell you still have to give the user each individual permission.

tankerkiller125 started a new conversation What Permissions/Roles Package To Use?

I'm working on a complex project that needs roles and permissions. One of the things I would like to do is wildcard permissions like the ones that minecraft servers use. So a user with the permission * can do anything. And if there are permissions like say core.user.edit and core.user.add a user with the permission core.user.* would be able to do anything regarding users.

I know Bouncer and Laravel-Permissions and Laratrust are out there but I'm not sure if any of them do what I want. And if they don't if theirs any easy way to make that happen.

12 Nov
1 year ago

tankerkiller125 left a reply on Nginx + Nodejs + Socket.io Websockets On Linode Server

You can add add_header Access-Control-Allow-Origin *; to the nginx config under location /socket.io this will set the CORS header for that path and will allow other domains to get the javascript from it.

tankerkiller125 left a reply on Database [mysqli] Is Not Recognized

@frezno is correct for installing the package wit composer.

tankerkiller125 left a reply on Database [mysqli] Is Not Recognized

Laravel does not have a default built in MySQLI driver from what I can tell. Are you using a Laravel package that provides this driver? If so what package? Are you using autoload or did you add it to the config/app.php?

If you are attempting this without a package Laravel does not support this driver. However one does exist https://github.com/shakahl/laravel-eloquent-mysqli and if you absolutely must use MYSQLI I would recommend using it.

22 Feb
2 years ago

tankerkiller125 started a new conversation Request To Oauth2 Token (password Grant) Stalls?

I am following the Laravel Passport documentation, and one of the things that it does it uses the PHP HttpGuzzle client to perform a password request. I am doing this as a request in the API routes for an external JS application (I don't want to store client_id, and client_secret is JS code on a browser). However, it seems that when I put said demo code in (with id and secret valid) however this demo code causes the entire application to essentially stop responding even routes not that are in the web routes file. What is happening here?

23 Jan
2 years ago

tankerkiller125 started a new conversation Passport Working But ?access_token Not Checked?

Passport seems to be working just fine as it gives out the authentication tokens and everything. However, when I attempt to access any authentication only API route (namely the default user one) it just redirects to login. I've followed the instructions in the documentation down to the letter.

15 Sep
2 years ago

tankerkiller125 left a reply on Gulp Command Fails Looking For Buble Package?

Thanks @ejdelmonico the last command there worked perfectly :)

13 Sep
2 years ago

tankerkiller125 started a new conversation Gulp Command Fails Looking For Buble Package?

I get the following error when running the gulp command

[16:49:44] Using gulpfile /var/www/opendevs/manager/gulpfile.js
[16:49:44] Starting 'all'...
[16:49:44] Starting 'sass'...
[16:49:45] Finished 'sass' after 943 ms
[16:49:45] Starting 'webpack'...
{ [Error: Entry module not found: Error: Can't resolve 'buble' in '/var/www/opendevs/manager'
resolve 'buble' in '/var/www/opendevs/manager'
  Parsed request is a module
  using description file: /var/www/opendevs/manager/package.json (relative path: .)
  after using description file: /var/www/opendevs/manager/package.json (relative path: .)
    resolve as module
      module variation buble-loader
        /var/www/opendevs/node_modules doesn't exist or is not a directory
        /var/www/node_modules doesn't exist or is not a directory
        /var/node_modules doesn't exist or is not a directory
        /node_modules doesn't exist or is not a directory
        looking for modules in /var/www/opendevs/manager/node_modules
          using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)
          after using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)
            using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules/buble-loader)
              as directory
                /var/www/opendevs/manager/node_modules/buble-loader doesn't exist
              no extension
                /var/www/opendevs/manager/node_modules/buble-loader doesn't exist
              .js
                /var/www/opendevs/manager/node_modules/buble-loader.js doesn't exist
              .json
                /var/www/opendevs/manager/node_modules/buble-loader.json doesn't exist
      /var/www/opendevs/node_modules doesn't exist or is not a directory
      /var/www/node_modules doesn't exist or is not a directory
      /var/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
      looking for modules in /var/www/opendevs/manager/node_modules
        using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)
        after using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)
          using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules/buble)
            as directory
              /var/www/opendevs/manager/node_modules/buble doesn't exist
            no extension
              /var/www/opendevs/manager/node_modules/buble doesn't exist
            .js
              /var/www/opendevs/manager/node_modules/buble.js doesn't exist
            .json
              /var/www/opendevs/manager/node_modules/buble.json doesn't exist]
  message: 'Entry module not found: Error: Can\'t resolve \'buble\' in \'/var/www/opendevs/manager\'\nresolve \'buble\' in \'/var/www/opendevs/manager\'\n  Parsed request is a module\n  using description file: /var/www/opendevs/manager/package.json (relative path: .)\n  after using description file: /var/www/opendevs/manager/package.json (relative path: .)\n    resolve as module\n      module variation buble-loader\n        /var/www/opendevs/node_modules doesn\'t exist or is not a directory\n        /var/www/node_modules doesn\'t exist or is not a directory\n        /var/node_modules doesn\'t exist or is not a directory\n        /node_modules doesn\'t exist or is not a directory\n        looking for modules in /var/www/opendevs/manager/node_modules\n          using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)\n          after using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)\n            using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules/buble-loader)\n              as directory\n                /var/www/opendevs/manager/node_modules/buble-loader doesn\'t exist\n              no extension\n                /var/www/opendevs/manager/node_modules/buble-loader doesn\'t exist\n              .js\n                /var/www/opendevs/manager/node_modules/buble-loader.js doesn\'t exist\n              .json\n                /var/www/opendevs/manager/node_modules/buble-loader.json doesn\'t exist\n      /var/www/opendevs/node_modules doesn\'t exist or is not a directory\n      /var/www/node_modules doesn\'t exist or is not a directory\n      /var/node_modules doesn\'t exist or is not a directory\n      /node_modules doesn\'t exist or is not a directory\n      looking for modules in /var/www/opendevs/manager/node_modules\n        using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)\n        after using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)\n          using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules/buble)\n            as directory\n              /var/www/opendevs/manager/node_modules/buble doesn\'t exist\n            no extension\n              /var/www/opendevs/manager/node_modules/buble doesn\'t exist\n            .js\n              /var/www/opendevs/manager/node_modules/buble.js doesn\'t exist\n            .json\n              /var/www/opendevs/manager/node_modules/buble.json doesn\'t exist',
  showStack: false,
  showProperties: true,
  plugin: 'webpack-stream',
  __safety: { toString: [Function: bound ] } }

I am running: nodejs: 6.5.0 npm: 3.10.3

Any help is greatly appreciated.

10 Sep
2 years ago

tankerkiller125 left a reply on Different Login Between Domain And Subdomain

@denpun It appears that they may have changed the way this works. I always remembered it as being a wildcard default however it appears that they now use the URL that your accessing the page from as the domain. If it works the way you want it to then to my knowledge there is no security concern.

30 Aug
2 years ago

tankerkiller125 left a reply on Different Login Between Domain And Subdomain

For one sessions with null as the domain are considered wildcard sessions meaning that they work across the entire domain and all subdomains. So this will need to be changed to admin.examplesite.com and examplesite.com (no dot in the front) this should separate the sessions. Changing the cookie name should be enough to separate the logins remember functions. So in the end your sessions files will look something like this:

'lifetime' => 120,
'expire_on_close' => false,
'driver' => env('SESSION_DRIVER',  'file'), 
'domain' => env('SESSION_DOMAIN',  'maindomain.com'), 
'cookie' => 'maindomain_session', 

and

'lifetime' => 120,
'expire_on_close' => false,
'driver' => env('SESSION_DRIVER',  'file'), 
'domain' => env('SESSION_DOMAIN',  'sub.maindomain.com'), 
'cookie' => 'subdomain_session', 

This setup as worked for me in the past. However browsers change all the time and no two browsers are alike. As such some browser can behave weirdly with these kind of things.

18 Jan
3 years ago

tankerkiller125 left a reply on Eloquent Not Working?

@zakiaziz The profile is a DB column not a table. So making a model for a single column makes no sense.

16 Jan
3 years ago

tankerkiller125 started a new conversation Eloquent Not Working?

So I have several models and they work for the most part when attempting to get date from them (not inside a view) they fail.

My Profile Model is:

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/** Autogenerated ide-helper doc data */
class Profile extends Model
{
    protected $table = 'profiles';
    protected $fillable = [
        'user_id',
        'stream_key',
        'oauth_key',
        'description',
        'picture',
        'cover',
        'mini_bio',
        'long_bio'
    ];
    protected $dates = ['created_at', 'updated_at'];
    protected $user_id;
    protected $stream_key;
    protected $description;
    protected $picture;
    protected $cover;
    protected $mini_bio;
    protected $long_bio;
    protected $oauth_key;
    protected $total_views;
    protected $created_at;
    protected $updated_at;

    public function user()
    {
        return $this->belongsTo('App\User');
    }
}

with my User Model as (using Sentinel):

<?php

namespace App;

use Cartalyst\Sentinel\Permissions\PermissibleInterface;
use Cartalyst\Sentinel\Permissions\PermissibleTrait;
use Cartalyst\Sentinel\Persistences\PersistableInterface;
use Cartalyst\Sentinel\Roles\RoleableInterface;
use Cartalyst\Sentinel\Roles\RoleInterface;
use Cartalyst\Sentinel\Users\UserInterface;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/** Autogenerated ide-helper docs */
class User extends Model implements RoleableInterface, PermissibleInterface, PersistableInterface, UserInterface
{

    use PermissibleTrait;
    use SoftDeletes;

    /**
     * {@inheritDoc}
     */
    protected $table = 'users';

    /**
     * {@inheritDoc}
     */
    protected $fillable = [
        'email',
        'password',
        'username',
        'permissions',
    ];

    /**
     * {@inheritDoc}
     */
    protected $dates = ['deleted_at', 'created_at', 'updated_at', 'last_login'];

    /**
     * {@inheritDoc}
     */
    protected $persistableKey = 'user_id';

    /**
     * {@inheritDoc}
     */
    protected $persistableRelationship = 'persistences';

    /**
     * Array of login column names.
     *
     * @var array
     */
    protected $loginNames = ['email'];

    /**
     * The Eloquent roles model name.
     *
     * @var string
     */
    protected static $rolesModel = 'Cartalyst\Sentinel\Roles\EloquentRole';

    /**
     * The Eloquent persistences model name.
     *
     * @var string
     */
    protected static $persistencesModel = 'Cartalyst\Sentinel\Persistences\EloquentPersistence';

    /**
     * The Eloquent activations model name.
     *
     * @var string
     */
    protected static $activationsModel = 'Cartalyst\Sentinel\Activations\EloquentActivation';

    /**
     * The Eloquent reminders model name.
     *
     * @var string
     */
    protected static $remindersModel = 'Cartalyst\Sentinel\Reminders\EloquentReminder';

    /**
     * The Eloquent throttling model name.
     *
     * @var string
     */
    protected static $throttlingModel = 'Cartalyst\Sentinel\Throttling\EloquentThrottle';

    /**
     * Returns an array of login column names.
     *
     * @return array
     */
    public function getLoginNames()
    {
        return $this->loginNames;
    }

    /**
     * Returns the roles relationship.
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
     */
    public function roles()
    {
        return $this->belongsToMany(static::$rolesModel, 'role_users', 'user_id', 'role_id')->withTimestamps();
    }

    /**
     * Returns the persistences relationship.
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function persistences()
    {
        return $this->hasMany(static::$persistencesModel, 'user_id');
    }

    /**
     * Returns the activations relationship.
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function activations()
    {
        return $this->hasMany(static::$activationsModel, 'user_id');
    }

    /**
     * Returns the reminders relationship.
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function reminders()
    {
        return $this->hasMany(static::$remindersModel, 'user_id');
    }

    /**
     * Returns the throttle relationship.
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function throttle()
    {
        return $this->hasMany(static::$throttlingModel, 'user_id');
    }

    /**
     * Get mutator for the "permissions" attribute.
     *
     * @param  mixed  $permissions
     * @return array
     */
    public function getPermissionsAttribute($permissions)
    {
        return $permissions ? json_decode($permissions, true) : [];
    }

    /**
     * Set mutator for the "permissions" attribute.
     *
     * @param  mixed  $permissions
     * @return void
     */
    public function setPermissionsAttribute(array $permissions)
    {
        $this->attributes['permissions'] = $permissions ? json_encode($permissions) : '';
    }

    /**
     * {@inheritDoc}
     */
    public function getRoles()
    {
        return $this->roles;
    }

    /**
     * {@inheritDoc}
     */
    public function inRole($role)
    {
        $role = array_first($this->roles, function ($index, $instance) use ($role) {
            if ($role instanceof RoleInterface) {
                return ($instance->getRoleId() === $role->getRoleId());
            }

            if ($instance->getRoleId() == $role || $instance->getRoleSlug() == $role) {
                return true;
            }

            return false;
        });

        return $role !== null;
    }

    /**
     * {@inheritDoc}
     */
    public function generatePersistenceCode()
    {
        return str_random(32);
    }

    /**
     * {@inheritDoc}
     */
    public function getUserId()
    {
        return $this->getKey();
    }

    /**
     * {@inheritDoc}
     */
    public function getPersistableId()
    {
        return $this->getKey();
    }

    /**
     * {@inheritDoc}
     */
    public function getPersistableKey()
    {
        return $this->persistableKey;
    }

    /**
     * {@inheritDoc}
     */
    public function setPersistableKey($key)
    {
        $this->persistableKey = $key;
    }

    /**
     * {@inheritDoc}
     */
    public function setPersistableRelationship($persistableRelationship)
    {
        $this->persistableRelationship = $persistableRelationship;
    }

    /**
     * {@inheritDoc}
     */
    public function getPersistableRelationship()
    {
        return $this->persistableRelationship;
    }

    /**
     * {@inheritDoc}
     */
    public function getUserLogin()
    {
        return $this->getAttribute($this->getUserLoginName());
    }

    /**
     * {@inheritDoc}
     */
    public function getUserLoginName()
    {
        return reset($this->loginNames);
    }

    /**
     * {@inheritDoc}
     */
    public function getUserPassword()
    {
        return $this->password;
    }

    /**
     * Returns the roles model.
     *
     * @return string
     */
    public static function getRolesModel()
    {
        return static::$rolesModel;
    }

    /**
     * Sets the roles model.
     *
     * @param  string  $rolesModel
     * @return void
     */
    public static function setRolesModel($rolesModel)
    {
        static::$rolesModel = $rolesModel;
    }

    /**
     * Returns the persistences model.
     *
     * @return string
     */
    public static function getPersistencesModel()
    {
        return static::$persistencesModel;
    }

    /**
     * Sets the persistences model.
     *
     * @param  string  $persistencesModel
     * @return void
     */
    public static function setPersistencesModel($persistencesModel)
    {
        static::$persistencesModel = $persistencesModel;
    }

    /**
     * Returns the activations model.
     *
     * @return string
     */
    public static function getActivationsModel()
    {
        return static::$activationsModel;
    }

    /**
     * Sets the activations model.
     *
     * @param  string  $activationsModel
     * @return void
     */
    public static function setActivationsModel($activationsModel)
    {
        static::$activationsModel = $activationsModel;
    }

    /**
     * Returns the reminders model.
     *
     * @return string
     */
    public static function getRemindersModel()
    {
        return static::$remindersModel;
    }

    /**
     * Sets the reminders model.
     *
     * @param  string  $remindersModel
     * @return void
     */
    public static function setRemindersModel($remindersModel)
    {
        static::$remindersModel = $remindersModel;
    }

    /**
     * Returns the throttling model.
     *
     * @return string
     */
    public static function getThrottlingModel()
    {
        return static::$throttlingModel;
    }

    /**
     * Sets the throttling model.
     *
     * @param  string  $throttlingModel
     * @return void
     */
    public static function setThrottlingModel($throttlingModel)
    {
        static::$throttlingModel = $throttlingModel;
    }

    /**
     * {@inheritDoc}
     */
    public function delete()
    {
        if ($this->exists) {
            $this->activations()->delete();
            $this->persistences()->delete();
            $this->reminders()->delete();
            $this->roles()->detach();
            $this->throttle()->delete();
        }

        parent::delete();
    }

    /**
     * Dynamically pass missing methods to the user.
     *
     * @param  string  $method
     * @param  array  $parameters
     * @return mixed
     */
    public function __call($method, $parameters)
    {
        $methods = ['hasAccess', 'hasAnyAccess'];

        if (in_array($method, $methods)) {
            $permissions = $this->getPermissionsInstance();

            return call_user_func_array([$permissions, $method], $parameters);
        }

        return parent::__call($method, $parameters);
    }

    /**
     * Creates a permissions object.
     *
     * @return \Cartalyst\Sentinel\Permissions\PermissionsInterface
     */
    protected function createPermissions()
    {
        $userPermissions = $this->permissions;

        $rolePermissions = [];

        foreach ($this->roles as $role) {
            $rolePermissions[] = $role->permissions;
        }

        return new static::$permissionsClass($userPermissions, $rolePermissions);
    }

    /**
     * A user has a profile.
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    public function profile()
    {
        return $this->hasOne('App\Profile');
    }

    public function category()
    {
        return $this->hasMany('App\Category');
    }
}

Attempting to use Profiles as:

App\Profile::whereUserId($userId)->picture;

fails and attempting

App\User::whereId($userId)->profile->picture;

also fails.

The exact error message is: Undefined property: Illuminate\Database\Eloquent\Builder::$profile for the User Modal and Undefined property: Illuminate\Database\Eloquent\Builder::$picture for the Profile Model.

Any help is greatly appreciated.

23 Dec
3 years ago

tankerkiller125 left a reply on Log In With Smartphone App

@eliassorensen Yes you would use a token. Oauth2 (which has already been suggested) does exactly that. this package is excellent for creating a oauth2 server and has excellent documentation. I suggest you take a look into it.

tankerkiller125 left a reply on Cannot Load Two Videos At The Same Time

@jhoff AH OK then that makes makes more sense.

22 Dec
3 years ago

tankerkiller125 left a reply on Cannot Load Two Videos At The Same Time

@jhoff actually based on my Dev Tools he's just using videojs which means that he's probs streaming from his own servers (makes sense)

tankerkiller125 left a reply on Cannot Load Two Videos At The Same Time

Definitely a cost thing. Its extremely unlikely that someone is paying attention to both streams at the same time and if a user is streaming two at the same time just to re-watch one of them because they weren't paying attention to it it would nearly double the bandwidth used. Not to mention @JeffreyWay is not YouTube and the server(s) he uses definitely has a maximum upload rate and in order to get everyone the best quality stream (little/no buffering) he needs to keep the pipes as open as possible which means limiting how many videos a single user can watch at the same time.

tankerkiller125 left a reply on Oauth2 Login Redirect

I found the issue and have fixed it. For anyone wondering what it was it should be redirect()->intended()

tankerkiller125 left a reply on [L5.1] Custom Error Only For Production

500 Errors should already have this. Other than that 404 Error Traces almost never have anything worth looking at and if you were expecting a 200 then it means that your routes are in the wrong order or are not being read for some reason.

21 Dec
3 years ago

tankerkiller125 left a reply on Brodcast Built In Events?

@Pendo I was looking for something more along the websockets way of doing it (L5 Broadcast) however if I'm stuck with database I can use that too.

tankerkiller125 started a new conversation Brodcast Built In Events?

Laravel provides some default events as described here. Would it be possible to broadcast these events. Like for example I have an admin dashboard and I would like to monitor the queue in real-time to make sure that its all going smoothly?

15 Dec
3 years ago

tankerkiller125 left a reply on Episode Request: Logging With Laravel

Also useful for people building scaled apps that go across many servers and plan on using somthing like logstash to keep the logs in one spot.

05 Dec
3 years ago

tankerkiller125 started a new conversation Oauth2 Login Redirect

I am currently using the oauth2-server package found here I am authenticating the users using sentinel. I already have the package itself working however if a user is not logged in they get redirected to a login page. How would I redirect the users from the login page back to the callback after a successful login. ATM It does this using the redirect()->back() but this causes issues if the user fails to login on there first attempts.

23 Aug
3 years ago

tankerkiller125 left a reply on Algolia Real Time Search

For one I agree with @kayyyy on this. Please do your own research and try to do it yourself. And number two an entire tutorial for Algolia including realtime search is available here at Laracasts. I suggest trying to follow along with those videos before you ask for snippets. And if you do ask for snippets ALWAYS provide a clear understanding of what you've already tried. This proves that you have at least already tried to make the code your self and it also shows your understanding of what your trying to make so that responders can write a clearer response based on your knowledge of the languages involved.

tankerkiller125 left a reply on Laravel 5.2 (What Features Do We All Want?)

@topvillas Mail is as easy as it gets. And it covers almost every base when it comes to sending mail.

22 Aug
3 years ago

tankerkiller125 left a reply on Redis With Laravel Series

Definitely. Although Caching with Redis is the same as Caching with any other format in Laravel so I don't really see the point in doing a tutorial on it since I believe it already exists in one of the Laravel Tutorial Series.

21 Aug
3 years ago

tankerkiller125 started a new conversation Translations Erroring

I have built my application with a very simple translation system (pretty much the one on the laravel docs with the prefix's) And it works just fine without issues. However the secound I attempt to display a translation from any localization file it errors saying that the Illuminate\Routing\Router could not be converted to string How would I fix this issue.

28 Jul
3 years ago

tankerkiller125 left a reply on Get JSON Body From Request

I have found the solution. It appears that Bodys can only be gotten from post/delete/put request and not get request.

tankerkiller125 left a reply on Get JSON Body From Request

@jasonfrye I think I may have written the question wrong. When I try to get the JSON from the body it returns with absolutely nothing. As if the request didn't have a body.

tankerkiller125 started a new conversation Get JSON Body From Request

So I'm making my site so that it can parse a webhook request to be more specific the data I'm being sent looks like so:

Raw Body:

{
    "id": "XXXXXXXX",
    "created_at": "2015-07-10T08:29:30.481Z",
    "resolved_at": null,
    "flagged": null,
    "risk": 0.54,
    "severity": "notice",
    "user": {
        "id": "26",
        "created_at": "2015-06-14T12:54:52.937Z",
        "email": "test@example.com",
        "image": null,
        "last_seen_at": "2015-07-12T08:33:48.581Z",
        "name": "Webhook Test",
        "devices_count": 2,
        "updated_at": "2015-07-14T12:54:53.709Z",
        "username": null,
    },
    "context": {
        "user_agent": {
            "raw": "Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/8.3 Mobile/11A465 Safari/9537.53",
            "browser": "Mobile Safari",
            "version": "8.3",
            "os": "iOS 8.3",
            "mobile": true,
            "platform": "iOS"
        }
    }
}

I have spent several hours trying to find out how to-do this but there doesn't seem to be any easy way of doing this in a Laravel Controller

25 Jul
3 years ago

tankerkiller125 left a reply on Configuration Issue? Ubuntu/Apache2 14.04 Simple Route Will Not Return Correctly.

I believe that the correct Apache config should be

<VirtualHost *:80>    

    # The location of our projects public directory.
    DocumentRoot    /var/www/html/public    

    # Useful logs for debug.
    CustomLog       /var/www/html/access.log common
    ErrorLog        /var/www/html/error.log    

    # Rewrites for pretty URLs, better not to rely on .htaccess.
    <Directory /www/var/html>
        <IfModule mod_rewrite.c>
            Options -MultiViews
            RewriteEngine On

        # Redirect Trailing Slashes If Not A Folder...
        RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)/$ /$1 [L,R=301]    

            # Handle Front Controller...
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^ index.php [L]
        </IfModule>
    </Directory>    

</VirtualHost>

Some of the missing Rewrite Conditions are causing Apache not to rewrite the URLS correctly and thus larval isn't getting the correct information causing the 404 errors.

24 Jul
3 years ago

tankerkiller125 left a reply on Configuration Issue? Ubuntu/Apache2 14.04 Simple Route Will Not Return Correctly.

It appears that your Apache config does not contain all of the .htaccess (For example)

# Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]    

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d

Is all missing from the Apache config (just below enabling the Rewrite engine and above the RewriteCond %{REQUEST_FILENAME} !-f

Those lines are actually some of the most important lines of the .htaccess file. And it appears that you may also have .htaccess files disabled server side (which would be suggested performance wise)