Ramikatz

Member Since 7 Months Ago

Experience Points
450
Total
Experience

4,550 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
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

  • Community Pillar

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

Level 1
450 XP
Apr
21
3 weeks ago
Activity icon

Started a new Conversation I Want To Get The JQuery Value For The Laravel Variable In The Blade.

I got value from the dropdown box. and now, I want to store that value in laravel variable. How to do it?

<script>
  $('#getprice').on('change', function() {
         var storeprice = this.value;
</script>
Apr
15
1 month ago
Activity icon

Replied to Allow Review Only For Those Who Have Purchased The Product

Very Thank you for Introducing me to "Laravel Policy". but, what is the query. I want to allow the user who has purchased a product to review it. (Cannot review if the user did not purchase it.) so, what is the query for that?

$user->id === [users who have purchased that product]. 

Very Thank you for helping me.

Apr
14
1 month ago
Activity icon

Started a new Conversation Allow Review Only For Those Who Have Purchased The Product

// tables -------------------------------------------------------------
order table - user_id, etc
order_items table - order_id, product_id, price,qty
review table - user_id, product_id etc

I want to Allow review only for those who have purchased the product. this is my final year product. Can you help me, please?

// saving review table
$review = new Review();
        $review->review_des = $request->review_des;
        $review->rating = $request->rating;
        $review->title = $request->review_title;
        $review->user_id  = Auth::id();
        $review->product_id  = $request->product_id;
        $review->save();

Alert::success('You have successfully added a review to this product.', 'Success Message');
        return redirect()->back();
Dec
25
4 months ago
Activity icon

Replied to Wishlist | Need Real Time Updated Values

how to show all wishlist products of one particular user. I mean, how to filter. (for Wishlist Index page)

imagine, wishlist table has - id, user_id, product_id

$id = Auth::id();
$wishlists=Wishlist::where('user_id', $id )->get();

Now $wishlists have a particular user and his all wishlist product ids.

Now how to show all those products in the blade file?

(sry I not familiar with query building. this is my university project)

Activity icon

Started a new Conversation Wishlist | Need Real Time Updated Values

I created Wishlist CRUD. after that I realized it can't show updated quantity, prices, etc. (bcz i created separated CRUD for wishlist (i get data from product table and save it in wishlist table when user request))

I want to show data from the product table directly. (then I can show updated price, quantity in Wishlist )

Can you have any idea to do this?

Dec
24
4 months ago
Activity icon

Started a new Conversation I Want To Add The "Buy Now", "Add To Cart" Buttons On The Product Page.

I want to add the "Buy Now", "Add To Cart" buttons on the product page.

when the user clicks the "Buy Now", "Add To Cart" buttons, the user can change the quantity of the product

for this, what is the best way. use form with two submit buttons? or Is there another simple method?

@csrf Buy Now Add To Cart
Dec
11
5 months ago
Activity icon

Started a new Conversation Want To Display Checked Icon (ticks) For The Already Selected Checkboxes. (Checkboxes, As In WordPress)

I want to tick the already selected ones on the product update page. If the Samsung category is already selected, it should be checked in this box. this is image of my view - https://i.stack.imgur.com/mlQxp.png

How to do it?

I used many To many relationship. in product model,

public function productcategories()
{
    return $this->belongsToMany(ProductCategory::class, 'product_category', 'product_id', 'category_id');
}

productCategory Model,

public function products()
{
    return $this->belongsToMany(Product::class, 'product_category', 'category_id', 'product_id');
}

in update view page,

    @foreach ($productcategories as $category)
                        <div class="col-md-12 col-sm-12">
                            <div class="form-check">
                                <input class="form-check-input" name="productcategory_id[]" type="checkbox" value="{{$category->id}}">
                                <label class="form-check-label" for="defaultCheck1">
                                    {{$category->name}}
                                </label>
                            </div>
                        </div>
                        @foreach ($category->subcategory as $sub)
                        <div class="col-md-12 col-sm-12 ">
                            <div class="form-check">
                                {!! "&nbsp;" !!} {!! "&nbsp;" !!} {!! "&nbsp;" !!}
                                <input class="form-check-input" name="productcategory_id[]" type="checkbox"
                                    value="{{$sub->id}}">
                                <label class="form-check-label" for="defaultCheck1">
                                    {{$sub->name}}
                                </label>
                            </div>
                        </div>
                        @endforeach
                        @endforeach
Nov
25
5 months ago
Activity icon

Replied to I Deployed My Laravel Site To Namecheap Shared Host. But No Images.

​``` if ($request->file('image')) { File::delete('upload/firmware' . $firmdownpost->image); $image = $request->file('image'); $my_image = rand() . '.' . $image->getClientOriginalExtension(); $image->move(public_path('upload/firmware'), $my_image); }

$firmdownpost = new() Firmdownpost(); $firmdownpost->image = $my_image; $firmdownpost->save(); ​```

In the localhost, It works fine. I move the image to public/upload/firmware. and renamed it and save that name in the database. and display using

<img src="{{url('upload/firmware',$firmdownpost->image)}}"> ​

sry, I am new to Laravel, please tell me if there is any other way to save image.

Activity icon

Replied to I Deployed My Laravel Site To Namecheap Shared Host. But No Images.

I checked there,but I can't found images. I use this method to store images

    if ($request->file('image')) {
        File::delete('upload/firmware' . $firmdownpost->image);
        $image = $request->file('image');
        $my_image = rand() . '.' . $image->getClientOriginalExtension();
        $image->move(public_path('upload/firmware'), $my_image);
        $firmdownpost->image = $my_image;
    }
Activity icon

Started a new Conversation I Deployed My Laravel Site To Namecheap Shared Host. But No Images.

I deployed my laravel site to Namecheap shared host. existing images are working and previewing well.

but if I add an image using my one of CRUD, it only generates an image name. (245682104.jpg) I can see that image name on my database. but no preview on the dashboard. and No saved image on public_html/upload/firmware

But in the local host are fine and working wel. can you help me?

my htaccess file

Options -MultiViews -Indexes
RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

This is my index file