hadis

hadis

Member Since 5 Months Ago

Experience Points
2,090
Total
Experience

2,910 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.

Level 1
2,090 XP
Mar
30
3 days ago
Activity icon

Started a new Conversation Image Update Problem

When I edit and update a data the image change to xxx.temp instead of xxx.png or jpg

 public function update(Request $request,$id)
    {
        $data = Singleproduct::find($id);
        $data->name = $request->name;
        $data->explain = $request->explain;
        $data->price = $request->price;
        $data->parent_name = $request->parent_name;
        $data->image = $request->image;

        $data->save();

        return redirect(route('product.index'));
    }

what is the problem?

Mar
28
5 days ago
Activity icon

Started a new Conversation Update Method

when I submit edit form I get this error: "The POST method is not supported for this route. Supported methods: GET, HEAD, PUT, PATCH, DELETE. "

Route::get("/allProducts/edit/{id}","[email protected]")->name('Allproduct.edit');
Route::post("/allProducts/update/{id}","[email protected]")->name('Allproduct.update');
 <form class="form-horizontal tasi-form" method="post" enctype="multipart/form-data"
                      action="{{ route('allProducts.update' , [ 'id'=>$allproduct->id ]) }}">
                    {{ csrf_field()}}
                  
  public function update(Request $request, $id)
    {
       $data = Allproduct::find($id);

        $data->name = $request->name;
        $data->save();

        return redirect(route('allProducts.index'));
    }

what's the problem?

Mar
27
6 days ago
Activity icon

Replied to Property [video] Does Not Exist On This Collection Instance.

but actully I want to show just the last item in database and when i use Index::last() it return an error

Activity icon

Started a new Conversation Property [video] Does Not Exist On This Collection Instance.

I want to show video in view but I don't know how!!

                            <video width="320" height="240" controls>
                                <source src="{{ URL::asset($about->video)}}" type="video/mp4">
                            </video>
public function store(Request $request)
        {
            $video = $request->file('video')->store('uploads');
            $new_file_data = [
                'about' => $request->input('about'),

                //video storage
                'video' => $video,
            ];
            Index::create($new_file_data);

            return view('admin.index.index');
    }
  $about = Index::get();
         return view('welcome' , compact( 'about' ) ;

I am using this but it has error

Activity icon

Started a new Conversation Call To Undefined Method App\Index::last()

I want show the last data in database and I'm using last() meyhod but this error "Call to undefined method App\Index::last() "!!

  $about = Index::get();
         return view('welcome' , compact( 'about');

                    @foreach( $about as $show)
                    <div class="icon-box align-center">
                        <div class="animated-icon gradient-icon" data-icon="images/icons/pencil-ruler.svg" data-gradients="#ff795f,#ce1768"></div>
                        <div class="ib-content">
                            <h3>{!! $show->last()->about !!}</h3>
                        </div>
                    </div>
                        @endforeach
            

Mar
26
1 week ago
Activity icon

Started a new Conversation SQLSTATE[42S02]: Base Table Or View Not Found: 1146 Table '***.indices' Doesn't Exist

I have table indexpage but still have this error! this is my code:

   public function up()
    {
        Schema::create('indexpage', function (Blueprint $table) {
            $table->increments('id');
            $table->text('about');
            $table->string('video');
            $table->timestamps();
        });
    }
Mar
25
1 week ago
Activity icon

Started a new Conversation SQLSTATE[HY000] [2002] No Connection Could Be Made Because The Target Machine Actively Refused It.

I have changed upload_max_filesize,post_max_size and memory_limit and now I got this error "No connection could be made because the target machine actively refused it." what is the problem?

Mar
21
1 week ago
Activity icon

Started a new Conversation Missing Required Parameters

I want to show a single page that relate to an topic but I have this problem: Missing required parameters for [Route: ui.singlefreedownload.show] [URI: Singlefreedownload/{free}]

and this is my code:

public function show($free)
    {
        $singlefile = SingleFreeDownload::findOrFail($free);
        return view('UI.freeDownload.SingleFreeDownload' , compact('singlefile' ));
    }
Route::get('/Singlefreedownload/{free}' , 'admin\[email protected]')->name('ui.singlefreedownload.show');
     <div class="container">
                <div class="col-md-5 col-sm-7 col-md-offset-7 col-sm-offset-5">
                    <div class="title">
                        <h2 data-bigletter="R">{{ $free->title }}</h2>
                        <h4>{{ $free->big_image }}</h4>
                    </div>
                    <div class="pricing-footer"><a class="btn btn-color upper no-radius" data-custom-bg="#2A68FC" href="#">دانلود</a>
                    </div>
                </div>
            </div>
Activity icon

Started a new Conversation Trying To Get Property 'image' Of Non-object

I want to show every thig in my database but I have this error and this is my code:

        @foreach( $free as $freelist)
        <div class="grid-posts-wrapper">
            <article class="card-post">
                <div class="card-post-wrapper">
                    <div class="card-post-image">
                        <a href="#">
                            <img src="{{ $freelist->image }}" alt="">
                        </a>
                    </div>
                    <div class="card-post-content">
                        <div class="post-body">
                            <h3><a href="#">{{ $freelist->title }} </a></h3>
                        </div>
                        <div class="pricing-footer"><a class="btn btn-color upper no-radius" data-custom-bg="#2A68FC" href="free-single.html">ادامه مطلب</a>
                        </div>
                    </div>
                </div>
            </article>
        </div>
        @endforeach
      

controller:

   public function show(FreeDownloadList $free)
    {
        return view('UI.freeDownload.FreeDownload' , compact('free' ));
    }

model:

 protected  $fillable = [
        'title' , 'image',
    ];
Mar
05
4 weeks ago
Activity icon

Replied to Shopping Cart

I have look there but most of them are packages and I don't want package

Mar
04
4 weeks ago
Activity icon

Started a new Conversation Shopping Cart

I have search a lot to find how to build shopping cart but I found nothig can you suggest me a good website or a learning source for this? by the way I am using laravel5.8

Mar
03
4 weeks ago
Activity icon

Replied to Call To Undefined Method Darryldecode\Cart\Cart::count()

I change it as you said but now something weird happen!! I have chosen 4 product but it shows just one and this is diffrent for each product but none of them is not right!!

Activity icon

Started a new Conversation Call To Undefined Method Darryldecode\Cart\Cart::count()

I am using darryldecode package shoppingcart but I have some issuse with it when I want to count products I got this error:Call to undefined method Darryldecode\Cart\Cart::count()

an this is cart view:

<section>
    <div class="container">
        <div class="row">
            <div class="col-md-8 mb-50">
                <table class="table" id="shopping-cart">
                    <thead>
                    <tr>
                        <th class="hidden-xs"> </th>
                        <th class="hidden-xs">تصویر</th>
                        <th>محصول</th>
                        <th>قیمت</th>
                        <th>تعداد</th>
                        <th>مجموع</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach(\Cart::getContent() as $pdt)
                    <tr class="cart_item">
                        <td class="hidden-xs"><a href="#"><i class="hc-close"></i></a>
                        </td>
                        <td class="hidden-xs">
                            <a href="#">
                                <img src="images/shop-1.jpg" alt="">
                            </a>
                        </td>
                        <td><a href="#">بیش از حد پررنگ</a>
                        </td>
                        <td><span>.99</span>
                        </td>
                        <td>
                            <input class="form-control" type="number" step="1" min="0" value="1" title="Qty" placeholder="Qty">
                        </td>
                        <td class="product-subtotal"><span>.99</span>
                        </td>
                    </tr>
                    @endforeach
                    </tbody>
                </table>
                <div class="coupon-form">
                    <div class="input-group">
                        <input class="form-control" type="text" placeholder="Coupon code">
                        <div class="input-group-btn">
                            <button class="btn btn-dark btn-block" type="button">ثبت کد تخفیف</button>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="cart-summary">
                    <div class="title">
                        <h6>جزییات سفارش</h6>
                    </div>
                    <table class="shop_table shop_table_responsive table">
                        <tbody>
                        <tr class="order-total">
                            <th>مجموع</th>
                            <td>
                                <h6>.99</h6>
                            </td>
                        </tr>
                        <tr class="order-total count">
                            <th>تعداد</th>
                            <td>
                                <h6>{{ \Cart::count() }}</h6>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="proceed-to-checkout">
                        <button class="btn btn-dark btn-block" type="button">ادامه جهت تسویه حساب</button><!--<a class="btn btn-color btn-block" href="#"></a>-->
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

what is the problem?

Mar
01
1 month ago
Activity icon

Replied to Trying To Get Property Of Non-object In Laravel Shopping Cart

I edited it as you said but still have that error(Trying to get property 'id' of non-object) and the above blade edited

Activity icon

Replied to Trying To Get Property Of Non-object In Laravel Shopping Cart

<form action="{{ route('cart.add') }}" method="post">
        {{ csrf_field()}}
    <section class="grey-bg">
        <div class="container">
            <div class="row">
                <div class="col-md-6">
                    <div class="row">
                        <div class="single-product-id">
                            <h3 name="id">{{ $singleproduct->id }}</h3>
                        </div>
                        <div class="col-sm-10 pull-md-right">
                            <div class="images-gallery" id="product-slider">
                                <img src="{{ asset($singleproduct->image )  }}" alt="">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-5 col-md-offset-1">
                    <div class="single-product-ratings">
                        <div class="product-rating"><span class="product-stars"><span class="product-rating-stars" data-width="90"></span></span>
                        </div>
                    </div>
                    <div class="title">
                        <h2  name="name">{{ $singleproduct->name }}</h2>
                    </div>
                    <div class="single-product-price">
                        <h3 name="price">{{ $singleproduct->price }}</h3>
                    </div>
                    <div class="single-product-desc">
                        <p>{!! $singleproduct->explain  !!} </p>
                    </div>
                    <div class="single-product-add">
                            <div class="input-group">
                                <input class="form-control" type="number" placeholder="QTY" name="qty" value="1" min="1">
                                <span class="input-group-btn"><button class="btn btn-dark" href=""  type="submit">افزودن به سبد خرید</button></span>
                            </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    </form>

Activity icon

Replied to Trying To Get Property Of Non-object In Laravel Shopping Cart

actually I have 3 product in database

Activity icon

Replied to Trying To Get Property Of Non-object In Laravel Shopping Cart

dd($request->input('id')); return null!what should I do?

Feb
29
1 month ago
Activity icon

Started a new Conversation Trying To Get Property Of Non-object In Laravel Shopping Cart

I am using darryldecode for shopping cart in my project

this is my shoppingcartController and add method:

public function add(){

         public function add(Request $request){

        $pdt = Singleproduct::find($request->input('id'));

       \Cart::add(array(
            array(
                'id' => $pdt->id,
                'name' => $pdt->name ,
                'price' => $pdt->price,
                'quantity' => \request()->qty ,
            )));

    }

and this is route list:

Route::post('/cart/add'  ,  'admin\[email protected]')->name('cart.add');

and in my SingleProduct i have id,price and name!

the error is:"Trying to get property 'id' of non-object"

where is the problem??

Feb
25
1 month ago
Activity icon

Replied to SQLSTATE[22007]

I cant use two increament!!

" SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key (SQL: create table file_products (id int unsigned not null auto_increment primary key, file_id int unsigned not null auto_increment primary key, created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') "

Activity icon

Started a new Conversation SQLSTATE[22007]

I have package and file pages when I click on file name of files show apear and I select files I want and submit it to file_products table,this table show files that relate to a package this is my code:

file_products table:(this table show relation)

 public function up()
    {
        Schema::create('file_products', function (Blueprint $table) {
            $table->integer('id');  //product id
            $table->integer('file_id');
            $table->timestamps();
        });
    }

files table:

public function up()
    {
        Schema::create('product_files', function (Blueprint $table) {
            $table->increments('id');
            $table->string('file_name');
            $table->string('file_explain');
            $table->string('file');

            $table->timestamps();
        });
    }

product table:

 public function up()
    {
        Schema::create('singleproducts', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name');
            $table->text('explain');
            $table->string('image');
            $table->string('price');
            $table->timestamps();
        });
    }

and the error is: " SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '' for column 'file_id' at row 1 (SQL: insert into file_products (file_id, id) values (, 1)) "

Feb
24
1 month ago
Activity icon

Replied to Undefined Variable: Product_item

sorry it was my mistake! I edited it

Activity icon

Started a new Conversation Undefined Variable: Product_item

I want to update my selection this is my code:

productSync.blade:

 @if( $files && count($files) > 0)
        <form action="{{ route('product.updatesync_files' , [ 'id' => $product_item]) }}" method="post"  enctype="multipart/form-data">
            {{ csrf_field()  }}
            <h3 style="color: black; ">فایل مربوطه:</h3>
            <section class="panel">
                <table class="table table-striped table-advance table-hover">
            <ul>
                @foreach($files as $file)
                    <li>
                        <input type="checkbox" name="files[]" value="{{ $file->file_id  }}" {{ isset($id) && in_array($file->id,$id) ? 'checked':''  }}>
                        {{ $file->file_name }}
                    </li>
                @endforeach
            </ul>
            <div class="form-group">
                <input type="submit" class="btn btn-danger" name="submit_product_files" value="ذخیره اطلاعات">
            </div>
                </table>
            </section>
        </form>
    @endif

controller:

    public  function updatesyncFiles(Request $request , $id){
       $product_item = Singleproduct::find($id);
        $files = $request->input('files');
        if ($product_item && is_array($files)){
            $product_item->file()->sync($files);
        }
        return view('admin.SingleProduct.productSync', [
            'product_item' => $product_item
        ]);
 public  function syncFiles(Request $request , $id){
        $files = product_file::all();
      $product_item = Singleproduct::find($id);
      $product_files = $product_item->file()->get()->pluck('id')->toArray();
        return view('admin.SingleProduct.productSync'  , compact('files' , 'product_files'));
   }

route:

   Route::get('/product/sync_files/{id}', '[email protected]')->name('product.sync_files');
    Route::post('/product/updatesync_files/{id}', '[email protected]')->name('product.updatesync_files');

and the error is: "Undefined variable: product_item" in productSync.blade.php

Feb
18
1 month ago
Activity icon

Replied to The POST Method Is Not Supported For This Route. Supported Methods: GET, HEAD

this is update method,I think $product_item is the parameter that show update,is it right? because when I use $product_item in blade I get " Undefined variable: product_item " error!!

    public  function updatesyncFiles(Request $request , $id){
        $product_item = Singleproduct::find($id);
        $files = $request->input('files');
        if ($product_item && is_array($files)){
            $product_item->file()->sync($files);
        }
Activity icon

Replied to The POST Method Is Not Supported For This Route. Supported Methods: GET, HEAD

I did it and now I have this error: " Missing required parameters for [Route: product.sync_files] [URI: admin/product/sync_files/{id}]. "!!!

Activity icon

Started a new Conversation The POST Method Is Not Supported For This Route. Supported Methods: GET, HEAD

I want to select a title and send it to database but as I submit it I receive "The POST method is not supported for this route. Supported methods: GET, HEAD." error and this is my code:

productSync.blade:

@if( $files && count($files) > 0)
        <form action="" method="post">
            {{ csrf_field()  }}
            <h3 style="color: black; ">فایل مربوطه:</h3>
            <section class="panel">
                <table class="table table-striped table-advance table-hover">
            <ul>
                @foreach($files as $file)
                    <li>
                        <input type="checkbox" name="files[]" value="{{ $file->file_id  }}" {{ isset($id) && in_array($file->id,$id) ? 'checked':''  }}>
                        {{ $file->file_name  }}
                    </li>
                @endforeach
            </ul>
            <div class="form-group">
                <input type="submit" class="btn btn-danger" name="submit_product_files" value="ذخیره اطلاعات">
            </div>
                </table>
            </section>
        </form>
    @endif

route list:

Route::get('/product/sync_files/{id}', '[email protected]')->name('product.sync_files');
    Route::post('/product/updatesync_files/{id}', '[email protected]')->name('product.updatesync_files');
Feb
11
1 month ago
Activity icon

Started a new Conversation Method Not Recognized

I call syncFiles() and updatesyncFiles() in web but it not recognized!!

Route:

Route::get("/singlefile/sync","[email protected]");
Route::post("/singlefile/updatesync","[email protected]");

controller:

 public  function syncFiles(){
        $files = Storefile::all();
        return view('admin.SingleProduct.CreateFile'  , compact('files'));
    }
   public  function updatesyncFiles(){
            return view('admin.SingleProduct.indexfiles');
    }
Feb
09
1 month ago
Activity icon

Started a new Conversation Show Package Files

I'm new to laravel and have a problem , I want to show all of files in a package for this I have parent_id but the problem is when I click on a package it just show the last file in database not all related files

controller:

 public function store(Request $request)
    {
        $file = $request->file('file')->store('uploads');
        $parent_id=$request->get('parent_id');

        $new_file=[
            'file_name'=>$request->input('file_name'),
            'file_price'=>$request->input('file_price'),

            'parent_id'=>$parent_id,

            //file
            'file'=>$file,
        ];
        Storefile::create($new_file);
        return redirect()->route('product.index');
    }
 public function show($file)
    {
        $files = Storefile::findOrFail($file);
        return view('UI.store.FileProduct' , compact('files' ));
    }

blade:

    {{$files->file_name}}
Feb
03
1 month ago
Activity icon

Started a new Conversation SQLSTATE[42000]: Syntax Error Or Access Violation: 1075 Incorrect Table Definition

when I want to migrate and create database table I get this error: " SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key (SQL: create table store_file (file-id int unsigned not null auto_increment primary key, store-id int unsigned not null auto_increment primary key, created_at timestamp null , updated_at timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') "

public function up()
    {
        Schema::create('store_file', function (Blueprint $table) {
            $table->increments('file-id')->unsigned();
            $table->increments('store-id')->unsigned();
            $table->timestamps();
        });
    }
Jan
28
2 months ago
Activity icon

Replied to SQLSTATE[HY000]: General Error

I sent value

Activity icon

Replied to SQLSTATE[HY000]: General Error

what should I do?

Activity icon

Started a new Conversation SQLSTATE[HY000]: General Error

when I want to save data in database i got this error: "SQLSTATE[HY000]: General error: 1364 Field 'short_explaine' doesn't have a default value (SQL: insert into courseschedules (course_name, updated_at, created_at)"

controller:

public function store(Request $request)
    {
        $class_plan=[
            'course_name'=>$request->input('course_name'),
            'short_explaine'=>$request->input('short_explaine'),
            'classes_time'=>$request->input('classes_time'),
        ];
        Courseschedule::create($class_plan);
    }

model:

protected  $fillable = [
        'course_name' , ' short_explaine'  , ' classes_time'
    ];
Jan
25
2 months ago
Activity icon

Started a new Conversation Property [header_image] Does Not Exist On This Collection Instance.

I have this error " Property [header_image] does not exist on this collection instance. " what is the problem?

controller:

public function show()
    {
        $edu = Classes::get();
        return view('UI.classes.educationcourses'  ,  compact('edu'));
    }

blade:

 <img src="{{$edu->header_image}}" alt="">
Jan
20
2 months ago
Activity icon

Started a new Conversation Using Editor

I have 3 fields and want to use editor but just one of them change to editor and others just change to textarea

<div class="form-group row">
                        <label class="col-12 col-sm-3 col-form-label text-sm-right">مطلب سمت چپ</label>
                        <div class="col-12 col-sm-8 col-lg-6">
                            <textarea name="col_one_left_text" id="editor"></textarea>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-12 col-sm-3 col-form-label text-sm-right">مطلب سمت راست</label>
                        <div class="col-12 col-sm-8 col-lg-6">
                            <textarea name="col_one_right_text" id="editor" ></textarea>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-12 col-sm-3 col-form-label text-sm-right">داستان ما</label>
                        <div class="col-12 col-sm-8 col-lg-6">
                            <textarea name="our_story_text" id="editor"> 
                            </textarea>
                        </div>
                    </div>

@section('editor')
            <script>
                ClassicEditor
                    .create( document.querySelector( '#editor' ) )
                    .catch( error => {
                        console.error( error );
                    } );
            </script>
        @endsection
Dec
21
3 months ago
Activity icon

Started a new Conversation Shopping Cart

I'm new to laravel and I can't find any good training for cart Can someone offer good training?

Dec
19
3 months ago
Activity icon

Replied to Can't Read Data From Database And Show It

sorry,I didn't undrestand exactly what you said but I should mention that in this page all of my products showing so I think it's not important to use id here

Activity icon

Replied to Can't Read Data From Database And Show It

this problem solved but now i have "Property [name]([image] or [price]) does not exist on this collection instance."error

Activity icon

Started a new Conversation Can't Read Data From Database And Show It

I want to read datas in my database and show them in store page but nothing show!!

 public function show(Allproduct $allproduct)
    {
        return view('UI.store.AllProducts' , compact('allproduct' ));
    }
Route::get('/allproduct' , 'admin\[email protected]');
<section class="grey-bg">
        <div class="container">
            <div class="row">
                <div class="products-row columns-3">
                    <div class="product-col">
                        <div class="shop-product">
                            <div class="product-thumb">
                                <a href="shop-single.html">
                                    <img src="{{ $allproduct->imageeee }}" alt="">
                                </a>
                            </div>
                            <div class="product-info">
                                <h3><a href="shop-single.html">{{ $allproduct->name }}</a></h3><span class="product-price">{{ $allproduct->price }}</span>
                                <div class="product-rating"><span class="product-stars"><span class="product-rating-stars" data-width="100"></span></span>
                                </div>
                                <div class="add-to-cart-btn"><a href="#"><i class="hc-cart-alt"></i><span>افزودن به سبد خرید</span></a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
Nov
29
4 months ago
Activity icon

Replied to : Include(C:\xampp\htdocs\***\***\***): Failed To Open Stream: Permission Denied

This is error message:

ErrorException : include(C:\xampp\htdocs\PHP\xxx\xxx): failed to open stream: Permission denied

at C:\xampp\htdocs\PHP\xxx\xxx\vendor\composer\ClassLoader.php:444 440| * Prevents access to $this/self from included files. 441| */ 442| function includeFile($file) 443| {

444| include $file; 445| } 446|

Exception trace:

1 include() C:\xampp\htdocs\PHP\xxx\xxx\vendor\composer\ClassLoader.php:444

2 Composer\Autoload\includeFile("C:\xampp\htdocs\PHP\xxx\xxx\vendor\composer/../..") C:\xampp\htdocs\PHP\xxx\xxx\vendor\composer\ClassLoader.php:322

Please use the argument -v to see more details.

Activity icon

Started a new Conversation : Include(C:\xampp\htdocs\***\***\***): Failed To Open Stream: Permission Denied

when i run php artisan route:list i got this error what is the problem?

Nov
12
4 months ago
Activity icon

Replied to Trying To Get Property 'important_body' Of Non-object

@shez1983 @nakov when user click on article 1 i want to open article 1 page , when click on article 2 open article 2 page and etc. without $id how can i do this?

Activity icon

Replied to Trying To Get Property 'important_body' Of Non-object

it find id but $mainArticle is null

Activity icon

Started a new Conversation Trying To Get Property 'important_body' Of Non-object

I want to read article from database and show it in article page but I have error " Trying to get property 'important_body' of non-object "

and this is code:

   <blockquote>
           <p>{{ $mainArticle->important_body }}</p>
    </blockquote>
     
      <p>{{ $mainArticle->article_body }}</p>

controller:

 public function show(Article $article , $id)
    {
      $mainArticle = Article::find($id);
        return view('UI.mainArticle' , compact('mainArticle' ));
    }
Nov
10
4 months ago
Activity icon

Started a new Conversation How To Resize Image In Laravel

I want to upload an image and resize with laravel but resize() and fit() methods not work what should I do?

controller:

 public function store(Request $request)
    {
        $index_image = $request->file('index_image')->store('uploads');
        $indexArticle=[
            'title'=>$request->input('title'),
            'short_explain'=>$request->input('short_explain'),
            //image storage
            'index_image' => $index_image,
        ];
        indexArticle::create($indexArticle);
}