Loyd

Loyd

Member Since 4 Months Ago

Experience Points
7,890
Total
Experience

2,110 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
12
Lessons
Completed
Best Reply Awards
8
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 2
7,890 XP
Aug
05
22 hours ago
Activity icon

Replied to How To Make A Modal Available To Every View?

Include your mofal in the layout page and it be automatically injected to all the views that extends your layout. Peform your logic checks there.

Aug
04
1 day ago
Activity icon

Replied to Check If A MorphMany Relationship Contains $post->id

@piljac1 thanks bro it worked had a bug in my view

Activity icon

Replied to Check If A MorphMany Relationship Contains $post->id

@silencebringer @piljac1 this method is always returning false even when the condition is true.

public function likedBy(User $user) {
        if(is_null($user)) {
            return false;
        }

        return $this->likes()->where('user_id', $user->id)->exists();
    }
Aug
03
2 days ago
Activity icon

Started a new Conversation Check If A MorphMany Relationship Contains $post->id

Hi Devs.

I recently changed my relationship to polymorphic.

I have a likes table & Model that has morphTo

	   $table->id();
            $table->unsignedBigInteger('user_id'); 
            $table->unsignedBigInteger('likeable_id');
            $table->string('likeable_type');
            $table->timestamps();
public function likeable()
    {
    	return $this->morphTo();
    }

& and posts table & Model that has morphMany

public function likes()
    {
    	return $this->morphMany(Like::class, 'likeable');
    }

Before changing to polymorphic I would do something like this

$liked = (auth()->user()) ? auth()->user()->likes->contains($post->id) : false;

to check if auth user likes a certain post. My question is now that I have morphs how do I check this status?

Activity icon

Awarded Best Reply on Polymorphic Pivot Table

@jeffreyvanrossum how would I handle the relationships since this is a pivot table

Activity icon

Replied to Polymorphic Pivot Table

@jeffreyvanrossum how would I handle the relationships since this is a pivot table

Activity icon

Started a new Conversation Polymorphic Pivot Table

I currently have posts that can be liked through a pivot table using the Laravel toggle method.

I now have comments and replies that I also want a user to like.

And having multiple tables is not the best option.

My post_user pivot currently looks like

public function up()
    {
        Schema::create('post_user', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('user_id');
            $table->unsignedBigInteger('post_id');
            $table->timestamps();
        });
    }

The question is how can I have a polymorphic pivot table for this scenario.

Am still in dev mode and can reconstruct.

Aug
02
3 days ago
Activity icon

Replied to Best Ways To Store Method For Multiple Images?

@jlrdw @michaloravec Thanks for your time I really appreciate It worked had forgotten to include the post_id in the fillable array

Activity icon

Replied to Best Ways To Store Method For Multiple Images?

@michaloravec @jlrdw

I was working on your method and am stuck as I am getting an error

SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: photos.post_id

and undefined var {$post->id}

Activity icon

Replied to Display String Data In Blade Blade Loop

@michaloravec Thnks for your reply

I would really appreciate an example bear in mind that I also want to use intervention image to resize the images

Activity icon

Started a new Conversation Best Ways To Store Method For Multiple Images?

How is my store method and is it the best or recommended way to do this?

 public function store(CreatePostRequest $request)
    {
        // dd($request->all());
        foreach ($request->image as $photo) {
            $photoName = $photo->getClientOriginalName();

            $name = $photoName;

            $photo = $photo->store('uploads/posts/', 'public');  

            // use intervention image to resize images
            $photo = Image::make(public_path("storage/{$photo}"))->fit(1200, 1200);
            // $photo->save();


            $data[] = $photo;


             // use intervention image to resize images
            // $imagePath = Image::make(public_path("storage/{$imagePath}"))->fit(1200, 1200);
            // $imagePath->save();
        }

        auth()->user()->posts()->create([
            'caption' => $request->caption,
            'location' => $request->location,
            'slug' => Str::slug($request->caption),
            'image' => json_encode($data),

        ]);

        return redirect(route('profile.show', auth()->user()->slug));
    }

do you think its the best approach

Activity icon

Replied to Display String Data In Blade Blade Loop

@thibaultvanc your method worked however b4 I mark it as best reply I wanted you to check my store method for storing multiple images.

 public function store(CreatePostRequest $request)
    {
        // dd($request->all());
        foreach ($request->image as $photo) {
            $photoName = $photo->getClientOriginalName();

            $name = $photoName;

            $photo = $photo->store('uploads/posts/', 'public');  

            // use intervention image to resize images
            $photo = Image::make(public_path("storage/{$photo}"))->fit(1200, 1200);
            // $photo->save();


            $data[] = $photo;


             // use intervention image to resize images
            // $imagePath = Image::make(public_path("storage/{$imagePath}"))->fit(1200, 1200);
            // $imagePath->save();
        }

        auth()->user()->posts()->create([
            'caption' => $request->caption,
            'location' => $request->location,
            'slug' => Str::slug($request->caption),
            'image' => json_encode($data),

        ]);

        return redirect(route('profile.show', auth()->user()->slug));
    }

do you think its the best approach

Activity icon

Replied to Display String Data In Blade Blade Loop

@thibaultvanc if {{dd($photo)}} i get

array:6 [
  "encoded" => ""
  "mime" => "image/jpeg"
  "dirname" => "E:\Eventgram\public\storage/uploads/posts/top-view-of-green-field-1595104.jpg"
  "basename" => "bEu5dw304CMV0BKpvIkVqcuTQohMUcwJWPcJ28ge.jpeg"
  "extension" => "jpeg"
  "filename" => "bEu5dw304CMV0BKpvIkVqcuTQohMUcwJWPcJ28ge"
]

and if I do

{{dd($photo->basename)}} ```
 i get an error

``
ErrorException
Trying to get property 'basename' of non-object (View: E:\Eventgram\resources\views\post\show.blade.php)
http://localhost:8000/post/bbbbbb
``
Activity icon

Replied to Display String Data In Blade Blade Loop

@thibaultvanc @mostafa_kh @haz_ with json_decode i get the following error

ErrorException htmlspecialchars() expects parameter 1 to be string, array given (View: E:\Eventgram\resources\views\post\show.blade.php)

my code

  @foreach( json_decode($post->image, true) as $photo)
                                <li class="glide__slide">
                                    <img src="/storage/{{$photo}}" class="photo__file"/>
                                </li>
                            @endforeach
Activity icon

Replied to Display String Data In Blade Blade Loop

@thibaultvanc if i use that method in the scenario am getting the following error

ErrorException
htmlspecialchars() expects parameter 1 to be string, array given (View: E:\Eventgram\resources\views\post\show.blade.php)
Activity icon

Replied to Display String Data In Blade Blade Loop

@haz_ my controller

public function show($slug)
    {
        $post = Post::where('slug', $slug)->firstOrFail();

 

        $saved = (auth()->user()) ? auth()->user()->savedPosts->contains($post->id) : false;

        return view('post.show', compact('post', 'saved'));
    }
Activity icon

Replied to Display String Data In Blade Blade Loop

@thibaultvanc @mostafa_kh @haz_ how can i convert the image string to array in controller b4 passing it to the view

Activity icon

Started a new Conversation Display String Data In Blade Blade Loop

How to display the bellow image string in a blade I only want the basename

App\Post {#1308 ▼
  #fillable: array:5 [▶]
  +with: array:1 [▶]
  #connection: "sqlite"
  #table: "posts"
  #primaryKey: "id"
  #keyType: "int"
  +incrementing: true
  #withCount: []
  #perPage: 15
  +exists: true
  +wasRecentlyCreated: false
  #attributes: array:8 [▼
    "id" => "27"
    "user_id" => "1"
    "caption" => "bbbbbb"
    "location" => "nnnnn"
    "image" => "[{"encoded":"","mime":"image\/jpeg","dirname":"E:\Eventgram\public\storage\/uploads\/posts","basename":"yZPNg510RWLNSJJ1Qy6ppzucJuLg68lnoFUHsU3q.jpeg","extension":"jpeg","filename":"yZPNg510RWLNSJJ1Qy6ppzucJuLg68lnoFUHsU3q"},{"encoded":"","mime":"image\/png","dirname":"E:\Eventgram\public\storage\/uploads\/posts","basename":"2WUej5sQ57gLRsRF60xQlyubPrDW6diUD1Np8vmf.png","extension":"png","filename":"2WUej5sQ57gLRsRF60xQlyubPrDW6diUD1Np8vmf"},{"encoded":"","mime":"image\/png","dirname":"E:\Eventgram\public\storage\/uploads\/posts","basename":"TBw5xaXR661LC7HtIfN382NxttUpOQVicWcXGC95.png","extension":"png","filename":"TBw5xaXR661LC7HtIfN382NxttUpOQVicWcXGC95"}] ◀"
    "slug" => "bbbbbb"
    "created_at" => "2020-08-02 15:50:14"
    "updated_at" => "2020-08-02 15:50:14"
  ]
  #original: array:8 [▶]
  #changes: []
  #casts: []
  #classCastCache: []
  #dates: []
  #dateFormat: null
  #appends: []
  #dispatchesEvents: []
  #observables: []
  #relations: array:1 [▶]
  #touches: []
  +timestamps: true
  #hidden: []
  #visible: []
  #guarded: array:1 [▶]
}

my blade

 @foreach($post->image as $photo)
                                <li class="glide__slide">
                                    <img src="/storage/{{$photo['basename']}}" class="photo__file"/>
                                </li>
                            @endforeach

error

ErrorException Invalid argument supplied for foreach() (View: E:\Eventgram\resources\views\post\show.blade.php)

Activity icon

Replied to Display String Data In Blade

@thibaultvanc Thanks a lot man

Activity icon

Replied to Display String Data In Blade

@thibaultvanc @geordiejackson thanks for mentioning that its a string. But the question still remains. how do I access that in blade

Activity icon

Awarded Best Reply on Problem Showing A Forum Submitted Content

@blackmercury you need to pass a name in your input fields

<input type="text" class="form-control" id="title" name="title">
Activity icon

Replied to Display String Data In Blade

@thibaultvanc thanks for your reply. Can you please provide an example using my blade code

Activity icon

Replied to Problem Showing A Forum Submitted Content

@blackmercury Please consider marking my reply as best answer since my reply solved your issue

Activity icon

Started a new Conversation Display String Data In Blade

I have an image string in Post. My question is how do I display this array in a blade.

App\Post {#1308 ▼
  #fillable: array:5 [▶]
  +with: array:1 [▶]
  #connection: "sqlite"
  #table: "posts"
  #primaryKey: "id"
  #keyType: "int"
  +incrementing: true
  #withCount: []
  #perPage: 15
  +exists: true
  +wasRecentlyCreated: false
  #attributes: array:8 [▼
    "id" => "24"
    "user_id" => "1"
    "caption" => "ntgjbjk"
    "location" => "kkk"
    "image" => "["uploads\/posts\/\/d2AW5jRNNBfWPq8EsHxbsqpMfFfdTZkBg0Jbc3iO.jpeg","uploads\/posts\/\/ROz8vckqID1YOleIdkwSFMm7oxJPuUR04VpcPiSL.png"]"
    "slug" => "ntgjbjk"
    "created_at" => "2020-08-02 14:18:54"
    "updated_at" => "2020-08-02 14:18:54"
  ]
  #original: array:8 [▶]
  #changes: []
  #casts: []
  #classCastCache: []
  #dates: []
  #dateFormat: null
  #appends: []
  #dispatchesEvents: []
  #observables: []
  #relations: array:1 [▶]
  #touches: []
  +timestamps: true
  #hidden: []
  #visible: []
  #guarded: array:1 [▶]
}

what I have tried so far in my blade

 @foreach($post->image as $photo)
                                <li class="glide__slide">
                                    <img src="/storage/{{$photo}}" class="photo__file"/>
                                </li>
                            @endforeach

and getting this error Invalid argument supplied for foreach() (View: E:\Eventgram\resources\views\post\show.blade.php)

Activity icon

Replied to Multiple Image Upload

@sergiu17 @bobbybouwmann @bugsysha I want to have something like below, not the above on the image section

App\Post {#1308 ▼
  #fillable: array:5 [▶]
  +with: array:1 [▶]
  #connection: "sqlite"
  #table: "posts"
  #primaryKey: "id"
  #keyType: "int"
  +incrementing: true
  #withCount: []
  #perPage: 15
  +exists: true
  +wasRecentlyCreated: false
  #attributes: array:8 [▼
    "id" => "15"
    "user_id" => "1"
    "caption" => "hwjhsjhhjdjs"
    "location" => "public_html"
    "image" => "uploads/posts/Mglt5JWaPIVmMm09rZM1KQzyUWq5S9gPb8jFisVi.jpeg"
    "slug" => "hwjhsjhhjdjs"
    "created_at" => "2020-07-30 17:48:39"
    "updated_at" => "2020-07-30 17:48:39"
  ]
  #original: array:8 [▶]
  #changes: []
  #casts: []
  #classCastCache: []
  #dates: []
  #dateFormat: null
  #appends: []
  #dispatchesEvents: []
  #observables: []
  #relations: array:1 [▶]
  #touches: []
  +timestamps: true
  #hidden: []
  #visible: []
  #guarded: array:1 [▶]
}
Activity icon

Replied to Multiple Image Upload

@sergiu17 it worked, however, I now have a different issue after saving images loop the images

   @foreach($post->image as $photo)
                            <li class="glide__slide">
                                <img src="/storage/{{$photo}}" class="photo__file"/>
                            </li>
                        @endforeach

am getting the following error

lluminate\Database\Eloquent\JsonEncodingException
Error encoding model [App\Post] with ID [19] to JSON: Malformed UTF-8 characters, possibly incorrectly encoded (View: E:\Eventgram\resources\views\post\show.blade.php)

When I was working with a single image it worked just fine.

if I dd the saved instance an getting the following

App\Post {#1308
  #fillable: array:5 [
    0 => "caption"
    1 => "image"
    2 => "user_id"
    3 => "location"
    4 => "slug"
  ]
  +with: array:1 [
    0 => "comments"
  ]
  #connection: "sqlite"
  #table: "posts"
  #primaryKey: "id"
  #keyType: "int"
  +incrementing: true
  #withCount: []
  #perPage: 15
  +exists: true
  +wasRecentlyCreated: false
  #attributes: array:8 [
    "id" => "19"
    "user_id" => "1"
    "caption" => "hahhaha 82"
    "location" => "gaggagga"
    "image" => b" Ï Ó\x00\x10JFIF\x00\x01\x01\x01\x00`\x00`\x00\x00 ■\x00;CREATOR: gd-jpeg v1.0 (using IJG JPEG v90), quality = 90 █\x00C\x00\x03\x02\x02\x03\x02\x02\x03\x03\x03\x03\x04\x03\x03\x04\x05\x08\x05\x05\x04\x04\x05\x07\x07\x06\x08\f\f\f\v\v\v\x0E\x12\x10\x0E\x11\x0E\v\v\x10\x16\x10\x11\x13\x14\x15\x15\x15\f\x0F\x17\x18\x16\x14\x18\x12\x14\x15\x14 █\x00C\x01\x03\x04\x04\x05\x04\x05\t\x05\x05\t\x14\v\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14 └\x00\x11\x08\x04░\x04░\x03\x01"\x00\x02\x11\x01\x03\x11\x01 ─\x00\x1F\x00\x00\x01\x05\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\v ─\x00Á\x10\x00\x02\x01\x03\x03\x02\x04\x03\x05\x05\x04\x04\x00\x00\x01}\x01\x02\x03\x00\x04\x11\x05\x12!1A\x06\x13Qa\x07"q\x142üæí\x08#B▒┴\x15RЭbré\t\x16\x17\x18\x19\x1A%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzâäàåçêëèÆôöòûùÿÖÜóúñѪº¿®¬▓│┤ÁÂÀ©╣║┬├─┼ãÃ╚╔╩ÊËÈıÍÎÏ┘┌ßÔÒõÕµþÞÚÛ±‗¾¶§÷¸°¨· ─\x00\x1F\x01\x00\x03\x01\x01\x01\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\v ─\x00Á\x11\x00\x02\x01\x02\x04\x04\x03\x04\x07\x05\x04\x04\x00\x01\x02w\x00\x01\x02\x03\x11\x04\x05!1\x06\x12AQ\x07aq\x13"2ü\x08\x14Bæí▒┴\t#3R­\x15brÐ\x16ß%±\x17\x18\x19\x1A&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzéâäàåçêëèÆôöòûùÿÖÜóúñѪº¿®¬▓│┤ÁÂÀ©╣║┬├─┼ãÃ╚╔╩ÊËÈıÍÎÏ┘┌ÔÒõÕµþÞÚÛ‗¾¶§÷¸°¨· ┌\x00\f\x03\x01\x00\x02\x11\x03\x11\x00?\x00³ÔeªüNfªâA\f6v┴Lº\fðHç¡)ÚHzÊ×ö\x15\x11ÿúe\x00ÈâÜû\x12\x11å╩\x14oÑa¥à\e*ü\x06\x184dÐôA¬\x05█N;{SWm8ÝÝPH/\vèî/5!ÓÔ×S\x035fIj69LâM0Ç┘\x14\x12\x18³┤µ\x061═A¿\x01╝d§á\x1DÃ\x07Ñ\x04n9\x1D('x└ÙV\x03Æ=óÿNËOI7a\eì\vC;Ä[email protected]ªn$ÈÄ@\x14╚ê&ç®#öq\x02óPiÏ4åÕp=iZɧÑj½éì┼ÅüGøâHº"ó+═fj╔Lø®ºÜRÿª\x13ħH═ÅïüH├&öp)\x14õÊ5Ää©Dn*©+µ[email protected]ô\x06Ƶ\x05cæTëƩƳÃ4ädR┼¾\fÊüÆh\[email protected]ª)U±CÁFFi6S\x1FE\x14RD]â&(W┼\f¨íS42äèv¦ÈÎ]┤Þ┌ɯ&¾F¾FE\x19\x14\x05ãÐE\x15dêâ\x14µlÊ8┼5[4\x00\x13Ú@>┤\x11Ú@\x1EÁ-\vÜß│4í³║q;j2<╩\x12\x18Í>YºåÌ(æ7Ün6Ëíôzï\x17¦ÑÄ<5\x18█N▀┤VFëÞ7£Q\e\x10iÛr*&|\x1Av\vÄ/═+7\x14ã\x1CÊ░Ôï\x05ãüA\x15 \x14\x11H`:SAµÇxªÄ┤1(ºÐVLÉ9ªÒ4g4õ\x14*┬\x03A4\x01A\x14ÿn; èDNi6\x10)¿[email protected]\x00ñf#Ñ5TèR└Tö(?=\x04³¶\x01¾ðG¤A`ÿ\x02à└4ãB\x1A×ÐÉ3LW\x02§\x194ýfì╣á.\x01ÈP]M\x12"è#E4¯\x17\x1Cþ"íqôRg4ÿ═\x17%é6E=\x0EM"ÃüH\e\x14\hi&ÜI®I\x14ÊE\x17\x06\v┼═┼\v═!▄)\x1Aû欫\x17\x06º+SZÜ\x1Aô"Òëªþ\x14\x1E)┤ \x1E\x06i\x18SÚ¼)▄ª0ÆNjFbE"ÉE\x08└£Té\x123à┼0îÜ$;M<\x0FûØÃa½¹║\x1F¸ö7═Íà¨zQqXpP\x17\x14┼ÅJ³\x1AG╚\x142\x07¿\x18ñP3MPqHáµñËá¡JØ®\x1Aò;U\ø\x03h\x19®\x18Sh╣6\x1A┤58\x08íòa\x11D`ʬ¯9ª0▄Ϻ▓\x18ãjGaäËı¿eª\x01C(æàFVØ║ìÈ"XðHª▒5("Ü─P;ü\x14\x01A4\[email protected]\J(óéB£\x10PFj&CAd─i\x02é4âMôqGJhÙN\x1D)ú¡\x08.7\x1EYº▒¾\x05$▄ÜE;EUü\x03È(█Júu\f6Ê░1╝Ð═\e┼\e┼I-N(~h'\x14\x03Ü░HEí®└PEAí\x10]ã×ÊyböìªÆH³┴A6\x1AÃ4)┼3C\fSB6\x16媡HLvÌ)è╝È╣Ôܺ\x06éFHy┼4ºö3J├\x074±¹Ðè░#\x02ñ\x18\x14\x18╚ñÏjX\x12l\x14ÍîR%8èEXB(\x02éh\x06üç±SƒÑ7°®¤ÊÇ\x15\x08ô¡+ã\x17Ñ4G×ö´§}j┼\x14!î!Ôæ▓┬£\x17a¨®Ê8a┼@ã6Û\x00j9®\x106*└ìhj\x16å®lø\x03}·h╬·yq¥ø╝yö&Mà8═8Ò\x15\x19CÜyCüT\x1Có#|¶2nzsªÎ4)¨¨¿╣¬B>þªaÆ£┼ÆÇ\x19Þ j£ð╔ÜÉ&\x05\x04Ô®\x05åö┼&µ\x14■öóU\x1Dj\x19{w╔ñv╚└º"dRñy5Hñ«D:Rã▄Ë÷qLUµøfLQ%\x04nóH÷Ð\x1DIQ\x1Cc\x02ÜI\x1D)õ\x15ÙQ4üióàaäñ\x03õº░╩[email protected]¨(e]ÇÔôo4¿N)7sNãc|¼\x1AG\x18\x14Ó¨jæô"ï\x01\x06▄Sâbø╗4Ó╣ªM─g═Öíô\x14+ÔÇ©î█®╚┤ÈZVm┤6.[\x03èÅ\x02ñsQõPÿ¯(┬\x1CS╝׶Ãî×iÐ╣~*║\x10Ìú└\x14\x10)Ç\x1A\x085æ¬j┬3dÊ2õR▓ÓÊ3`S©¼;o4«╝Rnµò█è.\x16#h¨íúÔ×═¾R│qTH└┘á«h\vè\vbé┼¾6qM,Pµ×F■iñ´ÔáÀ¿¼È+P╦B¡\x06-Ï@╬ö±ùñ,^ú!Ê®ì\vôMbjPE5êí\x1A¿ZkPÁ#\x13&îÜ~GÑ\x19\x1Eö\x100╔©Èìû\x14Ç\x003Q¼▄ıX\x07dQæMóï\x00ñµ£╝TqË£Ôï\x12ÿÌhµƒæFE\x16(m\x14QHhh¨Þ?%=F╩\x18oá\x18âÑ\x07Ñ\x03Ñ\x07ÑUä\x05®ªüN\vR\x03Bè\SB×ÈÝ┤┘ #ª┤u jk=\x08┤åüJM;\x18¿£È\x18½N=i½N=jü\x08\x1F474½üAp)Ïw\x18═BÁ\f┤*Ða\h\x184÷8\x14ç¡$ååH­("Çh&ñÎáãni┘ÔÜ╦═;\x1CPfÿ)º\x17ñ█Ln((\eâC?\x14¦┘5)Åp¬d▄êSâRýªÝ®\x1DÃåªÁ5Z£ıLíÑi╩\x05#%4\x03B%ĦÜ7bêù4J©®\x10F╝R¸4+qL/âÍÇ\x14Á\x01®Xè\x14è\x00U8\x15\x18\x189º\x1EH╦‗ðY\x1E¾F¾I║ìÈÏXLARACASTS_SNIPPET_PLACEHOLDER(╚ú"ä\x16\x19╗&ìÖºl┼&ý½ÆüN(cÜ\x18bà\x19ÑpaâF\x194dÈÆÏS\x1F¢>ÿ²Û┴1OZ\x07Z\x0FZ\x07Zé«DÚ═<\x0E)dÙM-┼\x05\tµ\x13F\tÑ└\x14yÇSB▒┤ú|g=j(T│\x15ÝSÒ═b├Ñt>\x0E­ \x00÷¦Í¤¾Ð¢ÃÑ>dû╗\x11\x14õýî$▓fÇ6╠■>§\x14ûÕ▄\fm»¢¥\x17■═ÂW÷\x00^&\x7F\x16§\x7FI=àZ±´ýsg"\x07│\e\x7F´ú²▀Y¥Áß╦5í\x1A×╬G\x7Fıñı┘­\x00Á)‗ýÃÒQ\x08\fo¾‗+¶\x1F┴▀▓׃}ºƒÀ&$=9oV¶ùÏWƳr²òþ­ò╣║▓Õ\x0FËÍ1ÌS²ÒUK5ú)r\x18╩äÆ>R\x18Z2)¸0ýjiïÕ»fÎ^¯Ã:Mh"¦hqÀÑ\x19¦ÊîÝÙRÝ÷ÉÑt'5*\x13Q25\x01XUº}"e\e╚æ┼GîTÞ7u¿µ\x18¿¢¶Ï┌÷\x15ú┤¯\x04tÃ╔\x14ß\x1EÞÚºm7\v▄c\x1CÊg\x14¶\ÊJ©ºd▀╝-\x1EÔìÐ'\x144╠╔═*¯\t═XÄ╚╠£SN¤╚I5▒\x15^)Bݵªm1ü▄\x7F¤ÙQ7\x07\x14o▒_\x0EîëË╠îR\x04‗õ\x15*³▒èk¾ ñø┘1█¬\x13╠¾+ìóô╦‗═+Ø┬åÊÐ\t6\x06ßÖ9º¿▄ö\x1CmÔü¸(Z|!¼u#-²ÐM\x12ÀG\x1C}kZ█Eײw─8³?Ã┌¬¦█Kn█\x1Cs°TÀ\x16¨\x13ıªÐ_╠ªæ║Ø,{i¿i╗┐z]\x08W░‗T¶\x18ñÏOCL\x05ÅQè]ǧ5VOQ¯=[\x143få\P½ÜØz\x16ñð╠ÊÈ`µ×:U‗¥¼[ì+µSé¨tFvË£¯ÑÂ├J─sI©ðúèqÅÜG¨EV½s-P«[4e▒JÞ┘Ñ┌ÏÑd¶);j\x1C<x4Í┬&\x05+&¸└ªà)&\x0FJM╔j╩┤^└æÈÑ@ª(4îM&ËØÏô\x001HÊbö\x1CÊ4yª¦ãÏã▄iÞ[email protected]╦BW\x11*D\x14R\x01┤Ên9┼,ë└4└d┐51\x17\x1CËç4³PK#jhZsSòh\x10╩UñÑZ\x00tâu$qvÝı\e+TÏÐ▒\x19ÖÄi╠¼┬àFãi\x15ø4XCrh╔ºn\x14n\x15hüíwÜs.┴@¨9■qC)\x11!┼9ø43bò\x0Ei\x15`C‗ýñ▀╬╩U\x1Co¿ê┴▀A$¬┤ñR+RôJÒ\x13qúqúpúp®©Ë)7Q║Ü\x10÷jîÜJ]Á@)\x14äRôHM\x04ñ(<S\x00µà9\x14Õ\x194\x1A!╠È┴═'øOG\x06éR\x19"õÊà┌)A╔ºHp((îp4\x11M&ü!A╚ªâ═J\x17è`^j\x10\x1Dç\x14Ó6sA]▄Üim▄\x1A│6┼ñjZFá\x13\x12ènM\x194å.ÔE5W&×X\x11Q¬Æj¼K$º\fvªl4Óç\x15\fñ4e╬iÓç\x18ªù█┼0®^sB)Æ\x1Eö├ÍØE;àå\[email protected]\x14Ô(\x02ïæ╩\x03Ñ"ÊÄöïCErÏZF\x14)Ñ®\vêzð:ðzð:ıXïê¶%#╔BIEç[email protected]\x14Ó)ñ\x1Aa\x15#\x1D║ìÈmúm\x00&\x184Û(.├\x00áèrðıdÏm\x14ø¿¦Sa\x0E▄OZv\x01ªù\x06ônh░\vÀþ═\e~|Ð╗õ═\e¥LðÃaè┼Ú┼èRáÏiO¤B(îuºSGZuPü\x0E)º▓ÔøÀ5\x04░_ÿR\x0FÉÊ»╩)\x07╬j¼&┴ø\x1CSú8ª╠0Ȳ©J,\tæÒîÊ ┴ºÒè\x13¡IM\x08M78á±M¬B\x17\x06î\x1A~┌6ð└mFÙOZR3RUåØþ¡!êÁ8HOJ]¼zR©3«O¦\x02¼±c\x1FÝ\x0F±»f°\x17ß®%ÎUõ¨@·\x1FßôÌ┐Q.\x7Feo\v╦ͤ\x1F÷Í_■;Y2~═║6Å'Ög\x06Ë■¹ƒþ!§5ÞÒ!Ft\ineFN\x13ÈÁ­Ã┬Ù÷\x00; \x00§▀Ì¢*Ò├1On\x03 \x00__¡s>\x1DaßÎ‗øº \x00»ÙÙ]ÔÛ░¤dXu³}~ò°ÕZ~╬╗îÅóö▄íí╔iÌ\x18å\tN?»┐¢`³Q­]®íòn┐Ÿô▀┌╗(Á╦h/\x11³²>òOÃWP▄i'o\x7F»¸û╣ch╬)=BKÜ'ÔO┼\x7F\x0E«ïÒk½xS Ý´ \x00Lð¸'Í®hƒ§]s╩\x16û¨'?ã×■¼=}Y \x00~O\x17³K©yS+‗¸ \x00ª?´Å¯ÎÏ\x1F\x0E¥\x05ÏhÉ@R\f┐═³mÛ▀݃Z¹è╣¬├Sî:×|p‗öÅ╦ü¹<°ó2[ý©_·Ú\x17 \x00\x1C«[\°y¬hj~Î\x1Eı \x00y\x0Fºú\x1FQ_À±x.┼í14[Ź═ÙƒZß|w­[email protected]±%üëÝ~\x7F_2OU?▀\x1Eò├O?öÑjê╣`ËGÔ¢Áú0Ïâ+Ú[·_ǧ-Oþé▀+■·¹·ÀÁ}ë \x00\fâ²øÒp¬?Ð}3 \x00L┐Ù«zÜ·├└ƒ│■òú█+\e|á \x00m²[■Ü\x1FZ¶ÛgT®ãÞ╩84Å╔9¥\x1CÙv╣3┘Õç²5OÞı╬¦┘ø{ìà<®ç¥¯▀ß_╣GÓÍæw\e´┤╦\x1C\x7F╦W \x00ÔÙþOÄ_▒>ùÔK\x17║░O*~;▒´\x18´0\x1D\x01¼Þþ4¬Nı4.X[\x1FùÍ·t»¾)▄OÊ«Kß½¿ð|Ø}ðÎÍ \x00\t?g├ \x00\t\x1F┘/í╩»¹\x7Fý9Ý'Ê¥┴Ê┐e═\x03R┤\x07ý╝Å·i'® \x00ª¥ı¡Lµò9Z×í\x1C-¤╚X¶+â\x10\x02\x1Cá \x00h\x7Fì2xÜ9\x02âÕ\x01ÝܲòÁ²ÿ|9m\x19êYg■┌╔§ \x00×òµ?\x16 \x00bM\x17─\x1Aqk(|®?Ìs¦=f\x1Eå│ÄuJr÷lÖa_C‗Ì├M7ùæ£Ò?╦Ù_U³\x05°\x15\x07êfI´!▄ç<¯#┤â│ÅA[▀\x08\x7Ff▀ý´\x11¤a½Eç]┐┼■├À­╔¯+´Ååƒ\x08l<?º├\x14<gw¸¢X¸sÙXµ\x19ØßýÚnoFèÄþ╔▀\x14 \x00d}:¸@ÜkXq:mÃ╠¦¦\x07yqË5¨±Ô\x1F\v¦hZä͸Õ╩øq└[email protected]=맻Þ\x06þ┬0Ì[<M╦q×¥╣§»ô>2■╚:?è/×■8░³gµ\x7FD_¨Û=+ï\x05ÖT├¥ZÒ½J\x15uë¨6Ð\x18G╠sOèð8▄\x0EË_BxË÷g╝­¸ëÆ┼~`s²▀¯) \x00×çÍ¢ \x00ß \x00ý?g½Y$ùÃi9§§oI¢à}\f¾<4\x175╬5ç×╚³■{wÆB\x15░┐Jä├ö(çsWÛÃý\vóL\tVÃÓ \x00³~╝SÔ¸ý\x1F¿Þ\x16å}\eµ \x00¥}P\x7F\x14þÈÍt│l5YrúWàÆì¤ëÕæ\x1E2█~c´Z┌\x0E×Îùð─¦\x0E\x7F殺­Õ┼ÄóÍr»╠1▄zg▒¸»Ñ>\x04■╬7\x1E*Ü+╣>Þ¤ºñâ■z\x0F¯Îú[\x13JäyÄHRöÕc▄ \x00f»é\x1Al┌@×xr% \x00i╗4ú│ÍGÝo¹0XEí\x7FiÚp~‗/÷█╗B┐┼/ÎÁ}=­Òߧ¸ä¼ßé&╩&{/rùùıCÒ¤ëSI­ò┬]\x7F\x1E▀ÊH²\x07©»¤û2¼▒è¼^î÷+FÜåçÒ8Q##cµ\x19ó@\x17|è┐1ÃzÞ¶ƒ\f═½k»o\x08¶Òůô▄¹W¢Ú\x7F▒┐êu.;ÞÎ(┘´\x1Ff#■{{WÞ2─SÑ\x04þÈ‗)ÊòGí¾\x14ië6┐´OÕDü×L\x19<ò \x00wu}[ú■├×"¢V%v?\x1DÒ>┐¶┌╣_\x1E■╚^-­^×Î/m÷àÒ■ZB¢È\x7F¤S²Û═c(Èvêºçö\x0F×Àý¨Ö?Zv°└Ì\x06*y¶Íé\x7F,>Ò¶Ão¡u■\x10°g¼xª_.┌├²¶\x1F̧aÚ]rö «Dc&q\x1EYä}²ÃÚP╚ß~`ÏoÑ}\x19 \x00\f\x7FÒëú¾¡ý‗┐§Í\x0Fºykä±À┴?\x14x\x0E/┤j6X\x1F§Í/÷G­╣■­¼!ëúWßfò)J\x07ÖHø\x10nñybV\x04>?\x03V\x06\x04 ²¾¨w¡Ø\x07┴║»êµ\x02ÍÎp \x00«ê=}H¶5Ð═╦▒éRg<-\>WüÚHÐÖø\e6ƒ\Îo?┬¢nÌõG5Ä$=\x07£××═Z2|\x15±Xî<Ün"=\x0Fƒ\x17 \x00\x17Y¹XE+û®╩┌£¸é<)?ëu(`ï²sg˹¼}GÑ}8ƒ░n»¿Þ-\x7F\x04©Ø╗mO´m´>:ѹ4°\x16Ô\x0F\x18█ï©0 \x007±Å¨þ/ú}+§{A­²╝z(B©oLƒ´\x1Fz¨¼├2®J▓ì#Îà\x08{;│±/@°\x07¬Ù>0m\fª╔å;í \x00ûe \x00þáý=k¢±ÎýQÔ/\vh-}\x18ÌÒ\x1F¾╠\x7F\x1AŨý\x7F¢_á\x7F­üi \x00\x17ÌÒf╔█\x1DÏ \x00╦¥?¢ÄòÝ■"­¡¢ãÄ÷▓ìÕ▒Û?ê\x1FZµ×mY╔D\x7FWªúí³·][╝2y\x0E©u݃^j'pÏ.+Ï¥>x Þ▀\x15/¼-ù╗8¤¼\x11Àv>ª╝ÿÏ╦\x11) ²E}¢\x18Ntö┘Ò═r╩╚¼\x06h‗Ûbøj6|Rj┬\x1ANj23KôN└í;\x10*qMôÜsqMÙH▒$╔4╝è\x03éid|\tcph┴ú&îÜ\x19N\x1CQîSÇá\x04&Çi¡Bð\x03XyéØ\t‗ÞQ┤S3©ð@‗sM"ösO\vI
Activity icon

Started a new Conversation Multiple Image Upload

getting error Call to a member function move() on string on store method when uploading multiple images. My controller

public function store(CreatePostRequest $request)
    {
        // dd($request->all());
        foreach ($request->image as $photo) {
            $imageName = $photo->getClientOriginalName();

            $imageUniqueName = $imageName.'_'.uniqid();

            $imagePath = $imageUniqueName->store('uploads/posts', 'public');  


             // use intervention image to resize images
            $imagePath = Image::make(public_path("storage/{$imagePath}"))->fit(1200, 1200);
            $imagePath->save();
        }

        auth()->user()->posts()->create([
            'caption' => $request->caption,
            'location' => $request->location,
            'slug' => Str::slug($request->caption),
            'image' => $imagePath,

        ]);

        return redirect(route('profile.show', auth()->user()->slug));
    }
Aug
01
4 days ago
Activity icon

Commented on Step 6: Understanding Arrays

Keep it up

Activity icon

Replied to Clear The DOM After Delete

@maverickchan thanks for replying.

how and where to do I place that code

Activity icon

Replied to OrderByDesc Not Working In Postgres

@untymage try

return Post::query()
            ->where('title', 'LIKE', "%$term%")
            ->latest('votes')
            ->take(5)
            ->pluck('visits');
Activity icon

Replied to Problem Showing A Forum Submitted Content

@blackmercury you need to pass a name in your input fields

<input type="text" class="form-control" id="title" name="title">
Activity icon

Started a new Conversation Clear The DOM After Delete

How can i clear the DOM after deleting in vuejs

my method

			deleteComment(e) {
				let data = new FormData();
				data.append('_method', 'DELETE')

				axios.post(`/post/${this.post.slug}/comment/`+e.id, data)
				.then((response) => {
					this.deletedComment = response.data
			})

the whole component

<template>
	<div>
        <!-- Single post comment -->
        <li class="image__comment">
            <div class="comment__container">
                <div class="user__comment">
                    <a href="">
                        <!-- <img src="" alt="avatar" class="comments-avatar"> -->
                        <avatar :username="comment.user.username" :size="30" :rounded="true"></avatar>
                    </a>
                    <a href="">
                        <span class="image__comment-author">{{ comment.user.username }}</span>
                    </a>
                    <span v-if="editable == false || editable != comment.id">{{ comment.body }}</span>
			        <input v-if="editable == comment.id" v-model="comment.body" type="text">

			        <svg v-on:click="editable = comment.id" v-if="editable != comment.id" xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-edit" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2196F3" fill="none" stroke-linecap="round" stroke-linejoin="round">
					  <path stroke="none" d="M0 0h24v24H0z"/>
					  <path d="M9 7 h-3a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-3" />
					  <path d="M9 15h3l8.5 -8.5a1.5 1.5 0 0 0 -3 -3l-8.5 8.5v3" />
					  <line x1="16" y1="5" x2="19" y2="8" />
					</svg>

					<svg v-if="editable == comment.id" v-on:click="updateComment(comment)" xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-checkbox" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#4CAF50" fill="none" stroke-linecap="round" stroke-linejoin="round">
					  <path stroke="none" d="M0 0h24v24H0z"/>
					  <polyline points="9 11 12 14 20 6" />
					  <path d="M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9" />
					</svg>

					<svg @click="deleteComment(comment)" xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-trash" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2196F3" fill="none" stroke-linecap="round" stroke-linejoin="round">
					  <path stroke="none" d="M0 0h24v24H0z"/>
					  <line x1="4" y1="7" x2="20" y2="7" />
					  <line x1="10" y1="11" x2="10" y2="17" />
					  <line x1="14" y1="11" x2="14" y2="17" />
					  <path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" />
					  <path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" />
					</svg>
                </div>
                <div class="timeAndReplyBtn">
                    <span class="reply__time">{{ comment.created_at }}</span>
                    <span class="reply__button" @click="addingReply = !addingReply">
                    	{{ addingReply ? 'cancel' : 'reply' }}
                	</span>
                </div>
            </div>
            <i class="fas fa-heart heart"></i>
        </li>

        <!-- Add reply textbox -->
    	<div class="reply__area" v-if="addingReply">
    		<textarea cols="40" v-model="body"></textarea>
    		<i class="fas fa-location-arrow" @click="addReply"></i>
		</div>

        <!-- Replies -->
        <replies ref="replies" :comment="comment"></replies>      
    </div>
</template>	

<script>
    import Avatar from 'vue-avatar'
    import Replies from './Replies.vue'
	export default{
		components: {
			Replies,
			Avatar
		},

		data() {
			return {
				editable: false,
				body: '',
				addingReply: false,
			}
		},

		props: {
			comment: {
				required: true,
				default: () => ({})
			},

			post:{
				required: true,
				default: () => ({})
			}
		},


		methods: { 
			deleteComment(e) {
				let data = new FormData();
				data.append('_method', 'DELETE')

				axios.post(`/post/${this.post.slug}/comment/`+e.id, data)
				.then((response) => {
					this.deletedComment = response.data
				})
			},

			updateComment(e) {
				this.editable = false
				let data = new FormData();
				data.append('_method', 'PATCH')
				data.append('body', e.body)

				axios.post(`/post/${this.post.slug}/comment/`+e.id, data)
			},

			addReply() {

				if (! this.body) return

				axios.post(`/comments/${this.post.slug}`, {
					comment_id: this.comment.id,
					body: this.body
				}).then(({ data }) =>{
					this.body = ''
					this.addingReply = false
					this.$refs.replies.addReply(data)
				})
			}
		}
	}
</script>
Jul
31
5 days ago
Activity icon

Awarded Best Reply on Return A Vue Component In Blade Foreach

@anoshiri yes scripts are there

<script src="{{ asset('js/app.js') }}"></script>

and its rendering but only showing of the first instance of the loop

Activity icon

Awarded Best Reply on Declare A Vue Component Locally.

fixed

Jul
30
6 days ago
Activity icon

Replied to Help With DB Connection Issue

stop and start your server. if it doesn't work can you share your env.

Activity icon

Replied to Video Upload And Play With Laravel 7

What have u tried so far?

Jul
26
1 week ago
Activity icon

Started a new Conversation Photo And Video Sharing App

Am working a on photo and video sharing app. I have a post model with photo thats works well. I now want to have either a photo or video on the post model. And i want either a photo or video to be required and to only choose one type of file per single request.

Hw can i achieve this? Thanks.

Jul
23
1 week ago
Activity icon

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

does $listing->metainfo currently have a value in the DB

Jul
21
2 weeks ago
Activity icon

Replied to How Can I Use Carbon In A Helper Function?

you need to add use Carbon; every class where you want to use it.

Jul
11
3 weeks ago
Activity icon

Replied to I Am Getting Internal Server Error After Uploading To Shared Hosting

@shami003 can you set your app local in your .env to get more info from the debugger, currently, your service provider looks fine

Activity icon

Replied to Get User Agent

@rss thanks for the reply since i have 2 websites where do i configure this

Jul
10
3 weeks ago
Activity icon

Started a new Conversation Get User Agent

I have a situation at hand. Got a domain covid19zim.online and recently developed a dedicated mobile web version to be served on m.covid19zim.online.

So my question is how to I get user agent and direct the user based on the device they are visiting the platform from.

Desktop users will be served with covid19zim.online and mobile users m.covid19zim.online