bunnypro

bunnypro

Yogyakarta

Member Since 1 Year Ago

Experience Points 31,500
Experience
Level
Lessons Completed 2
Lessons
Completed
Best Reply Awards 51
Best Answer
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.

25 Jan
9 months ago

bunnypro left a reply on VueJS Selectize Input Model Binding

i don't know about selectize but if you want an array, so declare the data as array

selection: []

bunnypro left a reply on Null Value

Hey @Snapey

don't do $request->get('figure') because this will only get GET route variables and not POST route variables.

as far as i know the get method comes from Symfony\Component\HttpFoundationRequest and i don't see Illuminate\Http\Request override it nor any magic __call method there, as you can see here https://github.com/symfony/http-foundation/blob/master/Request.php#L699, the get method is not only get from GET method but also from request that described as $_POST here https://github.com/symfony/http-foundation/blob/master/Request.php#L81

24 Jan
9 months ago

bunnypro left a reply on How To Store Multiple Images Filename In One Column Using Laravel

just for an alternative if you still want a single column to store your images you can make a json column. the simplest way is make a textcolumn and mark the column in $casts property of your model as array, it will serialize to database as a string by json_encode it, or create attribute accessor and mutator to implement your own serialize/unserialize logic.

23 Jan
9 months ago

bunnypro left a reply on How Do I Rebind A Singleton ?

i think about that at first, but since it's a singleton i just have to makeLeague\OAuth2\Server\AuthorizationServer via container and enable my own OAuth Grant in my 'App\Providers\AppServiceProvider::boot()'

// inside boot method
$server = $this->app->make(AuthorizationServer::class);

$server->enableGrantType(new MyCustomAccessGrant(), Passport::tokensExpireIn());
22 Jan
9 months ago

bunnypro left a reply on Simple Plugin Refusing To Work

may be you can use es style import

import BooBoo from './boo-boo'

bunnypro left a reply on Header Authorization JWT

you can use this package tymon/jwt-auth.

bunnypro started a new conversation How Do I Rebind A Singleton ?

how do i rebind a singleton that registered by a package provider ?

In my case, i want to rebind League\OAuth2\Server\AuthorizationServer that registered by laravel/passport. Actually i just want to enable my own OAuth Grant like Laravel\Passport\Bridge\PersonalAccessGrant by laravel/passport.

May be there is a more simple way to do that instead of rebind the singleton ?

14 Sep
1 year ago

bunnypro left a reply on How To Secure Register Endpoint Api For First Party Mobile App ?

i have done it before, but its marked as not-secure method by our security tester. They claim they can get the KEY and request with it.

I think about public and private key like ssh, but i don't know how to implement it.

06 Sep
1 year ago

bunnypro left a reply on How To Secure Register Endpoint Api For First Party Mobile App ?

i mean, when registering a user, the user is not registered yet, so it can't generate oauth access_token then it can't use oauth for securing the api.

what do you mean with secure-api ? is that like a access-token ?

bunnypro started a new conversation How To Secure Register Endpoint Api For First Party Mobile App ?

As far as i know, OAuth 2 requires user credential for authentication. But here we don't have any user credential yet.

anyone knows how to secure it ?

27 Aug
1 year ago

bunnypro left a reply on Save Method Doesn't Work On Any Object, While Login Is Ok

i see that you manually fill the Note id attribute, so i assume you're not auto increment it, so you have to set $incrementing = false in your Note model.

https://laravel.com/docs/5.4/eloquent#eloquent-model-conventions in primary keys section

bunnypro left a reply on Save Method Doesn't Work On Any Object, While Login Is Ok

look inside your note/edit.blade.php, the specific Note that you're trying to get is not exists. that's what the error exception said.

bunnypro started a new conversation Anyone Experienced In Using Runcloud.io With Envoyer.io ?

as far as i know, runcloud io has its own environment that i can't access directly, for example in deployment script, it has its own aliases for php-cli.

how do i implement it ?

11 Jul
1 year ago

bunnypro left a reply on Data Undefined In Child Component

add v-if directive in your input

<input v-if="row.basePrices" v-model="row.basePrices.labor">

bunnypro left a reply on Get Selected Values From Database In Checkboxes (Laravel)

you can pass the related divisions to the modal by set it as data-* in modal button trigger, and then set the checked checkbox with javascript.

http://getbootstrap.com/javascript/#modals-related-target

// inside $subjects foreach
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#yourEditModal" data-divisions="{{ $subject->divisions->pluck('id')->toJson() }}">Edit</button>

// do your javascript to check all related division checkbox

bunnypro left a reply on Property Or Method "test" Is Not Defined On The Instance But Referenced During Render....

@eddy1992 you should not attach Vue to body, html or any element that contains script. try create an element with an id and attach vue to it

// html
<div id="app">
    {{ test }}
</div>

// sciprt
new Vue({
    el: '#app',

    data: {
        test: 'Hello'
    }
})
06 Jul
1 year ago

bunnypro left a reply on Vue Says My Property Isn't Defined, But I Think It Is...?

look in your vue dev tool, is the specified data (blah) exists ?

16 Jun
1 year ago

bunnypro left a reply on Update Data Into Table From Dynamically Created Input Field

inside your iteration, i think you should do like this

Itinerary::updateOrCreate(
    ['tour_id' => $tour_id],
    [
        'plan' => $temp_itinerary[$i],
        'day' => $temp_day[$i]]
    ]
);

bunnypro left a reply on Laravel Validation: Make A Field Required If Other Fields Are Present BUT Don't Make It Required If A Certain Field Has A Specific Value

may be you should use required_with_all instead. from your descripiton you can do like this

[
    'A' => 'required_with_all:B,C|required_unless:D,1'
];

bunnypro left a reply on How Do I Call A Public Function Inside Of My Controller?

you should call it like this

call_user_func([$this, $data['currentTab']]);
15 Jun
1 year ago

bunnypro left a reply on Vue Form - Promises - Resetting Button Immediately

if you want to call this in a closure, use es6 arrow syntax or bind this to the closure.

.catch(errors => {
    this.busy = false;
});

or

.catch(function(errors) {
    this.busy = false;
}.bind(this));

bunnypro left a reply on Vue Form - Promises - Resetting Button Immediately

from your question above, i think you just miss placed the this.form.saving = false;, you should place it inside the catch call back, not as parameter.

it should be

.catch(error => {
    swal( ... );

    this.form.saving = false;
});
14 Jun
1 year ago

bunnypro left a reply on Php Variable Function

how about

$this->{$request->response}($task);

bunnypro left a reply on Changing The Value Of 'this' Within A Vue Method

you can bind this to the closure

function() {
    ...
}.bind(this)
12 Jun
1 year ago

bunnypro left a reply on Variable Inside The Child Component Gets Undefined?

the solution is to use es6 arrow syntax or bind the this

axios.get( ... ).then(response => {
    ...
})

or

axios.get( ... ).then(function (response) {
    ...
}.bind(this))
11 Jun
1 year ago

bunnypro left a reply on Laravel , Add A New Object In Database.

so the id column is an autoincrement bigint ?

try to set your table autoincrement to the last id + 1

alter table <your table name> auto_increment = <last id + 1>

bunnypro left a reply on Laravel , Add A New Object In Database.

or may be the id column length is too short.

bunnypro left a reply on Laravel , Add A New Object In Database.

it looks like tour id column is not autoincrement.

bunnypro left a reply on [HOW] Parent To Component: One Way Binding

i think you should pass it separately, otherwise you can create mixins with above method.

bunnypro left a reply on Error "Trying To Get Property Of Non-object" With Relationship

@Xanger the solution can be add a query to only get InfoGiochi that has giochi,

InfoGiochi::with('Giochi')->has('giochi')->get();

another way is add @ to ignore the error when you call it

{{ @$value->giochi->nome }}

bunnypro left a reply on Error "Trying To Get Property Of Non-object" With Relationship

check on all of the collection items. (in pic you have 12 InfoGiochi items)

bunnypro left a reply on Error "Trying To Get Property Of Non-object" With Relationship

may be there is InfoGiochi that doesn't have Giochi. dd() the result to make sure.

bunnypro left a reply on Column Not Found: 1054 Unknown Column 'user_user_id' In 'field List'

it's your relation definition. if you don't follow the convention so you should pass the column name to your relation

// User model
public function address()
{
    return $this->hasMany(Address::class, 'user_id, 'user_id');
}
09 Jun
1 year ago

bunnypro left a reply on What Should I Do?

you can register it globally

Vue.directive(name, {});

https://vuejs.org/v2/guide/custom-directive.html

bunnypro left a reply on Vue Is Not Setting Max Value Input Dynamic

if you want to bind a data value to the attribute you should use v-bind: or the shorthand :

<input v-bind:value="someData" :type="someType" />
08 Jun
1 year ago

bunnypro left a reply on Problem With Relationships

try this

User::with('group.projects.files')->find($id);
07 Jun
1 year ago

bunnypro left a reply on [HOW] Parent To Component: One Way Binding

copy the props object

// edit-user-modal component
props: ['user'],

data: () => ({
    person: {}
}),

created() {
    this.person = Object.assign({}, this.user);
}
05 Jun
1 year ago

bunnypro left a reply on Laravel Mix Won't Run On A Fresh Install

in your package.json file in scripts field, try change

cross-env NODE_ENV= ...

to

node node_modules/cross-env/bin/cross-env.js NODE_ENV= ...

bunnypro left a reply on Laravel Mix Won't Run On A Fresh Install

looks like you didn't install cross-env

npm install cross-env

and change your laravel-mix version to v0.11.4, since v0.12.* has so much bug. stick with that version until v1.0 is released.

bunnypro left a reply on Component Property Not Defined When Iterating Posts

looks like your v-for is reversed, it should be

<post v-for="post in posts" :post="post" :user="user"></post>
03 Jun
1 year ago

bunnypro left a reply on I'm Looking To Change Objects Based On An Index

you can use computed property

computed: {
    schema() {
        // your logic to get your dynamic schema
        // ex. return this['q_SingleTextPagePart_en_' + index]
    }
}

and then in the view

<vue-form-generator :schema="schema" :model="model" ></vue-form-generator>
02 Jun
1 year ago

bunnypro left a reply on Call Custom Class Inside Eloquent

you can define the price method as static method, so you can call it like this

Format::price( ... );

bunnypro left a reply on Serialize Array Before Insert To Database

hey look at eloquent mutators array casting https://laravel.com/docs/5.4/eloquent-mutators#array-and-json-casting

you don't have to add accessor or mutator, laravel will do it for you.