kenny11

Experience

13,770

8 Best Reply Awards

  • Member Since 11 Months Ago
  • 64 Lessons Completed
  • 0 Favorites

16th September, 2017

kenny11 left a reply on Is 2 Weeks For Learning Laravel Fast? • 6 days ago

tbh nobody cares if you can learn laravel in 2 weeks or not

what u can do is learn as much as possible and ask a question when u r stuck

kenny11 left a reply on Is 2 Weeks For Learning Laravel Fast? • 6 days ago

No

13th September, 2017

kenny11 left a reply on Vue Interpolation • 1 week ago

That's just an example. I don't have control what users would type

https://github.com/vuejs/vue/issues/4223

kenny11 left a reply on Vue Interpolation • 1 week ago

I made a middleware to remove curly brackets, but don't know if this is a better way to do this

kenny11 started a new conversation Vue Interpolation • 1 week ago

{{ alert('hello') }}

9th September, 2017

kenny11 left a reply on FatalThrowableError In Grammar.php Line 107 • 1 week ago

lol

1st September, 2017

kenny11 started a new conversation Set Header In Middleware • 3 weeks ago

Can anybody explain why this works

public function handle($request, Closure $next)
    {
        $response = $next($request);

        $response->header('x-robots-tag', 'none', false);

        return $response;
    }

but this won't

public function handle($request, Closure $next)
    {

        $next($request)->header('x-robots-tag', 'none', false);

        return $next($request);
    }

Isn't it basically the same thing? the only difference is if you put$next($request) in a variable, but the latter won't set this header x-robots-tag: none

27th August, 2017

kenny11 left a reply on Some Users Posts Appear Twice • 3 weeks ago

I hope Jeffrey Way makes an explanation video for this bug

21st August, 2017

kenny11 started a new conversation Bug • 1 month ago

Click on my avatar

kenny11 left a reply on Getting Highest/lowest Value From A OneToMany Relation • 1 month ago

what are u trying to do?

18th August, 2017

kenny11 left a reply on {{ $company->address }}, {{ $company->zipcode }} {{ $company->city }} • 1 month ago

what are you trying to do?

kenny11 left a reply on One Table With Multiple Pivots Tables • 1 month ago

jk paste your migrations

kenny11 left a reply on One Table With Multiple Pivots Tables • 1 month ago

you are missing peace of mind

14th August, 2017

kenny11 left a reply on What Are You Working On ? • 1 month ago

I am still thinking about what to create. I kinda feel like creating an app using apis from some company since have never done that.

What's good about knowing how to code with Laravel is you can quickly create pretty much any kind of website

kenny11 left a reply on Ads Make Site Slow • 1 month ago

The problem is Disqus. They have started to charge for using their comment system.

Definitely, Jeff does not pay for it, if you see the ads

30th May, 2017

kenny11 started a new conversation Event Calendar Search • 3 months ago

In my web application, users can post an event. on the index page, I want a calendar which users can click a date and post to my database to search an event that's held on that day and return the events.

Do you guys know any good calendar library for it? It will be a plus if a day shows like a check mark only when there is an event held on the day.

11th May, 2017

kenny11 started a new conversation How To Validate Date • 4 months ago

How do you validate a date which comes from <input type="date time-local">?

example 2017-05-12T06:00

8th May, 2017

kenny11 left a reply on Where Is The Image Located? • 4 months ago

Life must be hard for you

6th May, 2017

kenny11 left a reply on Displaying Data That A Route Returns • 4 months ago

paste your code

3rd May, 2017

kenny11 started a new conversation Building Mobile Apps With Weex And Vue.js • 4 months ago

Has anyone made a mobile app with Weex and Vue.js?

What is your experience using the tools?

I am digging into Weex, so if you have some opinions let me know

2nd May, 2017

kenny11 left a reply on Controller • 4 months ago

rtfm

kenny11 left a reply on Routes • 4 months ago

Just use laravel homestead and watch the intro videos

11th April, 2017

kenny11 left a reply on Stop Spamming. • 5 months ago

Are you using Redis? if so store a user_id and like a last_commented_time and compare current time with it and if not an hour passed redirect back with a flash message to tell unauthorized

kenny11 left a reply on LARAVEL 5 How To UPDATE One To Many (hasMany) Relation Into DB By Maintain Items ID • 5 months ago

if the number of items are fixed.

$items = $product->items;
foreach($request->get('item_name') as $key => $item_name)
    {   
        
        $items[$key]->products_id = $product->id;
        $items[$key]->item_name = $item_name;
        $items[$key]->quantity = $request->quantity[$key];
        $items[$key]->price = $request->price[$key];
        $items[$key]->save();
    };

what about this?

kenny11 left a reply on Production Not Works = Same Code On Dev Works :) • 5 months ago

I don't think you have comments in your production database.

You don't have an event related to the certain comment. check your database

kenny11 left a reply on LARAVEL 5 How To UPDATE One To Many (hasMany) Relation Into DB By Maintain Items ID • 5 months ago

In that case I think your code is totally fine imo. You don't know how many items in the array from the form right? So you cannot update the existing items.

kenny11 left a reply on LARAVEL 5 How To UPDATE One To Many (hasMany) Relation Into DB By Maintain Items ID • 5 months ago

  • What i want is the items SHOULD NOT be deleted and add as new.

I don't get it just remove this code? $product->items()->delete();

kenny11 left a reply on How To Make A Laracasts Type Video Tutorial • 5 months ago

You never find your problem unless you start

9th April, 2017

kenny11 left a reply on Copy Selected Check Box Value Text And Paste It Using Vue Js • 5 months ago

paste all the code

8th April, 2017

kenny11 left a reply on How To Get All Users Who Liked An Image • 5 months ago

Photo::likes->users;

7th April, 2017

kenny11 left a reply on Relationship Works With HasMany() But Fails With BelongsTo • 5 months ago

rename this

public function categories(){ return $this->belongsTo(Category::class); }

to

public function category(){ return $this->belongsTo(Category::class); }

kenny11 left a reply on RESTful API Actions • 5 months ago

In this situation I personally prefer a use query string like this

POST https://blahblah.com/api/categories/1?reorder

In your controller
if(request()->exists('reorder'))

kenny11 left a reply on Get All Rows From Table And Paginate • 5 months ago

User::paginate(10)

6th April, 2017

kenny11 left a reply on How Can I Set My Categories According To Alphabetic Order? • 5 months ago

App\Category::orderBy('name', 'desc')->get();

kenny11 left a reply on Best Way To Organize Webpages With Same <head> And <nav> Etc. • 5 months ago

why don't you list those in your master view if they are universal?

kenny11 left a reply on Getting All Data Through Has Many Relationship • 5 months ago

$portfolio_title = $single_portfolio->portfolio->title;

kenny11 left a reply on Accessing Session Flash Message With Axios • 5 months ago

Do you just want to display a flash message when a post is successful?

If so, why don't you write some login inside then

So in you Rue's data data() { return { success: false } } and make it true to show a message after an update is successful.

5th April, 2017

kenny11 left a reply on Pivot Model Usage • 5 months ago

I suggest you to go over "Laravel From Scratch".

It will help you in the long run

31st March, 2017

kenny11 started a new conversation What Is The Difference? • 5 months ago

Is there a difference between auth()->user() and request()->user()?

28th March, 2017

kenny11 started a new conversation Laravel Purifier • 5 months ago

Anyone happened to be using Laravel Putrifier?

No matter what I do Purifier strips "target" attribute for <a>. My code looks like this

return [

    'encoding' => 'UTF-8',
    'finalize' => true,
    'preload'  => false,
    'cachePath' => null,
    'settings' => [
        'default'          => [
            'HTML.Doctype'             => 'HTML 4.01 Transitional',
            'Attr.AllowedFrameTargets' => '_blank',
            'Attr.AllowedRel'          => 'nofollow',

            'HTML.Allowed'             => 'h2,strike,blockquote,u,div,b,strong,i,em,a[href|title|target|rel],ul,ol,li,p,br,span,img[width|height|alt|src]',
            'CSS.AllowedProperties'    => 'font,font-weight,font-style,text-decoration,padding-left,text-align',
            'AutoFormat.AutoParagraph' => false,
            'AutoFormat.RemoveEmpty'   => true,
        ],
        'test' => [
            'Attr.EnableID' => true
        ],
        "youtube" => [
            "HTML.SafeIframe" => 'true',
            "URI.SafeIframeRegexp" => "%^(http://|https://|//)(www.youtube.com/embed/|player.vimeo.com/video/)%",
        ],
    ],

];

What am I doing wrong? I have gone through all the open and closed issues on the git hub page listed below and tried everything that I thought would work, but no luck. Any help will be super greatly appreciated

https://github.com/mewebstudio/Purifier

26th March, 2017

kenny11 left a reply on How Would You Make A "draft" Feature? • 5 months ago

Yea. That is what I was thinking. Thanks for the comment

kenny11 left a reply on Re-enable Vue Dev Tool • 5 months ago

anyone?

kenny11 started a new conversation How Would You Make A "draft" Feature? • 5 months ago

Let's say you let users publish articles and implement a feature to create a "draft" before publishing an article.

How would you make a relationship and database structure?

23rd March, 2017

kenny11 left a reply on Nested Eager Loading With Where • 5 months ago

Item::with(['categories' => function($q){
    $q->where('local_id', 5)->with('local');
}])->get();

22nd March, 2017

kenny11 left a reply on Re-enable Vue Dev Tool • 6 months ago

I'm testing in local. I ran gulp but, Vue dev-tool is still disabled in chrome.

kenny11 left a reply on Re-enable Vue Dev Tool • 6 months ago

Thanks for the reply, but it didn't work

var elixir = require('laravel-elixir');

require('laravel-elixir-vueify');
require('laravel-elixir-stylus');




elixir(function(mix) {
    mix.stylus('app.styl')
        .scripts([
            'libs/sweetalert-dev.js',
            ],'./public/js/libs.js')
        .styles([
                'libs/sweetalert.css',
                'libs/bulma.css',
            ],'./public/css/libs.css');
    mix.browserify('main.js');
});
Edit Your Profile
Update

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