devit.gg

President & Founder at Pushthis

Experience

1,640

1 Best Reply Awards

  • Member Since 1 Year Ago
  • 0 Lessons Completed
  • 0 Favorites

13th December, 2017

devit.gg left a reply on Is There An IDE That Could SSH To Project Directory? • 5 months ago

c9.io codeanywhere.com atom.io phpstorm

list goes on

devit.gg left a reply on Best Practice - Local Environment And Production Environment • 5 months ago

@zaster this is why you do PHPUnit tests but u should be running same php version in production as dev ops

devit.gg left a reply on Very Very Slow Query...how To Speed Up • 5 months ago

Going to go with @kobear on this one

devit.gg left a reply on View Product By Categories With Laravel • 5 months ago

What I would do personally, not sure if it's the best route ¯_(ツ)_/¯.

I'd render the products.blade with a @switch($category) .. if its count() == 0 .. Page is an initial render through a initial render route 'my products'.. once a user selects a category, you render page back to same blade because of the @switch ... but u pass $catgeory collection back this time... which will trigger the @switch($category) to display whatever it is..

then just @foreach($category as $categoryItem) and display your products.

devit.gg left a reply on Implement Sweet Alert Delete • 5 months ago

This has already been answered on stackoverflow which means you havnt googled before asking.

    swal({
            title: "Are you sure!",
            type: "error",
            confirmButtonClass: "btn-danger",
            confirmButtonText: "Yes!",
            showCancelButton: true,
        },
        function() {
            $.ajax({
                type: "POST",
                url: "{{url('/destroy')}}",
                data: {id:id},
                success: function (data) {
                              //
                    }         
            });

devit.gg left a reply on Laravel Checkbox Change Layout • 5 months ago

@switch($layout)
    @case true
        @extends('layouts.first.layout.')
        @section('content')
            ...
        @endsection
    @break 
    
    @case false
        @extends('layouts.second.layout.')
        @section('content')
            ...
        @endsection
    @break 
@endswitch```

devit.gg left a reply on Line Chart With Datapoint X And Y • 5 months ago

You smash buttons -- like this!

o[adfgs
om[agfm
po[gafsdm
oa```

12th December, 2017

devit.gg left a reply on Best Practice - Local Environment And Production Environment • 5 months ago

Yes @zaster thats okay.

the .lock is so composer installs the same package versions from your dev ops in production.

To @jbloomstrom continue on his testing comment; this is very important once your in production, PHPUnit tests allow you to test your whole code base by running ./vendor/bin/phpunit in your console. You run this after every composer update you do, to ensure your codebase isn't broken!

17th November, 2017

devit.gg left a reply on Undefined Variable: Forum • 6 months ago

Oh my for the love of the linux gods...

 ErrorException (E_ERROR)
Undefined variable: forum (View: /opt/lampp/htdocs/forum/resources/views/forum/includes/post-list.blade.php) (View: /opt/lampp/htdocs/forum/resources/views/forum/includes/post-list.blade.php)

$forum isnt being defined so OBVIOUSLY the error will be in post-list.blade.php.

Solution -> pass the $forum so it is defined.

public function index(){
        $forums = Forum::all();
        return view('forum.index')
        ->with('forum', $forum);
    }

Have a nice day.

15th June, 2017

devit.gg started a new conversation Socialite-Battlenet • 11 months ago

I'm trying to use Socialite-Battlenet ( https://github.com/teamreflex/Socialite-BattleNet ) and I followed the guide given.

Set up a quick test in my controller (Absolutely fresh install Laravel 5.4 with Socialite + Socialite-Battlenet)

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request; use BattleNet;

class BattleNetController extends Controller { public function index(){ return BattleNet::redirect(); } }

Now when i go to the route for this function /callback

I get this error

(1/1) InvalidArgumentException Driver [battlenet] not supported.

I really don't see anything about this out there? Anyone have any idea?

8th June, 2017

devit.gg left a reply on Laravel Discord Server • 11 months ago

Link me

devit.gg started a new conversation Riot API Laravel 5.4 Github • 11 months ago

Has anyone used Riot (League of Legends) with 5.4? Wondering if anyone has anything on open source before I go reinventing the wheel.

I found one on github but its for Laravel 4.

7th May, 2017

devit.gg left a reply on Saving Json To File/ Decoding • 1 year ago

Nothing; either it's not writing to the file or it's not receiving the data from fb... ugh

devit.gg left a reply on Saving Json To File/ Decoding • 1 year ago

https://developers.facebook.com/docs/messenger-platform/webhook-reference#format

{ "object":"page", "entry":[ { "id":"PAGE_ID", "time":1458692752478, "messaging":[ { "sender":{ "id":"USER_ID" }, "recipient":{ "id":"PAGE_ID" },

      ...
    }
  ]
}

] }

devit.gg left a reply on Saving Json To File/ Decoding • 1 year ago

public function getFacebookData(){
    $contents = json_encode(file_get_contents("php://input"));
    File::put('nonesense.txt', $contents);
    $fbData = Storage::get('nonesense.txt');
    $fbData = json_decode($fbData);

    return $fbData;
}

/THE APP FOLDER/storage/nonesense.txt

is this correct?

devit.gg left a reply on Saving Json To File/ Decoding • 1 year ago

How would I receive the JSON message, and pass it into my app without using a Text file?

devit.gg left a reply on Saving Json To File/ Decoding • 1 year ago

I'm sorry, i dont understand?

devit.gg started a new conversation Saving Json To File/ Decoding • 1 year ago

I'm requesting JSON from Facebook and i'm trying to put it into a file. I got this working with Core PHP... Transfering project over to Laravel.

Heres my code.

    public function initiate(){

   
    //Define   
     $accesToken = $this->getAccessToken();
     $fbData     = $this->getFacebookData(); 
     $theMessage = $this->getTheMessage($fbData); 
    
}  

public function getFacebookData(){

    $contents = print_r(file_get_contents("php://input"));;
    Storage::put('nonesense.txt', $contents);
    $fbData = Storage::get('nonesense.txt');
    $fbData = json_decode($fbData);

    return $fbData;
}

THIS is what i should be receiving...

{"object":"page",

"entry":[{

    "id":"87517577213413413415235645735673412349292224",
    "time":149363413413413413499037465,
    
        "messaging":[{
        
            "sender":{"id":"1482342342972024478467847726494"},
            "recipient":{"id":"875175779567345652435134292224"},
            "timestamp":149369905452345236537635674567437425,
            
                "message":{
                
                    "mid":"mi23gg25gw36yhrthsaPBts_",
                    "seq":298783,
                    "text":"hey there."
                    }
                }
            ]
        }
    ]
}

Anyone help me with this?

1st April, 2017

devit.gg left a reply on The Connection To This Site Is Not Secure • 1 year ago

Y'all just restored my hope in the human race by not 4channing this guy, and instead helping him.

Plus rep for you all, especially the one who emailed him.

29th March, 2017

devit.gg left a reply on Simple Rating Stars • 1 year ago

P.P.S

Start with passing a request response with "1" - "5" "Stars" as $request->['rating']

Should look SOMETHING like this.

$rating = new willvincent\Rateable\Rating;
$rating->rating = $request->['rating'];
$rating->user_id = \Auth::id();

$post->ratings()->save($rating);

devit.gg left a reply on Simple Rating Stars • 1 year ago

Yes, just looked at this as I might end up using this package for my project. It is very straight forward. If you need a tut on this, I suggest you relearn the basics of Laravel.

P.S PM me, I'll help you.

21st March, 2017

devit.gg left a reply on Show Modal On Redirect • 1 year ago

I am reloading the page when i redirect back. This modal works when i attach it to a button. just not when I use this open method.

20th March, 2017

devit.gg left a reply on Show Modal On Redirect • 1 year ago

I cleared all the errors, yet the modal is still not opening :\

devit.gg left a reply on Show Modal On Redirect • 1 year ago

so my console is giving me this error:

home:539 Uncaught SyntaxError: Invalid or unexpected token

devit.gg left a reply on Show Modal On Redirect • 1 year ago

    <script type="text/javascript">
$(function() {
    $('#myModal).modal('show');
});
</script>

seems to be this, when I change the modal to a toggle on click it works but this modal show method doesnt seem to be working.

devit.gg left a reply on Show Modal On Redirect • 1 year ago

Yeah I narrowed it down prior, i should have stated; I changed the modal script to a simple bootstrap alert and it catches the session and displays the alert. But when I change it back to the modal; it doesnt work.

devit.gg started a new conversation Show Modal On Redirect • 1 year ago

I've searched and my code seems to be correct; BUT my modal isnt opening on redirect. Anyone know why?

` ×

{{Auth::user()->username}}'s Friends

                        <div class="modal-body">
                            <h6 class="text-semibold text-center">You currently have no friends.</h6>
                            <p class="text-center">Why don't you search, and see if you find anyone you know?</p>
                            <p class="text-center"><button type="button" class="btn btn-default">Find a Friend</button></p>



                        <div class="modal-footer">
                            <button type="button" class="btn btn-link" data-dismiss="modal">Close</button>
                        </div>
                    </div>
                </div>
            </div>
`

16th March, 2017

devit.gg left a reply on No Callbacks On Private-App.User.1 For Pusher:subscription_error • 1 year ago

Solved for anyone searching this:

Broadcast::channel('App.User.{userId}', function ($user, $userId) { return (int) $user->id === (int) $userId; });

devit.gg left a reply on Listening For An Event • 1 year ago

This is weird.

devit.gg left a reply on Pusher:subscription_error • 1 year ago

Thank you! I figured the ('App.user.*') would work as a wild card. RIP.

devit.gg started a new conversation Listening For An Event • 1 year ago

Basically, i'm sending out an event; Pusher is receiving it on their debug console. YET my other browser in which I'm specifically sending the private event to, is not.

The strange thing, is when I send an event to that channel VIA pusher's site; that browser on that private channel is receiving it.

Here is all relevant code.

http://pastebin.com/hLBPBcxK

devit.gg left a reply on Laravel 5.4 View Returns 404 Not Found • 1 year ago

{{route('home')}}

devit.gg left a reply on Vue Components Not Loading In Blade • 1 year ago

Did you gulp it? I don't see a around ur vue components.

devit.gg left a reply on Why Use Redis For Websocket Communication? • 1 year ago

I'm curious to this answer to.

Bump

devit.gg left a reply on Forcing Ignore Validation • 1 year ago

Remove it?

'numeric|unique:locations',

devit.gg left a reply on Database Migration Error • 1 year ago

Please check your .env file and update correct credentials into database info

devit.gg left a reply on Laravel Is Kool. • 1 year ago

Laravel is babe <3, she has naughty pictures at laravel.com/docs/5.4

devit.gg left a reply on Make:auth Logging In Connection Refused To MySQL DB • 1 year ago

if you are using default xamp user/pass remove the "." from password, there isnt one, its just blank with username "root"

devit.gg left a reply on Pusher:subscription_error • 1 year ago

Anyone?

15th March, 2017

devit.gg started a new conversation Pusher:subscription_error • 1 year ago

My console is throwing the following error:

Pusher : No callbacks on private-App.user.1 for pusher:subscription_error

I did some googling, my BROADCAST_DRIVER is set to log, i changed it to pusher and then ontop of the above error, i get:

pusher.js?b3eb:593 POST http://laravelrocksmysocksoffeverynight.com/broadcasting/auth 500 (Internal Server Error) pusher.js?b3eb:626 Pusher : Couldn't get auth info from your webapp : 500

Attached are my relevant files

http://pastebin.com/QDtqPkrt

devit.gg left a reply on No Callbacks On Private-App.User.1 For Pusher:subscription_error • 1 year ago

wait, whats your error on console?

devit.gg left a reply on No Callbacks On Private-App.User.1 For Pusher:subscription_error • 1 year ago

I got the same issue here =[

devit.gg left a reply on Pusher Vue Error • 1 year ago

I put in both, still getting the error.

devit.gg left a reply on Pusher Vue Error • 1 year ago

import Pusher from "pusher-js" import Echo from "laravel-echo"

in app.js or in the vue component?

14th March, 2017

devit.gg started a new conversation Pusher Vue Error • 1 year ago

Im trying to use pusher to push notifications but im getting this error in my console?

I npm laravel-echo updated my .env file with my pusher info

Uncaught ReferenceError: Pusher is not defined
    at PusherConnector.connect (eval at 46 (app.js:394), <anonymous>:546:31)
    at PusherConnector.Connector (eval at 46 (app.js:394), <anonymous>:192:14)
    at new PusherConnector (eval at 46 (app.js:394), <anonymous>:537:135)
    at new Echo (eval at 46 (app.js:394), <anonymous>:689:30)
    at eval (eval at 13 (app.js:109), <anonymous>:45:15)
    at Object.13 (app.js:109)
    at __webpack_require__ (app.js:20)
    at eval (eval at 59 (app.js:493), <anonymous>:8:1)
    at Object.59 (app.js:493)
    at __webpack_require__ (app.js:20)

my app.js file

require('./bootstrap');

Vue.use(require('vue-resource'));


/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.
 */

Vue.component('example', require('./components/Example.vue'));



Vue.component('feed', require('./components/Feed.vue'));

Vue.component('post', require('./components/Post.vue'));

Vue.component('post-form', require('./components/PostForm.vue'));


Vue.component('displayfriends', require('./components/ProfileComponents/DisplayFriends.vue'));
Vue.component('connectdropdown', require('./components/ProfileComponents/ConnectDropdown.vue'));

Vue.component('notifications', require('./components/Notifications/Notification.vue'));



const app = new Vue({
    el: '#app'
});

My package.json

{ "private": true, "scripts": { "prod": "gulp --production", "dev": "gulp watch" }, "devDependencies": { "bootstrap-sass": "^3.3.7", "gulp": "^3.9.1", "jquery": "^3.1.0", "laravel-elixir": "^6.0.0-9", "laravel-elixir-vue-2": "^0.2.0", "laravel-elixir-webpack-official": "^1.0.2", "lodash": "^4.16.2", "vue": "^2.0.1", "vue-resource": "^1.2.1" }, "dependencies": { "algoliasearch": "^3.20.3", "laravel-echo": "^1.1.3", "pusher": "^1.5.1", "pusher-js": "^4.0.0", "vuex": "^2.1.1" } }

9th March, 2017

devit.gg left a reply on Laravel <slot></slot> Not Displaying • 1 year ago

Yes, I feel like it's not reading the app.js file? But literally brand spanking new to vue.js, not sure how it's suppose to work exactly.

Frustrating, lol.

devit.gg left a reply on Laravel <slot></slot> Not Displaying • 1 year ago

No errors compiling in gulp

devit.gg left a reply on Laravel <slot></slot> Not Displaying • 1 year ago

Nothing is showing up in the console.... only that vue is in development mode.

http://pastebin.com/5uDuaL1q

8th March, 2017

devit.gg started a new conversation Laravel <slot></slot> Not Displaying • 1 year ago

As title says, the component is not displaying into my view. I did "gulp watch" and it did everything without errors.

My app.js

Vue.component('timeline', require('./components/Timeline.vue'));

const app = new Vue({ el: '#app' });

My Timeline.vue

Example Component

                <div class="panel-body">
                    I'm an example component!
                </div>
            </div>
        </div>
    </div>
</div>

export default { mounted() { console.log('component Ready.') } }

in my blade view

    <timelime></timeline>
Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.