spodlogar

Web Developer at Permit.com

Experience

67,960

5 Best Reply Awards

  • Member Since 2 Years Ago
  • 748 Lessons Completed
  • 1 Favorite

13th September, 2017

spodlogar left a reply on How Can I Check If The App Is Using The ConvertEmptyStringsToNull Middleware? • 1 week ago

I believe it creates one if there is not one and resolves it if there is one already.

It should behave the same.

spodlogar left a reply on Vue Interpolation • 1 week ago

in Blade you need to escape the curly braces.

Give this a try

public function index () {
$text = 'hello @{{ xss vulnabilities }}';

return view('welcome', compact('text'));

}

// the screen will go blank if your js file is not minified but it will alert when minified
in blade
<h1>{{ $text }}</h1>

spodlogar left a reply on How Can I Check If The App Is Using The ConvertEmptyStringsToNull Middleware? • 1 week ago

This is how you can do that

app()->make(App\Http\Kernel::class)->hasMiddleware($middleware)

spodlogar left a reply on How Can I Check If The App Is Using The ConvertEmptyStringsToNull Middleware? • 1 week ago

You need an instance of App\Http\Kernel to call the hasMiddleware method on?

spodlogar left a reply on How Can I Check If The App Is Using The ConvertEmptyStringsToNull Middleware? • 1 week ago

in the app/Http/Kernel.php

protected $middleware = [
    \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
    \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
    \App\Http\Middleware\TrimStrings::class,
    \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, // BOOM
    \App\Http\Middleware\TrustProxies::class
];

spodlogar left a reply on Laravel Not Throwing Error Saving • 1 week ago

@spodlogar can u explain somethin? do i need to use

$user = Auth::user();
    return view('services.create')->withUser($user);

in every function , controller?

No. you can just use Auth::user() or the helper function auth()->user().

spodlogar left a reply on Laravel Not Throwing Error Saving • 1 week ago

Awesome

spodlogar left a reply on Laravel Not Throwing Error Saving • 1 week ago

Yes delete this part

{{ Form::text('users_id',$user->id,['class' => 'form-control','required' => '', 'maxlenght' => '10'])}}

It should still work fine

spodlogar left a reply on Laravel Not Throwing Error Saving • 1 week ago

Instead of this

$service->users_id = $request->users_id;

do this

$service->users_id = $request->user()->id;

spodlogar left a reply on Laravel Not Throwing Error Saving • 1 week ago

Do you have user authentication?

spodlogar left a reply on Laravel Not Throwing Error Saving • 1 week ago

I would remove it. you should not expose the user's id

3rd May, 2017

spodlogar left a reply on NPM Issues With Laravel 5.4.21 • 4 months ago

try just running webpack --progress --hide-modules

spodlogar left a reply on Sidebar Collapsable Menu • 4 months ago

Yes

spodlogar left a reply on Stripe Webhook : Tunnel Ngrok.io Not Found • 4 months ago

the ngrok tunnel is created when you run 'valet share' with Laravel Valet. You get a unique url every time.

spodlogar left a reply on Sidebar Collapsable Menu • 4 months ago

so like

new Vue({
    data: {
        name: 'My Tree',
        children: [
            { name: 'hello' },
            { name: 'wat' },
            {
                name: 'child folder',
                children: [
                    {
                        name: 'child folder',
                        children: [
                            { name: 'hello' },
                            { name: 'wat' }
                        ]
                    },
                    { name: 'hello' },
                    { name: 'wat' },
                    {
                        name: 'child folder',
                        children: [
                            { name: 'hello' },
                            { name: 'wat' }
                        ]
                    }
                ]
            }
        ]
    }
});

spodlogar left a reply on Sidebar Collapsable Menu • 4 months ago

in the Vue instance data variable

30th April, 2017

spodlogar left a reply on Download File Doesnt Work • 4 months ago

try using the storage_path() helper method

24th April, 2017

spodlogar left a reply on Cost Of Laravel Forge • 4 months ago

Would something like https://www.heroku.com/ be what you are looking for?

11th April, 2017

spodlogar left a reply on Scout With • 5 months ago

Did you find a solution for this? The above answer will not work in my case as I am returning the results as JSON for an API.

27th December, 2016

spodlogar left a reply on Using Vue To Append DOM Elements • 8 months ago

Just add the fetched items to the list of original items. Vue will handle displaying them if you are using v-for.

28th November, 2016

spodlogar left a reply on Retrieve Data From Three Tables • 9 months ago

I am assuming you want to get a Teacher's students based on the ClassRoom Model.

You will need to add a classroom_student pivot table which will allow you to get all the students in a classroom.

class ClassRoom extends Model
{
    

    public function students()
    {
        return $this->belongsToMany(Student::class);
    }
    
    public function teacher()
    {
        return $this->belongsTo(Teacher::class);
    }

}
class Teacher extends Model
{

    public function classrooms()
    {
        return $this->hasMany(ClassRoom::class);
    }
    
    public function students()
    {
        $classrooms = $this->classrooms;
        $students = $classrooms->flatMap(function($classroom){
            return $classroom->students;
        });

        return $students;
    }

}

It would probably look something like that

spodlogar started a new conversation PHPUnit Error: Call To Undefined Method Illuminate\Http\JsonResponse::getTargetUrl() • 9 months ago

just returning a simple response()->json([], 201); object getting this error when asserting response status of 201.

does anyone have any ideas?

5th September, 2016

spodlogar left a reply on Redis And Socket.io Broadcasting In Production • 1 year ago

No, I have not found a solution to this yet. But I emailed Jeffery Way and asked him to do a "How do I..." about it, He replied "Will do! Thanks for the suggestion." so hopefully he will do that soon.

16th August, 2016

spodlogar started a new conversation Sublime Text PHPCompanion Find_use And Goto_definition • 1 year ago

Does anyone know how to get these commands working in Sublime text Build 3114?

It does not work for me and does not give a good error to go off of either.

If anyone has some incite on this I would really appreciate help.

10th August, 2016

spodlogar started a new conversation Redis And Socket.io Broadcasting In Production • 1 year ago

I have an app that has Redis and Socket.io broadcasting and it works on my local environment but I cannot get it to work in production. I see the event is getting read on my server.js file but I cannot listen to it on the front-end.

14th July, 2016

spodlogar left a reply on Laravel Pagination • 1 year ago

I am happy to say THAT WORKED.

Thank you so much. ; )

spodlogar left a reply on Laravel Pagination • 1 year ago

Ok, Thank's for your time. I am going to need to keep digging. : )

spodlogar left a reply on Laravel Pagination • 1 year ago

I have like 30 different places I am using the paginator, isn't there a configuration option or something like that where I can just tell Laravel to use the BootstrapFourPresenter by default?

spodlogar started a new conversation Laravel Pagination • 1 year ago

How can I use a different paginator in my Laravel view? It seems to default to the Bootstrap 3 Presenter and I would like to use the Bootstrap 4 Presenter.

18th September, 2015

spodlogar left a reply on Which OS Are Most Laravel Developers Using? • 2 years ago

I use MAMP Pro for everything.

and Mac OSX Yosemite is great i would never think of switching to windows.

spodlogar left a reply on Nested Relation Query • 2 years ago

enjoy man

spodlogar left a reply on Nested Relation Query • 2 years ago

This is what I think you are going for whether it will work or not is another question.

// In the User Model

public function projects(){
    $customers = $this->customers();
    $projects = [];
    foreach($customers as $customer){
        $projects = array_merge($projects, $customer->projects;
    }
    return $projects;
}

spodlogar left a reply on Nested Relation Query • 2 years ago

and you want to get a list of all the projects in all the users customers?

spodlogar left a reply on Creating Multiple Separate Elixir Tasks? • 2 years ago

he would like to only compile the vendor.js file on command but have everything else run the normal way

is that correct @thepsion5?

spodlogar left a reply on Nested Relation Query • 2 years ago

does $user->costomers return all the users customers without error?

spodlogar left a reply on Nested Relation Query • 2 years ago

I think i might know what your problem is

but first what does you User model look like?

spodlogar left a reply on Nested Relation Query • 2 years ago

I'm just kidding. : )

spodlogar left a reply on Nested Relation Query • 2 years ago

table migrations would be great.

spodlogar left a reply on How To Load CSS From Public Folder For Elixir? • 2 years ago

no problem I love to help. ; )

spodlogar left a reply on Nested Relation Query • 2 years ago

you can have several has many relationships, but would you post the code for all three of those models?

spodlogar left a reply on Creating Multiple Separate Elixir Tasks? • 2 years ago

You can potentially create a new Elixir Extension

read more about it on the Laravel Docs http://laravel.com/docs/5.1/elixir#writing-elixir-extensions

spodlogar left a reply on Summing String Values In A DB Query • 2 years ago

you are just going to want to change that column to an integer, double, or float.

I use integers and then just divide by 100 when displaying them on a page.

spodlogar left a reply on DropzoneJs Files Save Order As Filename To Database Laravel 5 • 2 years ago

dropzone handles all the requests very fast so ordering them correctly might not be the greatest idea,

But if you save them with a created_at of uploaded_at field and ordered them by that it would be pretty close.

spodlogar left a reply on How To Load CSS From Public Folder For Elixir? • 2 years ago

you can change the asset path in

node_modules/laravel-elixir/Config.js

there is a param newmed assetsPath which is initially set to 'resources/assets' just change it to wherever you want your assets path to be.

spodlogar left a reply on Writing To Multiple Tables In A Single Function • 2 years ago

great job on tracking down that first error,

as for the new one, do you have Eloquent relationships set up in you models?

spodlogar left a reply on /css/app.css Is Accessible But Browsers Not Loading It • 2 years ago

would you post the css code in that file?

spodlogar left a reply on /css/app.css Is Accessible But Browsers Not Loading It • 2 years ago

that is outrageous! : )

is the link in the file when you view source?

spodlogar left a reply on /css/app.css Is Accessible But Browsers Not Loading It • 2 years ago

if you are using Blade try using the url('css/app.css') in you link href

spodlogar left a reply on /css/app.css Is Accessible But Browsers Not Loading It • 2 years ago

if you are using Blade try using

<link ref="stylesheet" href="{{ url('css/app.css') }}" type="text/css">
Edit Your Profile
Update

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