3,400 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
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.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
bunnypro left a reply on Working With Postgres JSONB In Laravel 5.5
you can try this https://laravel.com/docs/5.5/queries#json-where-clauses
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
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 text
column 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.
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());
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 ?
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.
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 ?
bunnypro left a reply on Anyone Experienced In Using Runcloud.io With Envoyer.io ?
anyone ?
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 ?
bunnypro left a reply on Run "where Like" In A Table Inserted With The "with"
what about whereHas()
method ?
https://laravel.com/docs/5.4/eloquent-relationships#querying-relationship-existence
bunnypro left a reply on Concat Conditionals With Query Builder
you can use when()
method
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 Route File With Database Request
hey @GroundZero your case mostly like this one https://laracasts.com/discuss/channels/laravel/route-model-binding-with-2-models
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'
}
})
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 ?
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']]);
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;
});
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)
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))
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');
}
bunnypro left a reply on What Should I Do?
you can register it globally
Vue.directive(name, {});
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" />
bunnypro left a reply on Problem With Relationships
try this
User::with('group.projects.files')->find($id);
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);
}
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>
bunnypro left a reply on How To Get Reactivity In The Child Component When Receving New Props From Parent Component ?
i think you can use update
method instead of recreating the chart.
https://gionkunz.github.io/chartist-js/api-documentation.html#chartistbase-function-update
bunnypro left a reply on How To Get Reactivity In The Child Component When Receving New Props From Parent Component ?
use computed property.
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>
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.