evaslims23

Member Since 1 Month Ago

190
Experience Level 1

4,810 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

• Complete a lesson — 100pts
• Create a forum thread — 50pts
0
Lessons
Completed
0
Awards

Earned once you have completed your first Laracasts lesson.

• First Thousand

Earned once you have earned your first 1000 experience points.

• One Year Member

Earned when you have been with Laracasts for 1 year.

• Two Year Member

Earned when you have been with Laracasts for 2 years.

• Three Year Member

Earned when you have been with Laracasts for 3 years.

• Four Year Member

Earned when you have been with Laracasts for 4 years.

• Five Year Member

Earned when you have been with Laracasts for 5 years.

• School In Session

Earned when at least one Laracasts series has been fully completed.

• Welcome To The Community

Earned after your first post on the Laracasts forum.

• Full Time Learner

Earned once 100 Laracasts lessons have been completed.

• Subscriber

Earned if you are a paying Laracasts subscriber.

• Lifer

Earned if you have a lifetime subscription to Laracasts.

• Chatty Cathy

Earned once you have achieved 500 forum replies.

• Laracasts Veteran

Earned once your experience points passes 100,000.

• Ten Thousand Strong

Earned once your experience points hits 10,000.

• Laracasts Master

Earned once 1000 Laracasts lessons have been completed.

• Laracasts Sensei

Earned once your experience points passes 1 million.

• Top 50

Earned once your experience points ranks in the top 50 of all Laracasts users.

13 Aug
6 days ago

evaslims23 started a new conversation Decimal Number In Form Validation/Insertion

Hi people. I want to automatically output a decimal number on insertion in a form. Let's say a person would like to insert the number 1000,00. What I want is after he types in 1 in the form the number to convert automatically to a decimal e.g. 1,00 and if he adds another 0 to then make it a 10,00 and so on.

The value is integer in the database and I am using a function to convert the integer to a decimal so I can display it in the frontend. So technically if the person has 15,99 product let's say the value in the database would be 1599. This I got covered, however the issue above I have not. Any ideas?

19 Jul
1 month ago

evaslims23 started a new conversation Validation: Ignore An ID From Table

So I have a table of countries: 1.USA 2.China 3.Russia

I want to make it so that if the user selects USA it returns an error so he should select a different country. How do I make such a rule?

``````public static \$rules = array(
'location_id'=>'required|integer',
);
``````
17 Jul
1 month ago

@munazzil I'm getting the same thing.

``````Collection {#290 ▼
#items: array:5 [▼
0 => Country {#292 ▶}
1 => Country {#129 ▶}
2 => Country {#299 ▶}
3 => Country {#295 ▶}
4 => Country {#305 ▶}
]
}
``````

Here is the entire contents: https://imgur.com/a/aSyc3RZ

@tray2 i have posted the output above ur reply <3

@munazzil I am such a noob I did it in the views.. Here is what I get:

array:5 [ 1 => "Worldwide" 2 => "European Union" 3 => "N. and S. America" 4 => "South Africa" 5 => "Asia" ]

@munazzil doing this creates a different error:

"Too few arguments to function Illuminate\Support\Collection::get(), 0 passed in \app\Http\Controllers\AdminProductsController.php on line 45 and at least 1 expected"

@tray2

doing this returns: "dd(\$country) dd(\$country) dd(\$country) dd(\$country) dd(\$country)"

evaslims23 started a new conversation BelongsToMany Trying To Get Property 'id' Of Non-object Error

Hi guys. I am trying to add a belongsToMany functionality to my project for Countries and Products. As in if a user decides to create a product listing he can have the option to choose many countries or destinations where he can ship the product.

My Country model:

``````public function products(){
return \$this->belongsToMany(Product::class);
}
``````

My Product model:

``````public function countries(){
return \$this->belongsToMany(Country::class);
}
``````

``````public function create()
{
//

\$categories = Category::pluck('name', 'id')->all();
\$countries = Country::pluck('name', 'id')->all();

}
``````

``````<div class="form-group">
<label class="control-label">Shipping to:</label>

<select name="countries" id="countries" class="form-control" multiple="">
@foreach(\$countries as \$country)
<option value="{{\$country->id}}">
{{\$country->name}}
</option>
@endforeach
</select>

</div>
``````

What am I doing wrong? When I visit the page in this form I receive the following error: